cancel
Showing results for 
Search instead for 
Did you mean: 

SPI1 receive wrong data in normal mode but ok in debug

foxliang
Associate
Posted on July 22, 2009 at 02:13

SPI1 receive wrong data in normal mode but ok in debug

1 REPLY 1
foxliang
Associate
Posted on May 17, 2011 at 13:18

Hi, guys:

I am using STM32F103VBT6 with ULINK2 and KEIL uVision 3.

I have STM32 SPI1 as slave, another MCU SPI as master, with CPOL and CPHA of slave and master all be set 0.

Everything is ok when i use ULINK2 to debug, but after power reset, STM32 is in normal mode, STM32 always receive incorrect data. It seems that the receive data is half of correct data.

However, if i set CPOL and CPHA of master all 0, and CPOL and CPHA of slave all 1, STM32 can reveive correct data in normal mode but incorrect in debug mode.

Thank you very much for any advice...