cancel
Showing results for 
Search instead for 
Did you mean: 

setting a register at bare metal layer??

SWenn.1
Senior III

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

1 ACCEPTED SOLUTION

Accepted Solutions
Mike_ST
ST Employee

Maybe TIM1->ARR = Period;

will do the job.

View solution in original post

2 REPLIES 2
Mike_ST
ST Employee

Maybe TIM1->ARR = Period;

will do the job.

SWenn.1
Senior III

Thanks Mike...

I believe that seems to work

Steve