cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F769I-DISCO Driving WS2813b with SPI, MOSI always high

Justin Kohlenberg
Associate
Posted on May 03, 2018 at 13:37

I have recently acquired an STM32F769I-Discovery board and am trying to drive a strip of 60 addressable leds (ws2813b).

Because I don't want to use the processor to bit-bang data to the leds (I want the processor free to process other data), I decided to use the SPI peripheral with DMA to create a waveform with the right timings for the ws2813b leds.

I have a working SPI output with the right timing, but the MOSI signal is always high after a transfer completes (I only use the MOSI signal, which connects to the data in of the first LED.

I did some research on the internet and found more people using SPI with DMA to drive these leds, and they fixed this problem by pre- and appending the data with a 0 byte.

I have replicated this pre- and appending of a 0 bytte, but MOSI continues to be pulled high after the last 0 byte (see attached image)

I am not that familiar with the hardware, or the SPI protocol, but am hoping some of you can shed some light on this

#mosi #spi #stm32f7-dma
1 REPLY 1
Posted on May 03, 2018 at 22:35

It appears that you change the MOSI pin's mode in GPIO, or enable/disable SPI before/after the transmission and have some pullup of sort.

SPI in itself should leave the last output bit indefinitely on.

Read out and post the content of SPI and relevant GPIO registers outside communication.

JW