2020-07-31 07:43 PM
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 */
}
2020-07-31 08:16 PM
It appears the SVD file is incorrect on quite a few of the registers. The error starts at DIER which should be at 0x0C.
2020-08-01 03:34 PM
If @TDK 's table is for Tim16 and Tim17, then TIM16 looks strange, isn't it? Where is CEN bit of CR1 in TIM16?
2020-08-01 03:52 PM
> 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).
2020-08-19 02:45 AM
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
2020-08-19 07:28 PM
I use svd files from latest stm32wb pack 1.8.
2020-08-25 08:24 AM
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
2020-08-25 09:03 AM
@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.
2020-08-25 09:55 AM
2020-10-27 07:33 AM
@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-function