Skip to main content
LSang.11
Associate
Nov 27, 2020 9:03 AM UTC
Question

GPIO retention method

Is there a way to prevent the GPIO from changing even if a Self reset is executed?

​

void SelfReset_Handler(void)

{

  WWDG_SetPrescaler(WWDG_Prescaler_8);

  WWDG_SetWindowValue(80);

  WWDG_Enable(127);

}

​

Mcu Self Reset -> GPIO High retention

​

This topic has been closed for replies.

3 replies

Uwe Bonnes
Chief
Nov 27, 2020 9:48 AM UTC

To my knowledge only by external pull resistors. B.t.w, you can force a reset directly, without WWDG

Ozone
Principal
Nov 27, 2020 12:03 PM UTC

Exactly.

Upon reset, the default values as specified in the reference manual take effect.

You must work around that with pull-up/pull-down resistors.

Letting the watchdog run out has the advantage of being more compatible/portable accross different platforms.

My company uses XC22xx and some proprietary Fujitsu MCUs in addition to Cortex M and Cortex R.

With large parts of cross-platform software.

LSang.11
LSang.11Author
Associate
Dec 1, 2020 1:28 AM UTC

Thank you for answer.

Is there a way to soft reset other than watchdog?

Without external pull-up resistance

I want to keep the GPIO high even if the MCU performs a soft reset.

Is there any way?