‎2021-05-10 07:36 AM
I'm using an stm32f429ni, which has 4 GPIOs in Backup Domain, namely PC13, PC14, PC15, PI8.
Can these GPIOs be configured for example as output and retain their value during resets?
The STM32F427xx STM32F429xx processor manual (DocID024030) is not very clear about this point, it only says that they are in Backup Domain and configuration is performed through RTC registers, and that there are limitation on current (source and sink).
STM STM32F4 Reference manual (RM0090) in RTC registers section, allows only configuration of alternate function of the pins as TAMPER_1 and TAMPER_2.
I've made a test with a device which uses an stm32f429ni, configured PC13 as output, with value set yo high and forced reset with watchdog (or NVIC_SystemReset).
The device, at reset, reconfigures the PC13 GPIO as input Hi-Z, so its seems that PC13 GPIO does not retain it's configuration even if it is part of Backup Domain.
Am I doing something wrong or missing some kind of configuration?
Or, did I msiunderstood the meaning of Backup Domain for GPIOs?
Do they retain their configuration only for usage as RTC TAMPER input?
Regards,
Claudio
‎2021-05-10 08:16 AM
Hey,
Check your clock settings please. If you have HSE or LSE enabled there, those needed for external XTALs will be auto routed to the clock circuitry.
K.
‎2021-05-10 08:24 AM
The board has both XTALs populated (8Mhz OSC and 32.768KHz OSC32), HSE and LSE are both enabled and RTC source is set to LSE.
GPIO PC13 is working but it's value is not retained ad reset.
Claudio
‎2021-05-10 08:38 AM
I guess you will have to use HSI/LSI or just OSC IN and external chip, and very early on after reset, force them to be GPIO. Unless later core revisions allow to change those pins via Options bits, IDK. Good luck!
K.
‎2021-05-10 09:50 AM
Maybe there is a misundertanding here. I don't want to change alternate function of OSC pins.
I really don't understand your suggestions.
The GPIOs I mentioned in the first post (PC13, PC14, PC15, PI8) should mantain the configured value during reset cause they are in the Backup Domain.
But the test shows they do not.
Claudio
‎2021-05-10 09:54 AM
The F4 family parts do not provide for a means to define outputs or pull-up states over reset.
PC13 has very low drive current.
They are in the low power domain to allow the LSE crystal to oscillate, and TAMPER input to function.
The LSI is NOT in the low power domain, so for the RTC to clock in STANDBY you must provide an external crystal.
‎2021-05-10 10:13 AM
Thanks,
Tesla DeLorean (nice nickname by the way 😀)
your post replies to the question, I have to add an external flip/flop if I wish to retain output during STM32 reset.
Claudio
‎2021-05-10 02:54 PM
If you assign these pins functions in the backup domain such as RTC timestamp, those settings will be retained, since those settings are in the backup domain registers. Those settings can override whatever GPIO register settings you have. However, GPIO configuration is not in the backup domain and is not retained on reset.
> Do they retain their configuration only for usage as RTC TAMPER input?
Exactly this.
‎2021-05-10 11:57 PM
Thanks,
Claudio