Skip to content

Commit 2c103d5

Browse files
committed
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.
1 parent d432bcb commit 2c103d5

14 files changed

Lines changed: 429 additions & 205 deletions

File tree

cc3200/bootmgr/main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,16 @@ static void bootmgr_board_init(void) {
148148
// Mandatory MCU Initialization
149149
PRCMCC3200MCUInit();
150150

151-
mperror_check_reset_cause();
151+
mperror_bootloader_check_reset_cause();
152152

153153
// Enable the Data Hashing Engine
154154
HASH_Init();
155155

156156
// Init the system led and the system switch
157157
mperror_init0();
158158

159-
// clear the safe boot request, since we should not trust
160-
// the register's state after reset
161-
mperror_clear_safe_boot();
159+
// clear the safe boot flag, since we can't trust its content after reset
160+
PRCMClearSafeBootRequest();
162161
}
163162

164163
//*****************************************************************************
@@ -266,7 +265,7 @@ static void bootmgr_image_loader(sBootInfo_t *psBootInfo) {
266265
// turn the led off
267266
MAP_GPIOPinWrite(MICROPY_SYS_LED_PORT, MICROPY_SYS_LED_PORT_PIN, 0);
268267
// request a safe boot to the application
269-
mperror_request_safe_boot();
268+
PRCMRequestSafeBoot();
270269
}
271270
// do we have a new update image that needs to be verified?
272271
else if ((psBootInfo->ActiveImg == IMG_ACT_UPDATE) && (psBootInfo->Status == IMG_STATUS_CHECK)) {

0 commit comments

Comments
 (0)