2020-08-05 01:39 PM
I tried using an M41T62 with Arduino and them STM32L476RG via Arduino IDE and Mbed. For both cases, I noticed that the chip fails to update time after setting the time.
I noticed that when i touch the oscillator inputs, the time starts updating. I know why this is happening and the solution would be to connect an external 32 KHz oscillator to the osc pins, however, I want to use the internal oscillator.
Can someone provide me an Arduino or Mbed code to activate the internal oscillator?
2020-08-18 05:36 AM
Hi @SSaha.1 ,
just to be sure I understood, do you want to activate the internal oscillator of the STM32L476RG?
In this case the easiest way is to use STM32CubeMX to generate the code and copy/paste the section you need into your own code.
do you think this can work for you?
2020-08-18 11:04 AM
No. I can activate the internal oscillator of STM32. That's not the issue. I am talking about the internal oscillator of M41T62 RTC IC.
2020-08-19 02:12 AM
The M41T62 does not directly provide the 32kHz oscillator, but you can get the square wave at the SQW pin by setting the SQWE bit to 1 (reg 0Ah, bit 6)
are you using the 3 x 3 mm 16 pin package or the 1.5 x 3.2 mm LCC with embedded crystal one?