cancel
Showing results for 
Search instead for 
Did you mean: 

Simple SPI Controller Behavior Question

Am I correct in thinking that an SPI controller in master mode connected to nothing else will send a clock burst whenever it is transmitting?

I am troubleshooting an SPI application and it seems as if the master is never transmitting. When I scope SCLK (set slow, 1.5 megabits per second), it remains at ground and never toggles. This is in DMA mode. I see a burst when I use polling.

3 REPLIES 3
S.Ma
Principal

Look into SPI examples from Cube package of the used STM32 familly. Especially the NUCLEO board.

There should be polling, interrupt, DMA based examples. With 5 lines of text describing the issue we can't give much clues.

I am using a Nucleo-H743ZI board. In fact, I am testing by using the SPI_FullDuplex_ComDMA project, but with only one board. I set the project for master (uncommented the #define for that). The project flashes the green LED when started and as I scope the SCLK line and push the user button I see no clock burst on SCLK. Today I will try with the polling version. This is under firmware repository V1.3.0.

I'm doing this because I have a project that needs SPI to transmit via DMA and while I can make my end project work with polling, it also doesn't send a clock burst for my end project either. So I've switched to the example project as a troubleshooting method. This is why I'm asking the question - will an SPI controller on STM32 as master send a clock burst when a transmit using DMA is requested. I want to make sure I truly understand the process.

Update:

At this point, I've tested both the DMA and polling versions. When I scope the SCK pin on the polling version, I clearly see a clock burst. When I do the same with the DMA version, there is no clock burst.

I have tried using the default pins found in the example as well as a different set of pins. Both cases do the same thing.