2018-04-07 03:15 AM
I want to communicate STM32L053 and STM32L151 using the SPI,STM32L0 as master and STM32L1 as slave.
The flow is to catch the character from the USART of L0 and transmit it to the MOSI of the L0 and slave(L1) has to receive and retransmit it to the MISO pin and display it on the USART.
After recieving character from the MISO pin L1 has to send and display it on the USART.
But Slave recieves the some garbage value, both boards run on the same frequency of 24 MHz.
Is there any solution for this problem?
Thank you!
#hal-spi #stm32l0 #stm32l12018-04-07 08:03 AM
>>Is there any solution for this problem?
Probably, you're in control here.
If you lose synchronization you might need to reset either side of the link. If it is happening a lot you might want to review the connectivity, and how much time the slave is spending on servicing the SPI, likely going to want to decouple the read from SPI from the write to the USART/Display.