cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Backup Domain GPIOs? Can these GPIOs be configured as outputs and retain their value during resets?

CTaba.1
Associate II

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

8 REPLIES 8
K.Ata15
Associate III

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.

CTaba.1
Associate II

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

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.

CTaba.1
Associate II

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

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
CTaba.1
Associate II

Thanks,

Tesla DeLorean (nice nickname by the way :grinning_face:)

your post replies to the question, I have to add an external flip/flop if I wish to retain output during STM32 reset.

Claudio

TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks,

Claudio