Skip to content

RTC battery supply switch disabled #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
simooon442 opened this issue Nov 8, 2023 · 4 comments
Closed

RTC battery supply switch disabled #181

simooon442 opened this issue Nov 8, 2023 · 4 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@simooon442
Copy link

Hello.
After each pcb RST (POR or not), the RTC is resetted, because VBTCR1.BPWSWSTP bit is set to 1 after each pcb reset (renesas datasheet section 11.2.1).

I suspect Arduino settings to automatically set this bit at each pcb power restart. How to deactivate it so we can use the RTC function normally ?

We need this VBTCR1.BPWSWSTP bit to be setting at 0 when PCB powering on, otherwise, RTC function is unusable.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Nov 9, 2023
@gpb01
Copy link

gpb01 commented Mar 9, 2024

Temporary detour ... try adding the following lines immediately after setup():

R_SYSTEM->PRCR    = 0xA502;
R_SYSTEM->VBTCR2  = 0x80;
R_SYSTEM->VBTCR1  = 0x00;
R_SYSTEM->PRCR    = 0xA500;

... the battery should now be working ;-)

Guglielmo

@alranel
Copy link
Contributor

alranel commented Jul 8, 2024

@simooon442 @gpb01 Do you have a chance to test the PR in #347?

@simooon442
Copy link
Author

Hello all.
Thank you to @gpb01 and @andreagilardoni for these helpul work !

@alranel , unfortunately, I gave up since I got no response for months... I don't have anymore my customs chield for trying that.
I used an external RTC instead.

This renesas rtc seems to be very touchy, so I wonder if its a good idea to use it for a reliable project.

@alranel
Copy link
Contributor

alranel commented Aug 22, 2024

Fixed as of core 1.2.1

@alranel alranel closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants