stm32f103_fastNP icon indicating copy to clipboard operation
stm32f103_fastNP copied to clipboard

port to stm32f407

Open akargarelc opened this issue 11 months ago • 4 comments

dear sir, i want to use this project for stm32f407vgt6 i have some problems in ws2812_led.c, such as error of DMA1->IFCR = (DMA_IFCR_CTCIF5 | DMA_IFCR_CHTIF5); please help me thank you very much

akargarelc avatar Feb 28 '24 19:02 akargarelc

Ah yes, the F4 series have different DMA registers. I actually wrote an F4 port a year or two ago, but kind of forgot about it. I'll clean it up and upload it in a few days (too much going on at work right now).

evilwombat avatar Feb 29 '24 11:02 evilwombat

Ah yes, the F4 series have different DMA registers. I actually wrote an F4 port a year or two ago, but kind of forgot about it. I'll clean it up and upload it in a few days (too much going on at work right now).

thank you very much!

akargarelc avatar Feb 29 '24 17:02 akargarelc

Hello. I have uploaded the F411 port here: https://github.com/evilwombat/stm32f4_fastNP

There was some funny logic related to generating the reset pulse (for some reason this might have been hanging my board, so I had to remove it a while back) - I will have to clean this up later.

I am visiting family so I don't have my STMs with me. Please let me know if this works.

evilwombat avatar Mar 01 '24 08:03 evilwombat

@evilwombat It seems to work just fine, I've ported the code to STM32F401CC6U (aka black pill) and everything is running perfectly. A major change is that I've rewritten the strip refresh code to use interrupts to fill the ping-pong buffer and set-reset the ARR for the reset period and PWM generation (very close to how Martin Hubáček did that in the original project). Works on both F103 and F401. Thank you for sharing this!

RomanKapitonov avatar Mar 09 '24 19:03 RomanKapitonov