STM32F4 using timer channels to generate shifted pulses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-08 10:59 AM
Hi, I want to generate short pulses on channels 1, 2 and 3 of TIM4. Pulses on each channel must be shifted relative to other channels, just like on image below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-08 11:05 AM
Toggle mode has been used to get specific edge placement.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-08 11:34 AM
So all I should do is to set toggle mode at the beginning and in the interrupt handler control only CCRx, right?
Could you please also tell me what actually is TIM_OutputState? I couldn't get any information if should i pass the TIM_OutputState_Enable or TIM_OutputState_Disable...Thank You in advance, Sir.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-09 8:33 AM
Hi varsheim,
I recommend that you have a look to the example ''TIM_ComplementarySignals'' in the STM32CubeF4 library package where you find how to ouptout signal with dead timer insertion ; at this path STM32Cube_FW_F4_V1.13.0\Projects\STM324xG_EVAL\Examples\TIM\TIM_ComplementarySignals-Hannibal-- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-09 8:53 AM
I've generally initialized the timer, and initial phase angles, and then advanced the phase angles in the CCRx as each of the prior ones have hit. For higher frequencies one might need to decimate interrupt loading using DMA to load from tables.
I've posted examples of the toggle mode method on the forum, but I'm not a motor guy, and this isn't how I use STM32 parts.Up vote any posts that you find helpful, it shows what's working..
