Maybe, I found a small bug in the spi_lld.c

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Alex
Posts: 39
Joined: Sat Feb 22, 2014 2:40 pm
Been thanked: 3 times

Maybe, I found a small bug in the spi_lld.c

Post by Alex »

In my opinion, procedure "spi_lld_start" must contain calling rccResetSPIx, to clear SPI FIFO of "garbage". At least in my case this action helped me. CPU - STM32F051R6C8
P.S. I use NIL, not ChibiOs, but I think they are similar
Alex
Posts: 39
Joined: Sat Feb 22, 2014 2:40 pm
Been thanked: 3 times

Re: Maybe, I found a small bug in the spi_lld.c

Post by Alex »

Additionaly information: SPI driver was used in SLAVE mode = "selfmade"
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Maybe, I found a small bug in the spi_lld.c

Post by Giovanni »

Alex, I think this problem is related to the slave mode, in master mode there is no way that the FIFO still contains data (it would be a bug should this happen).

Giovanni
samtatasurya
Posts: 22
Joined: Sun Nov 29, 2015 8:13 pm

Re: Maybe, I found a small bug in the spi_lld.c

Post by samtatasurya »

Alex wrote:Additionaly information: SPI driver was used in SLAVE mode = "selfmade"


Hi Alex,

I'm currently working on SPI which requires me to set up one STM32F0 as SPI Slave mode. Do you mind sharing your working code for the Slave?

Your help is greatly appreciated. Thanks!

- Sam
Post Reply