Project

General

Profile

Explain the design of interrupt via GPIO pins more clear

Added by Johan Henning almost 2 years ago

To me the following text in the User Manual is confusing:

In bareboard we are controlling task using timer interrupts, for example While executing the code the level low interrupt is triggered for one second, once this happens the rest of the code is not executed and will not execute the step function. It will keep interrupting and only the ISR will be executed during the whole period.

I think I understand it and if so I suggest to change it for example to this explanation:

In bareboard we are controlling task execution using timer interrupts.
When using a GPIO level_low_interrupt or a level_high_interrupt the Interrupt Service Routine (ISR) will be executed as long as the level interrupt is active and the normal step function will not be executed during this time.
Normal level sensitive interrupt behavior is that an interrupt source latches an interrupt service request and that the ISR resets the latched level sensitive interrupt when it is executing.

Another question/remark is: Why are there two places to control the interrupt behavior of a GPIO input pin (in the Digital Input block and in the GPIO Pin Map block). And how are they related to each other? Can I use only the Digital Input block and use GPIO interrupts? Or is the Pin Map block required as well to enable interrupt functionality?


Replies (1)

RE: Explain the design of interrupt via GPIO pins more clear - Added by Shawn Sebastian Pulle (ฌอน) almost 2 years ago

Hi Johan,

Thank you for the feedback. We understand the current explanation of how the interrupt is working is unclear and confusing. We will take your suggestion into consideration and make necessary changes to the user manual in future releases.

GPIO Pin Map block is the only place to enable interrupts for GPIO pins. If enable interrupt is not selected in the GPIO Pin Map block, the GPIO input block will deselect that particular pin from the block mask when transfer mode is set to interrupted.
Therefore unless pins are selected to be "enable interrupt" in GPIO Pin Map block, none of the pins can be used when using interrupted transfer mode of the GPIO input block.

We hope this explains the need for both GPIO input block and GPIO Pin Map block to setup GPIO interrupts.

    (1-1/1)