2020-07-21 04:18 AM
I would like to know what is the correct way to disable a timer’s ARR preload function using the HAL library ? And once that’s done, does the ARPE bit stay low for the whole runtime, or does it have to be cleared again regularly or after specific events? (If yes, which?)
Solved! Go to Solution.
2020-07-21 06:06 AM
Set htimx.Init.AutoReloadPreload to TIM_AUTORELOAD_PRELOAD_DISABLE before you call HAL_TIM_***_Init().
It'll stay the way you initialize it unless you re-initialize it with TIM_AUTORELOAD_PRELOAD_ENABLE.
2020-07-21 06:06 AM
Set htimx.Init.AutoReloadPreload to TIM_AUTORELOAD_PRELOAD_DISABLE before you call HAL_TIM_***_Init().
It'll stay the way you initialize it unless you re-initialize it with TIM_AUTORELOAD_PRELOAD_ENABLE.
2020-07-21 07:43 AM
The timer handle's Init member is of type TIM_Base_InitTypeDef:
typedef struct
{
TIM_TypeDef
TIM_Base_InitTypeDef Init;
HAL_TIM_ActiveChannel Channel;
DMA_HandleTypeDef *hdma[7];
HAL_LockTypeDef Lock;
__IO HAL_TIM_StateTypeDef State;
}TIM_HandleTypeDef;
typedef struct
{
uint32_t Prescaler;
uint32_t CounterMode;
uint32_t Period;
uint32_t ClockDivision;
uint32_t RepetitionCounter;
} TIM_Base_InitTypeDef;
There is no htimx.Init.AutoReloadPreload -- am I using an outdated version of the HAL library ? (It came bundled as part of the GNU MCU Eclipse STM32F4 project template.)
2020-07-21 08:07 AM
2020-07-29 02:02 PM
I updated my drivers and that worked