summaryrefslogtreecommitdiffstatshomepage
path: root/cc3200/bootmgr/main.c
diff options
context:
space:
mode:
authordanicampora <danicampora@gmail.com>2015-03-14 09:59:47 +0100
committerdanicampora <danicampora@gmail.com>2015-03-14 10:08:47 +0100
commit2c103d5200ec513dc0e5ffb9925a345a5ffaad06 (patch)
treeaeae3f1d9524cc875df53f06924ff4ce2f5e2dff /cc3200/bootmgr/main.c
parentd432bcb9acb7105274c10c6b4bee3736a1a690b5 (diff)
downloadmicropython-2c103d5200ec513dc0e5ffb9925a345a5ffaad06.tar.gz
micropython-2c103d5200ec513dc0e5ffb9925a345a5ffaad06.zip
cc3200: Rewrite the PRCM RTC functionality methods.
This allows to use the On-Chip retention registers for both the RTC and to share notification flags between the bootloader and the application. The two flags being shared right now are the "safe boot" request and the WDT reset cause. we still have 2 more bits free for future use.
Diffstat (limited to 'cc3200/bootmgr/main.c')
-rw-r--r--cc3200/bootmgr/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cc3200/bootmgr/main.c b/cc3200/bootmgr/main.c
index c7c149d217..c1a64b84ad 100644
--- a/cc3200/bootmgr/main.c
+++ b/cc3200/bootmgr/main.c
@@ -148,7 +148,7 @@ static void bootmgr_board_init(void) {
// Mandatory MCU Initialization
PRCMCC3200MCUInit();
- mperror_check_reset_cause();
+ mperror_bootloader_check_reset_cause();
// Enable the Data Hashing Engine
HASH_Init();
@@ -156,9 +156,8 @@ static void bootmgr_board_init(void) {
// Init the system led and the system switch
mperror_init0();
- // clear the safe boot request, since we should not trust
- // the register's state after reset
- mperror_clear_safe_boot();
+ // clear the safe boot flag, since we can't trust its content after reset
+ PRCMClearSafeBootRequest();
}
//*****************************************************************************
@@ -266,7 +265,7 @@ static void bootmgr_image_loader(sBootInfo_t *psBootInfo) {
// turn the led off
MAP_GPIOPinWrite(MICROPY_SYS_LED_PORT, MICROPY_SYS_LED_PORT_PIN, 0);
// request a safe boot to the application
- mperror_request_safe_boot();
+ PRCMRequestSafeBoot();
}
// do we have a new update image that needs to be verified?
else if ((psBootInfo->ActiveImg == IMG_ACT_UPDATE) && (psBootInfo->Status == IMG_STATUS_CHECK)) {