embeded/Cortex-M3 STM2021. 8. 2. 19:57

리셋핀에 강하게 외부에서 풀업이 걸려있을 경우

내부 리셋에 의해서 리셋이 되지 않는 문제가 발생하지 않는다.

 

어쩌면 HAL_NVIC_SystemReset() 함수가 리셋핀을 조작해서 자기 자신이 스스로 LOW로 낮춤으로

물리적은 하드웨어 리셋을 구현해놨는데 외부에서 풀업이 걸려있으면 내릴수가 없으니

리셋이 안걸리는거 아닐려나?

 

[링크 : https://kaizen8501.tistory.com/26]

[링크 : https://community.st.com/s/question/0D53W000006EROWSA4]

[링크 : https://community.st.com/s/question/0D50X00009XkZUg/problem-with-nvicsystemreset]

 

+

2026.01.26

/**
  * @brief  Initiates a system reset request to reset the MCU.
  * @retval None
  */
void HAL_NVIC_SystemReset(void)
{
  /* System Reset */
  NVIC_SystemReset();
}

#define NVIC_SystemReset            __NVIC_SystemReset

/**
  \brief   System Reset
  \details Initiates a system reset request to reset the MCU.
 */
__NO_RETURN __STATIC_INLINE void __NVIC_SystemReset(void)
{
  __DSB();                                                          /* Ensure all outstanding memory accesses included
                                                                       buffered write are completed before reset */
  SCB->AIRCR  = ((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
                 SCB_AIRCR_SYSRESETREQ_Msk);
  __DSB();                                                          /* Ensure completion of memory access */

  for(;;)                                                           /* wait until reset */
  {
    __NOP();
  }
}

 

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32H/STM32G 시리즈 시리얼 포트 데이터 order  (0) 2022.08.29
stm32 wdg 최대 설정시간  (0) 2021.08.09
STM32 RDP(ReaD Protection)  (0) 2021.07.02
stm32 uart echo  (0) 2021.02.04
STM32CubeIDE / HAL register callbacks  (0) 2021.02.03
Posted by 구차니