Skip to main content
dungeonlords789
Associate III
Aug 1, 2020 2:43 AM UTC
Question

STM32WB55 incorrect svd file

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

This topic has been closed for replies.

13 replies

TDK
Aug 1, 2020 3:16 AM UTC

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""."
dungeonlords789
Associate III
Aug 1, 2020 10:34 PM UTC

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
Aug 1, 2020 10:52 PM UTC

> 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
Aug 19, 2020 9:45 AM UTC

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

dungeonlords789
Associate III
Aug 20, 2020 2:28 AM UTC

I use svd files from latest stm32wb pack 1.8.

Imen Ezzine
ST Employee
Aug 25, 2020 3:24 PM UTC

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

dungeonlords789
Associate III
Aug 25, 2020 4:03 PM UTC

@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
Aug 25, 2020 4:55 PM UTC

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

-Imen

dungeonlords789
Associate III
Oct 27, 2020 2:33 PM UTC

@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

dungeonlords789
Associate III
Nov 3, 2020 1:17 AM UTC

I check for TIM17. SVD files by @Imen Ezzine​ is correct. But in 1.9.0 pack there are old SVD files.

@Christophe Arnal​ 

Imen Ezzine
ST Employee
Nov 9, 2021 2:31 PM UTC

Hi dungeonlords789,

Thank you for your feedback!

We are always trying to enhance our SVD quality and we will make sure to take this into consideration for our next release.

Regards,

-Imen

dungeonlords789
Associate III
Nov 9, 2021 4:14 PM UTC

Also check RTC registers!

0693W00000GWyQlQAL.png