cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 SPI Capabilities

sallysisavath
Associate
Posted on June 23, 2012 at 22:11

I'm using the STM32F103 SPI1 bus to control two IO expanders. I'm having an issue where the SPI gets locked up and disables communications to both expanders without being able to recover itself. Looking more into the expanders' datasheets, one expander requires the data frame to be 8bit, the other requires a 16bit, with the CS pulled high after each word is transmitted. I'm trying to figure out if this is the issue that's causing the lockup. Currently the SPI is set up to use 8bit data frame and the DMA is facilitating the communication. I'm sending the IO expander constant 8bit data, without pulling the CS high after 16bits. I'm thinking this is causing an overrun error since the next time CS is pulled low for that expander, it's trying to send back data which some times isn't read. If this is my issue of the lock up, and to solve it, could I set up the SPI to use the 8bit data frame and send 2 bytes at a time, still using the DMA so the next byte is ready? Or would this still cause some potential issues?

#spi-dma-stm32
0 REPLIES 0