-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing to TIM3 and PIN PC7 #4
Comments
Hi, you need to change a lot of things. Hmm, bad news, according to DMA2 request mapping table there is no any other timer in this table. And DMA1 cannot be used for reasons above. So I'm afraid it could not be used with any other timer. Then the switch to PC7 is easy: And here in the array you set the "channel" to value 7 so its driving pin 7 Something like:
Try to apply these edits. If you could not get it running, append your new code and I'll take a look at your edits. |
Thank you!!!! the mcu I'm using is a STM32F411RE. If I'm reading the DMA mapping correctly I could use TIM1 as long as I can use GPIOC and Pin 7 (board is already completed). However I need to TIM1 to run off the internal clock and not the external crystal due to pin conflicts. I have attached my ioc file so you can see. |
Then you would need to use some other library on F4. There is no other timer in the DMA2 table. THe F4 and F3 libs in my Github is using DMA > GPIO transfers and main advantage is that you can simple drive all 16 bits in single port with really low memory footprint. However the STM32L0 don't have DMA > GPIO capability so I changed the signal generation to the timer compare PWM. So if you are using only one output for single ws2812 digital LED strip, the STM32L0 implementation could help you. But you need to port it yourself, configure PWM on the timer, set correct DMA1 channels/streams. Please check also the DMA > TIMer section of my page Martin |
Per our twitter conversation:
///
Hi. It's lot of things that needs to be changed when you choose another timer. My guess is that you need the TIM2 to some specific task/PWM.
Please start the Github issue and post the source code. Thanks, we will solve the problem there.
///
except I actually need to use TIM 3
attached are the changes I made, if I just change line 94 to TIM1, uncomment lines 103 and 104 things work.
change 94 to TIM3 comment lines 103 and 104 and uncomment 105 and 106 and they don't. Not sure I understand why. All other changes in the files are to use PC7 and remove the hardcoded use of TIM1-> type stuff.
Thanks for all the help in advance!!!!!!
STM32F4_WS2812B.zip
The text was updated successfully, but these errors were encountered: