Hi all,
I had a problem using the spim function of nrf52832 to drive st25r3911, and now I'm pretty sure it's the problem here in spi.
here is the code for transmission:
and when st25r3911 triggers an interrupt, the following code is called:
PlatformSpiTxRx () in the code is equivalent to nrf_spi_tx_rx ();
Then spi will send and receive data normally, but no other code will be executed when it is executed here, so it seems to be stuck in this place:
In addition, I used the logic analyzer to capture the data at this stage:
Where D4 is the interrupt signal, and the others from d0 to d3 are: cs,mosi,miso,clk;
As you can see from the data, after executing the 0x57 instruction, I received the data 0x028000 from miso, but then the program got stuck, and I couldn't find any reason.