hardware CS not working when using BLE with nRF5340DK

Hello,

I'm using NCS 1.4.99 with a nRF5340DK and want to use the hardware CS of the SPI and also use BLE.

Here is a simple code that work on a nRF5340PDK but only work on a nRF5340DK when CONFIG_BT is not defined.

.

Parents
  • Hi,

    I tested your code and I see that the CS pin toggles as expected when CONFIG_BT is set to n but not when set to y. I am not able to explain this right now though so I need to get back to you tomorrow.

    Edit: I just noticed that this issue only occurs when building for secure mode (nrf5340dk_nrf5340_cpuapp). Building for non-secure (nrf5340dk_nrf5340_cpuappns) CS works as expected.

  • Thanks for this information but what do I need to do to run it in non-secure ?

    I have tried with SES to build it for non-secure but it crash when calling nrfx_spim_init().

    After that, I saw that SPM was not listing SPIM4 to the console, so i use SPIM3 because it was listed. Now my code get stuck in nrfx_spim_xfer() waiting for NRF_SPIM_EVENT_END that never come.

Reply Children
Related