Atorr
September 13, 2021, 7:46pm
1
I’m replacing the 32.768KHz crystal in the RTC with a very stable clock, following the recommendations given here:
https://support.ambiq.com/hc/en-us/arti … pollo-MCUs .
In addition to some hardware mods, it requires changing the register XTALGENCTRL value to 0, but do not know how. I am using the OLA Artemis board.
It looks like that address is “ADDRESS: 0x40020124” - I’d think you just call that register and write 0x00 in its place?
You might also post this as a request on the ambiq page linked above
Atorr
September 14, 2021, 2:18am
3
TS- thank you. Yes, that is what needs to be done. Just do not know how to do it in the arduino environment. I looked at HAL use in the open log artemis code, but did not see any that I could use.
Atorr
September 17, 2021, 3:04am
4
Response from Gary, Ambiq Micro tech support: (Thank you, it worked!!)
To write to the register we recommend using the following CMSIS register access method.
For example
uint32_t val = MCUCTRL->XTALGENCTRL; // Read the XTALGENCTRL register
MCUCTRL->XTALGENCTRL_b.XTALBIASTRIM = 0;