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

nRF53 DPPI and low-power/low-latency

I am using the DPPI feature in the nRF5340 to trigger an SPI transaction from a GPIO edge with a delay.

In more detail:

GPIOTE IN event triggers RTC clear task

RTC compare event triggers SPIM start task

This works fine so far, now I am looking into reducing power consumption.

The low-power mode of GPIOTE seemed like what I should use. However when I enable it by setting GPIOTE.LATENCY=LowPower, the SPIM transaction is no longer triggered correctly. MOSI goes low but nothing happens on the chip select and clock pins.

My suspicion is that using low-power mode disables the HF clock, which is not re-enabled correctly when SPIM needs it.

When I leave GPIOTE low power mode enabled but set the constant latency sub-mode (CONSTLAT task), the SPIM transaction works fine.

I have several questions:

1. Is it expected behaviour that a LFCLK peripheral can't trigger a HFCLK peripheral, such as in my case?

2. What is the relationship or difference between CONSTLAT sub-mode and GPIOTE.LATENCY=LowPower?

3. The specification states in section 7.14.4: "CONFIG.POLARITY=Toggle is not supported for LATENCY=LowPower." Does this apply to both event and task modes or only to event mode?

4. The same section in the specification also says that the SENSE fields must be set correctly, but it seems not to be necessary. The reason for asking this is that the Zephyr GPIO implementation alters this field in several places, and I found it error-prone to always have to set it after e.g. calling gpio_pin_interrupt_configure. What exactly happens if the SENSE field is not as expected, when GPIOTE is in low-power mode?

Parents Reply Children
No Data
Related