cancel
Showing results for 
Search instead for 
Did you mean: 

How to active WS2812LED on stm32G071CB?

SAram.11
Associate

Hi,

I took code from:

https://controllerstech.com/interface-ws2812-with-stm32

and made the adjustment to my MCU (stm32G071CB). but it didn't work.

I manage to generate pulses from PWM with DC of 66% in 800K but not through DMA.

I also try to ran it from NUCLEO-F767ZI but again I mange to create pulses from PWM with DC of 66% in 800K but not through DMA..

can you help me?

Am I miss something?

Do I have HW problem that prevent it to run in the right freq?

THX in advance,

Shimon.

2 REPLIES 2

Perhaps show the code/modification you made.

Look at TIM/DMA examples within the CubeG0 libraries

>>Do I have HW problem that prevent it to run in the right freq?

What frequency is it running at?

All the STM32 should be able to generate 800 KHz, you might have to change the CPU/BUS frequencies so you can get to some integer multiple of the desired frequency, and also have enough resolution to tune the duty cycle appropriately.

None of the parts are likely to support such high interrupt rates, but all should be able to drive DMA into a TIM with a memory based pattern buffer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SAram.11
Associate

Hi,

We finally found the LED strip was connect wrong.

The HW ENG. connect the din in the opposite direction

THX..