cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 incorrect svd file

dungeonlords789
Senior III

I enable counter by __HAL_TIM_ENABLE(&htim17);

and I see in debugger that PSC register incrementing, not CNT. CNT is always zero. Are the registers messed up?

Settings are from CubeIDE 1.41 with stm32wb pack 1.8:

static void MX_TIM17_Init(void)

{

 /* USER CODE BEGIN TIM17_Init 0 */

 /* USER CODE END TIM17_Init 0 */

 /* USER CODE BEGIN TIM17_Init 1 */

 /* USER CODE END TIM17_Init 1 */

 htim17.Instance = TIM17;

 htim17.Init.Prescaler = 0;

 htim17.Init.CounterMode = TIM_COUNTERMODE_UP;

 htim17.Init.Period = 65535;

 htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;

 htim17.Init.RepetitionCounter = 0;

 htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;

 if (HAL_TIM_Base_Init(&htim17) != HAL_OK)

 {

   Error_Handler();

 }

 /* USER CODE BEGIN TIM17_Init 2 */

 /* USER CODE END TIM17_Init 2 */

}

0693W000003BsbtQAC.png0693W000003BsbyQAC.png

13 REPLIES 13
TDK
Guru

It appears the SVD file is incorrect on quite a few of the registers. The error starts at DIER which should be at 0x0C.

0693W000003BsdGQAS.png

If you feel a post has answered your question, please click "Accept as Solution".

If @TDK​ 's table is for Tim16 and Tim17, then TIM16 looks strange, isn't it? Where is CEN bit of CR1 in TIM16?0693W000003BtHQQA0.png

TDK
Guru

> TIM16 looks strange, isn't it? Where is CEN bit of CR1 in TIM16?

 

It's bit 0 of CR1, right there in the table. Seems fine to me.

Edit: Oh, now I understand.

Agreed, CEN is missing in the SVD file as well (but the table seems correct).

If you feel a post has answered your question, please click "Accept as Solution".
Imen Ezzine
ST Employee

Hi dungeonlords789,

Thank you for your feedbacks!

It will be helpful if you can mention the version of the svd file with the errors?

Meanwhile I will check to see if we did fix this in our latest version. If not we will fix in next release.

-Imen

I use svd files from latest stm32wb pack 1.8.

Imen Ezzine
ST Employee

Hi,

I did check for you and unfortunately some address Offset for the TIM17 are incorrect which explains the seen behavior. Also TIM16 should have same fields description as TIM17 to be aligned with RM.

We fixed this in our SVD fies. Let me know If you are interested in the updated SVD file with the fix so I can attach it.

-Imen

@Imen Ezzine​ 

I am wating stm32wb pack 1.9 with correct SVD files for my path \STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.productdb.debug_1.4.0.202007081208\resources\cmsis\STMicroelectronics_CMSIS_SVD

Also you can add here please.

Imen Ezzine
ST Employee

I am adding here new fixed SVD files for STM32WB55 with updated TIM16/17 aligned with RM0434 Rev 6.

-Imen

@Imen Ezzine​  Did you fix SVD in 1.9.0 pack? I can no see Patch tab in 1.9.0. This is also another bug about WB55 systick problem https://community.st.com/s/question/0D50X0000B8hnwCSQQ/stm32wb55-haldelay-function0693W0000059U9VQAU.png