Hi all,
I am trying to generally gain a better understanding of the GPIOTE module and how it can benefit myself in the project I am working on.
I am essentially attempting to leverage the functionality of FreeRTOS Tasks, whilst also using GPIOTE.
What I am trying to achieve is using 1 GPIO for sending data, another GPIO for receiving data and using the FreeRTOS Tasks to carry out some processing of said data.
My idea was to send the board in to low-power or standby mode, and use the GPIOTE module to trigger the event handlers that I pass, which will simply resume the FreeRTOS task that corresponds to said GPIO activity.
Example
GPIO 1 receives signal state change -> event handler triggered -> FreeRTOS task resumed -> FreeRTOS task carries out processing -> FreeRTOS suspends itself when there's no more processing required.
GPIO 2 needs to send data and causes a change -> event handler triggered -> FreeRTOS task resumed -> FreeRTOS task carries out processing -> FreeRTOS suspends itself when there's no more processing required.
When tasks are suspended, I wish to go to low power and rely on an interrupt, let's say motion sensor or any other trivial example, which can also ideally be triggered by a GPIOTE event.
My questions would be:
1. Is this the most appropriate way of handling such a task?
2. Is this possible, and if so, is there supporting documentation that is up to date? The website appears to be littered with old examples.
3. Are there any hiccups I ought to be aware of in attempting to approach the project in this way?
Thanks,
mpw