This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Read 8-bits from GPIO without intervention from the CPU

Hi!

I am working with an nRF5340.

- Is it possible to somehow fill an array with values read from a GPIO OUT register using DMA or PPI?

- Is it possible to assign a function to an EGU event and call it at a GPIOTE event using PPI?

- Is it possible to benefit from the two cores of the nrf5340 and continuously sample data in one core and use the other core for other types of processing?

- Should the network core in the nrf5340  only be used for BLE matters?

- When we send a BLE message using functions such as bt_nus_send(), does it interfere with the running of the application CPU, or is it fully handled by the network core (nRF5340)?

If it is possible, please point me to an example code or hints on how to do it.

Thank you.

Parents
  • Hello Thiago,

    Is it possible to somehow fill an array with values read from a GPIO OUT register using DMA or PPI?

    You want to read 8 bits from GPIO without CPU-is this 8 consecutive bits on the same pin or 8 bits in parallel on 8 pins (configured pin as input)? This may not possible. Could you please tell a bit elaborately why do you want to read the out register? GPIO out register is for setting the state of the pin when configured as an output; so this can not be assured it will reflect the actual state of the pin if it is configured as input. You may try out to see the result. 

    Is it possible to assign a function to an EGU event and call it at a GPIOTE event using PPI?

    Could you please elaborate this question (better with an example) ? Each instance of The Event Generate event (EGU) implements a set of tasks which can individually be triggered to generate the corresponding event. So, EGU triggers event, it is not possible to connect event to events over PPI. Only events to task.

    Is it possible to benefit from the two cores of the nrf5340 and continuously sample data in one core and use the other core for other types of processing? Should the network core in the nrf5340  only be used for BLE matters? When we send a BLE message using functions such as bt_nus_send(), does it interfere with the running of the application CPU, or is it fully handled by the network core (nRF5340)?

    The network core is basically restricted to the BLE stack. You should not use it for the application work if you want to use BLE. 

    Thanking you.

    Best Regards,

    Kazi Afroza Sultana

Reply
  • Hello Thiago,

    Is it possible to somehow fill an array with values read from a GPIO OUT register using DMA or PPI?

    You want to read 8 bits from GPIO without CPU-is this 8 consecutive bits on the same pin or 8 bits in parallel on 8 pins (configured pin as input)? This may not possible. Could you please tell a bit elaborately why do you want to read the out register? GPIO out register is for setting the state of the pin when configured as an output; so this can not be assured it will reflect the actual state of the pin if it is configured as input. You may try out to see the result. 

    Is it possible to assign a function to an EGU event and call it at a GPIOTE event using PPI?

    Could you please elaborate this question (better with an example) ? Each instance of The Event Generate event (EGU) implements a set of tasks which can individually be triggered to generate the corresponding event. So, EGU triggers event, it is not possible to connect event to events over PPI. Only events to task.

    Is it possible to benefit from the two cores of the nrf5340 and continuously sample data in one core and use the other core for other types of processing? Should the network core in the nrf5340  only be used for BLE matters? When we send a BLE message using functions such as bt_nus_send(), does it interfere with the running of the application CPU, or is it fully handled by the network core (nRF5340)?

    The network core is basically restricted to the BLE stack. You should not use it for the application work if you want to use BLE. 

    Thanking you.

    Best Regards,

    Kazi Afroza Sultana

Children
  • Hi.

    Thank you for your response.

    1 - My mistake. I meant to read from the GPIO IN register. the NRF SDK had examples of analog sampling using the SAADC and the timer, connecting both peripherals via the PPI. The SAADC could read many samples and fill an array with the sampled values. I would like to know if there is any way of doing something similar to that but sampling digital signals.

    2 - My mistake again. I mean if is it possible to trigger an EGU task from a GPIOTE event using PPI. Ex: press a button (trigger a GPIOTE event) and print a message via UART (using an EGU task). I thought I could use this approach to sample digital data without the intervention of the CPU.

Related