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
Maybe, I found a small bug in the spi_lld.c
Moderator: RoccoMarco
Re: Maybe, I found a small bug in the spi_lld.c
Additionaly information: SPI driver was used in SLAVE mode = "selfmade"
- 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
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
Giovanni
-
samtatasurya
- Posts: 22
- Joined: Sun Nov 29, 2015 8:13 pm
Re: Maybe, I found a small bug in the spi_lld.c
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