1933 views|0 replies

1140

Posts

0

Resources
The OP
 

Introduction to DSP GPIO [Copy link]

TI文档: TSM320X2833X System control and interrupt regerence guide ----- SPRUFBO

0~87 There are 88 I/O ports in total, of which GPIO0~GPIO31 can be configured as 8 core interrupts.

The GPIO ports of 28335 can be divided into three groups, namely port A (GPIO0~GPIO31), port B (GPIO32~GPIO63) and port C (GPIO64~GPIO87).

1 GPXCTRL (A,B) Set the sampling frequency, determined by the field QUALPRD, = 00SYSCLOCKOUT, = n, for n system clocks

2 GPXQSELX(A,B,1,2) Sampling times

3 GPXDIR (A, B, C) Data direction setting

4 GPXPUD sets internal pull-up or not. It seems that after setting it to pull-up, it will become a peripheral function pin (some netizens also explained that when it is used as an output port, it will be set to pull-up in order to improve the driving ability, and it does not matter for the input port)

5 GPXDAT When used as output: writing 1 or 0 corresponds to output high or low level.

When used as input: read 1, 0 corresponding to input high, low level

6 GPXSET When used as an output: writing 1 will pull the pin high

7 GPXCLEAR When used as an output: writing 1 will pull the pin low

8 GPXTOGGLE When used as an output: writing 1 will output the opposite level of the current pin state 1---0 0---1

9 GPIOXINTnSEL n=1~7. GPIO0~GPIO31 can be configured as 7 core maskable interrupts XINT1~XINT7 interrupt and one non-maskable interrupt XNMI Interrupt.

10 GPIOLPMSEL Configure GPIO0~GPIO31 bits=1 The signal on the corresponding pin can wake up the CPU in stop or wait low power state.

11 GPxMUXn

To learn this part, you can first look at the GPIO registers, because the information explanation of the registers can basically be used to master the use of GPIO. After you have an understanding of GPIO, you will have a clearer understanding of the names and functions of each register.

Next, you can look at the previous introduction of GPIO registers to have a deeper understanding of GPIO, such as sampling rate, sampling times, etc.

Sampling frequency: divided into synchronous frequency and asynchronous frequency

Synchronous frequency: When the IO port is used as a normal IO, the signal sampling uses a synchronous sampling signal, SYSCLKOUT or SYSCLKOUT/n

Asynchronous frequency: When the IO port is used as a peripheral port such as SCI SPI eCAN I2C, there is no need to synchronize the sampling frequency, as the peripheral itself has an asynchronous sampling frequency.

When the system is reset, all pins are in input state by default, and are all common IO ports by default, and the sampling frequency is SYSCLKOUT by default. After reset, the pull-up resistors are pulled up by default except for ePWM (GPIO0~GPIO11).

Sampling times:

The sampling window is divided into two types: 3-times and 6-times, which are used to filter noise. The interval time of the sampling window of 3 is 2 sampling cycles, and the interval time of the sampling window of 6 is 5 sampling cycles.

Only when the signals collected within these 2 or 5 sampling cycles are exactly the same can the signal be said to be stable and the signal will be passed to DSP to eliminate noise in turn.

This post is from DSP and ARM Processors
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list