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

Incomplete transfers in SPIS and other strange behaviors

I have an existing product to which I need to add SPI to get Wifi compatibility. Basically the Nrf52 is acting as central and passes BLE events on to an ESP32 with Arduino to send it to Wifi.

I am using the SPIS example from SDK 15.0.0 and use the Arduino as a master.

However the transmissions are randomly truncated (the first byte always transfers correctly, then there are some DEF characters and the transmission may restart within the same block.

Here is an excerpt of what the output looks like on the Arduino:

No⸮⸮⸮⸮
Nordic
No⸮⸮⸮⸮
N⸮⸮⸮⸮⸮
Nordic
Nordic
Nordic
Nordic
N⸮⸮⸮⸮⸮
N⸮⸮⸮⸮⸮
N⸮⸮⸮No
Nordic
⸮⸮⸮⸮⸮⸮
⸮⸮⸮⸮⸮⸮

I already enabled the SPIS_NRF52_ANOMALY_109_WORKAROUND but that does not change anything.

I noticed some strange anomalies in the debugger (but I am not entirely sure those are real):

1. the breakpoint on    

 spis_xfer_done = true;

is triggered even though the event.evt_type is shown as NRFX_SPIS_BUFFERS_SET_DONE in the debugger.

Moreover, if I check the call stack it appears as if the library is actually calling the event handler with a pointer to the event, and does not pass by value as the function declaration is shown.

Is it possible that there is some mismatch between libraries / header files/. examples in SDK 15? I tried to compile the example from SDK 13 and it behaves the same.

I need some help since I am stuck at this bizarre issue and have a deadline coming up soon.

Thanks

Johannes

Parents
  • Hello

    I am interfacing between a SPI Master (microcontroller) with a SPI Slave (nRF52832 based chip) and I get the following output on both ends. The transmission seems to be occurring but the content in the receive buffer in the spi slave program is FF

    I am sending "abc" from Master but FF is being received by slave

    I am sending "abcd" from slave but yyyy is being received by master 

    Please help me understand where I am going wrong. - using IAR workbench and there are no issues in hardware connections and definitions/ initializations.  

    This is Slave output - all FF values 

    This is Master output 

  • not sure if posting this as a response to this closed thread is going to get you any answers. My problem was just an incorrect ground connection.

Reply Children
Related