Skip to content
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

RTC battery supply switch disabled #181

Open
simooon442 opened this issue Nov 8, 2023 · 1 comment
Open

RTC battery supply switch disabled #181

simooon442 opened this issue Nov 8, 2023 · 1 comment
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

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

3 participants