NRF54L15 SPIS needs CONSTLAT

I just wanted to notify that I need to set CONFIG_SOC_NRF_FORCE_CONSTLAT=y in order for a NRF54L15 to be able to respond as a SPI slave (SPIS) using nrfx SPIS code.

Otherwise it only works when a JLink debugger is connected, but otherwise not, after it has been rebooted for example and the debugger is physically connected, but not "active"...

My configuration uses SPIS20 and GPIO pins from port 1, so as far as I understand it's not cross-domain?

I am noting this mostly for other people who might get into a similar situation. Also I'm curious to hear if there is an explanation why this is necessary? 

Parents Reply Children
  • First off, I would like to say that enabling CONSTLAT is not a problem in my use case, since we are not battery powered. But I am happy to find out more about the situation.

    Your comment about the response time is correct: if i change the code on the master (ESP) side to toggle CS manually by GPIO, before and after the SPI transaction, then it already works, i don't even need to add a delay. I use the build-in CS management normally, which seems to be too fast. Unfortunately I don't have the tools right now to trace the SPI bus to see the difference in timing.

    I am using my own custom board which has a NRF54L15 connected to an ESP32-C5 (spi master).

    I am using NCS v3.2.1.

    I have complied and flashed the test case to a NRF54L15DK but don't know how to see if it works or not.

  • Bruno Randolf said:
    Your comment about the response time is correct: if i change the code on the master (ESP) side to toggle CS manually by GPIO, before and after the SPI transaction, then it already works, i don't even need to add a delay.

    Sounds good, then root cause is that you need to have a delay between CS low and first clock when waking up from low power idle state.

    Kenneth

Related