Skip to main content
SWenn.1
Senior III
June 18, 2021
Solved

setting a register at bare metal layer??

  • June 18, 2021
  • 2 replies
  • 924 views

I am using TIM1 in the STM32WB55. I used CubeIDE and HAL to set everything up. Based on a button push I would like to update the counter period to a value in an array. I prefer not to

		htim1.Init.Period = period[flag];
		HAL_TIM_Base_Init(&htim1);

as it seems silly to go through all the macros to re-init just for a register. Can someone tell me what is the syntax to just update the register itself?

Thanks

Steve

This topic has been closed for replies.
Best answer by Mike_ST

Maybe TIM1->ARR = Period;

will do the job.

2 replies

Mike_ST
Mike_STBest answer
ST Technical Moderator
June 18, 2021

Maybe TIM1->ARR = Period;

will do the job.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
SWenn.1
SWenn.1Author
Senior III
June 18, 2021

Thanks Mike...

I believe that seems to work

Steve