This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 15 software crash during SPI session.

Hi

After migration from SDK 14.0.0 to 15.0.0 our FW crashes during SPI session

We use EasyDMA , so we use SPIM driver directly without wrapper  nrf_drv_spi

The crash occurs in spim_xfer  function, immediately after spim_int_enable function calling.

We found some weird workaround. The problem disappears if we add delay in spim_xfer  function, immediately after  nrf_spim_task_trigger(p_spim, NRF_SPIM_TASK_START);

It looks like voodoo, so I would like to know what's going on and what's a write way to manage the problem appropriately.

Regards

Parents
  • Michao and MartinBL,

    Was the cause of this problem ever diagnosed? Thanks.

    We've seen what sounds like the same problem with the nRF52840 DK, using SD140 v6.1.0, and nrfx v1.3.1. We are not using the full SDK, only nrfx. After we advertise a BLE peripheral, a spim_xfer() causes what appears to be a reset. If we create the peripheral but don't advertise, the problem does not occur. The problem occurs with SPIM, but not with TWIM or UART peripherals.

    I don't have a C test case right now because the code that causes this is written in CircuitPython, which is implemented as described above. But I could probably work one up if necessary.

    I set the HardFault_Handler to loop on a fault, so I could get a backtrace, but the handler doesn't appear to be entered, so I'm not sure what's causing the reset.

  • Hi,

    Not to my knowledge. If your system resets it is most likely recovering from a hard fault or (dependent on your compilation settings) an assert. 

Reply Children
Related