CubeIDE/CubeMX Timer Configuration (Slave Mode / Gated Mode)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-17 6:42 AM
I am trying to test Slave Mode / Gated Mode on TIM10 on my NUCLEO-STM32F401RE EVK.
RM0368 describes this mode as:
"Slave mode: Gated mode The counter can be enabled depending on the level of a selected input."
I am trying to use CubeIDE to generate the code, but I do not see this can be configured through the tool.
I don't see a way to configure any slave mode.
Is it true that CubeMX can't generate code for this configuration?
- Labels:
-
STM32CubeMX
-
STM32F4 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-17 6:50 AM
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-17 7:52 AM
Note: The markup posted is for TIM2 to TIM5. I am attempting to use TIM10. However, the Reference Manual makes it look like the register referenced (TIMx_CCER) appears to have similar functionality.
JW:
I interpret the post to mean that I can use CCIP to achieve the configuration I need.
Is this correct?
... if so ...
I don't have much experience generating code with CubeMX/CubeIDE.
1) Am I correct in that the tool can't create code for the configuration I need?
2) Should I be writing the code to call the appropriate HAL functions 'by hand'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-17 8:43 AM
I think I figured out why there was no way to select Slave Mode for TIM10. Although the Reference Manual groups TIM9 to TIM11 in the same section of General Purpose Timers, only TIM9 has TIMx_SMCR registers implemented.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-17 10:21 AM
Update: I was able to successfully use CubeIDE/CubeMX to generate code for TIM9.
I had to disable UART2 on my NUCELO EVK to use PA2, I tested successfully with a pulse generator.
