cancel
Showing results for 
Search instead for 
Did you mean: 

stm32U073 tamper 4 push button will hardfault

russell_hsiao
Associate

hi ,

i enable tamper4 and RTC in stm32mx and only enable bit RTC_CR_TAMPTS, TSE=0
no other code add into rtc.c or tamper.c 

russell_hsiao_1-1748237400474.png

Using  debug mode to clear TSF and CTAMP4F.
when push button will happen hard fault.  
Only two code  in main while loop "led" and "hal_delay", if i remove HAL_Delay , will not happen . 
someone can help me?

russell_hsiao_0-1748236937233.png

HAL_Delay(1000);

HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_11);

3 REPLIES 3
Saket_Om
ST Employee

Hello @russell_hsiao 

Please check the article below to debug hardfault:

How to debug a HardFault on an Arm® Cortex®-M STM3... - STMicroelectronics Community

Could you share your .ioc file please then we can assiste you more effectively. 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om

hi , i upload my .ioc
and here i disable  those bit. 

/* USER CODE BEGIN RTC_Init 2 */

__HAL_RTC_TIMESTAMP_DISABLE(&hrtc);

CLEAR_BIT(RTC->CR, RTC_CR_ITSE);

CLEAR_BIT(RTC->CR, RTC_CR_TAMPALRM_TYPE);

/* USER CODE END RTC_Init 2 */

russell_hsiao_2-1748274120299.png

 

Hello @russell_hsiao 

Could you check without WWDG init please? 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om