RP2040 CLOCK GPIN0 selection
Posted: Wed Mar 02, 2022 3:26 pm
Hi,
I would like to use the F8 function of GPIO20 which is Clock GPIN0. Apparently this pin can be used to take in a clock and be used to time the internal RTC. Want I would like to implement is to use an external battery backed RTC such as the DS3231 to store the time when powered off. But instead of having to continuously read the RTC over I2C to get the time I would have the external RTC output a ref clock signal to time the internal RP2040 RTC off of the GPIO20 pin.
Questions I have:
1. how do you access internal RP2040 control registers from MicroPython?
Example need to configure clock reg below to select GPIN0 (GPIO20) as the source.
CLOCKS: CLK_RTC_CTRL Register
Offset: 0x6c
2. Any ideas as to what FUNCSEL value is for Clock GPIN0? The table doesn't really say .
thanks!
I would like to use the F8 function of GPIO20 which is Clock GPIN0. Apparently this pin can be used to take in a clock and be used to time the internal RTC. Want I would like to implement is to use an external battery backed RTC such as the DS3231 to store the time when powered off. But instead of having to continuously read the RTC over I2C to get the time I would have the external RTC output a ref clock signal to time the internal RP2040 RTC off of the GPIO20 pin.
Questions I have:
1. how do you access internal RP2040 control registers from MicroPython?
Example need to configure clock reg below to select GPIN0 (GPIO20) as the source.
CLOCKS: CLK_RTC_CTRL Register
Offset: 0x6c
2. Any ideas as to what FUNCSEL value is for Clock GPIN0? The table doesn't really say .
thanks!