Closed ShubhadaHarkut-eaton closed 2 years ago
Thanks for raising this issue.
@ShubhadaHarkut-eaton, could you check if https://github.com/zephyrproject-rtos/zephyr/pull/37524 would fix this issue?
@erwango : Looks similar issue but my query is that if i am looking at the end result in the reset_cause_id and not checking the flags step by step the reset pin would always be set irrespective of the reset cause
the vale returned at the end of the hw_info api would always give multiple reset reason
@alexanderwachter IIUC what you commented in #37524, the behavior observed here is not a bug and it should be dealt with on user side. Can you confirm ?
Additionally i would mention that the reset cause is not an id, but flags. You cannot use a switch(){} It is perfectly fine if more bits are set at the same time.
@ShubhadaHarkut-eaton Can you comment on the provided indications? Otherwise I'm going to close this issue as current consensus is that current behavior should be kept.
@erwango My doubt is resolved now . Good to close this ticket
Hardware reset cause api sets reset pin bit everytime the api is called, Irrespective of the reset reason. Incase of Software reset, There are 2 bits set that is (software reset and reset pin ) the cause id returned is "3" Similarly in case of Reset due to Watchdog there are 2 bits set (watchdog and reset pin) the cause id value returned is "17".
Target used : stm32f767 Zephyr version : 3.0.0-rc
To Reproduce case 1 : software reset Enable the hardware info and software reboot in proj.conf of the project.
Code :
main.cpp
Validated it in the debug mode (step by step debugging)
Expected behavior The expected Cause id : 2 but the observed result is 3 (reset pin and software reset) Multiple reset cause id observed even for the single reset cause. default the reset pin cause bit is set along with the actual reset cause bit
Impact Multiple reset cause id observed even for the single reset cause. default the reset pin cause bit is set along with the actual reset cause bit
*Environment Windows OS IDE Used : Platform IO and Eclipse