2022-01-17 06: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?
2022-01-17 06:50 AM
JW
2022-01-17 07: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'?
2022-01-17 08: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.
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.