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

How do I set spi slave to idle state after rx/tx a message?

After startup, I was able to send a spi msg from the master (app chip) to the slave(nordic). But when I try to sent the second message, I did not get any response from the nordic. when I look at the variables, I can see that the first message is correctly saved in the buffer.

watch variable.xlsx.

The function ser_conn_rx_process() return err_code is 0. It seem to me that everything is successfully transmitted for the first time. The only thing I that can see changed during the second message is SPIS1 EVENTS_END, EVENTS_ACQUIRED, and SEMSTAT go from 0 to 1. SPIS1 AMOUNTRX and AMOUNTTX changed to 2.

Also, if I reset the nordic after the first message, I was able to sent the second message. It seem to the that after the first message, the Nordic did not correctly return to the idle state.

I worked on a custom board which base on the example ble_connectitvity_s130_pca10028

Related