UC GEE
UC GEE
DIIDevHeads IoT Integration Server
Created by UC GEE on 6/25/2024 in #middleware-and-os
Are there any known issues with timer configuration in CubeMX for the STM32F407VG?
@Middleware & OS I'm developing a low-level PID controller for motor speed control on an STM32F407VG microcontroller. I'm using the STM32CubeMX tool to generate the initial project setup. However, I'm encountering issues during timer initialization for the motor speed measurement. When I try to configure Timer 2 in CubeMX for capture mode, I get an error message stating
TIMx_CR1: Unable to configure Update Event source (URS) as it depends on the One Pulse Mode (OPM) bit.
TIMx_CR1: Unable to configure Update Event source (URS) as it depends on the One Pulse Mode (OPM) bit.
I've reviewed the STM32F4 reference manual and ensured the OPM bit is set to 0 (disabled) in the TIMx_CR1 register. However, the error persists. I'm using STM32CubeMX version 6.1.0. Can anyone advise on how to resolve this specific error and configure Timer 2 for capture mode for motor speed measurement on the STM32F407VG? Are there any known issues with timer configuration in CubeMX for this specific microcontroller? Here's a relevant snippet of my CubeMX timer configuration: Clock Source: Internal Clock (APB1 clock) Prescaler: 0 Auto-reload: 65535 (maximum count) One Pulse Mode (OPM): Disabled (cleared in TIMx_CR1) Update Event Source (URS): Update generation on counter overflow/underflow (selected in CubeMX)
11 replies