According to my understanding of the gpio can be configured as an input, output,
As input, in through gpio_in data where to go?
As the output, the output data from where come?
In another gpio interrupt module can be generated according to gpio_in interrupt, another purpose is murphy gpio interrupt signal according to the input signal produce?
, every brother please give advice or comments
CodePudding user response:
GPIO is general input/output pins, usually used to control the peripherals, for example, the input can be used for the key, the output can be used for light, soc register through GPIO operation, register a position 1, the output pins, output level 0, the output low level; A high level input pin, register to 1, SOC can be obtained by querying the values of input pin, get the value of the input pin can also through the interrupt, interrupts can make the level changes of SOC rapid response to the input pin,CodePudding user response:
Can understand like this: input can be used for buttons: chip pad buttons, the data on the pad through gpio_in into gpio IP, and then the data within the gpio IP through the apb bus read into the CPU,Light output can be used to light: chip pad, CPU by apb bus data will be written into the gpio IP, then data through gpio_out into pad,
Discussion above correct? Please advise
In addition, based on the input pin value an interrupt, apb bus read when the interrupt information or pin value?
CodePudding user response:
Right, GPIO to register values corresponding to get input pin level can be read CPU registers, can be ignored, CPU write a value to a register, produce the corresponding output pin level interrupt, is sent to the CPU information, example, set the pin interruption of high level, high electricity at ordinary times, when the pin CPU executes corresponding interrupt function, in the interrupt program can be written to want to do in this situationCodePudding user response:
Right, GPIO to register values corresponding to get input pin level can be read CPU registers, can be ignored, CPU write a value to a register, produce the corresponding output pin level, an interrupt is sent to the CPU information, example, set the pin interruption of high level, high electricity at ordinary times, when the pin CPU executes corresponding interrupt function, in the interrupt program can be written to want to do in this situationCodePudding user response:
Is the most important feature of the interrupt input, used as a test input state