From 642c5a8f20ea1b4284ff761c00f5d7fcdb618d32 Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Wed, 5 Dec 2018 13:49:03 -0800 Subject: [PATCH] Add more info about the power button hack --- src/hardwareRegisters.c | 2 +- src/hardwareRegistersTiming.c.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hardwareRegisters.c b/src/hardwareRegisters.c index 94a0bc9..b504036 100644 --- a/src/hardwareRegisters.c +++ b/src/hardwareRegisters.c @@ -456,7 +456,7 @@ uint16_t getHwRegister16(uint32_t address){ return spi1RxFifoRead(); case PLLFSR: - //this is a hack, it makes the busy wait in HwrDelay finish instantly + //this is a hack, it makes the busy wait in HwrDelay finish instantly, prevents issues with the power button registerArrayWrite16(PLLFSR, registerArrayRead16(PLLFSR) ^ 0x8000); return registerArrayRead16(PLLFSR); diff --git a/src/hardwareRegistersTiming.c.h b/src/hardwareRegistersTiming.c.h index 584bb7b..7fec98a 100644 --- a/src/hardwareRegistersTiming.c.h +++ b/src/hardwareRegistersTiming.c.h @@ -306,7 +306,8 @@ void beginClk32(void){ } void endClk32(void){ - registerArrayWrite16(PLLFSR, registerArrayRead16(PLLFSR) ^ 0x8000); + //currently using toggle on read hack + //registerArrayWrite16(PLLFSR, registerArrayRead16(PLLFSR) ^ 0x8000); //second position counter if(clk32Counter >= CRYSTAL_FREQUENCY - 1){