cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Slave Problem: For STM32L151, If SPI2 is configured as SPI Slave, what is the expected frequency from SPI Master for which STM32L151 can transmit data without any issues?

Perumal Raj
Associate

STM32L151's AHB is at 32Mhz and APB runs at 16MHz.

Given in the datasheet that SPI Slave clock can be APB clock/2 max.

I have tried to transmit 7 bytes of data from STM32L151. I am able to receive data properly if my SPI master clock is configured to 2.5Mhz. At any higher frequencies, i am seeing data repetition.

For Instance, If I try to send data as 0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6. I am receiving data as 0xA0,0xA0,0xA0,0xA1,0xA2,0xA2,0xA3 and the transfer is incomplete.

I have tried using polling as well as DMA Mode. Still i face this issue at higher frequency.

I am suspecting that TXE is not set properly during the transaction at high frequency.

0 REPLIES 0