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

SPIS affected by UART setting

Hi, I have a very sophisticated program on nRF51822 with SD120 which uses SPIS (as an RX for another board) and UART. I used "spi_slave_example" as a base program.

I am not sure why the transmitter starts to send data packets for the very first packets the RX data is wrong. Interestingly, when I execute this two lines below the RX data is always good!

NRF_UART0->ENABLE        = (UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos);
NRF_UART0->TASKS_STARTTX = 1;

I probably have some timing issue but I am not sure how I can debug program. Do you have any suggestion to resolve the problem? or do you have any idea why enabling the UART port cause something on SPIS as they have different Peripheral IDs?

FYI, the UART pins are not connected to any where on hardware. I noticed that when the RX data is wrong the rx_amount is not equal to the number I set to receive.

Thanks, Ehsan

Related