MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
mccibootloaderboard_catena5230_prepareforlaunch.c
Go to the documentation of this file.
1/*
2
3Module: mccibootloaderboard_catena5230_prepareforlaunch.c
4
5Function:
6 McciBootloaderBoard_Catena5230_prepareForLaunch()
7
8Copyright and License:
9 This file copyright (C) 2026 by
10
11 MCCI Corporation
12 3520 Krums Corners Road
13 Ithaca, NY 14850
14
15 See accompanying LICENSE file for copyright and license information.
16
17Author:
18 Terry Moore, MCCI Corporation March 2026
19
20*/
21
23
24#include "mcci_bootloader.h"
27#include "mcci_bootloader_device_npm1300.h"
28#include "mcci_npm1300.h"
29␌
30/****************************************************************************\
31|
32| Manifest constants & typedefs.
33|
34\****************************************************************************/
35
36
37
38/****************************************************************************\
39|
40| Read-only data.
41|
42\****************************************************************************/
43
44
45
46/****************************************************************************\
47|
48| Variables.
49|
50\****************************************************************************/
51
52␌
53/*
54
55Name: McciBootloaderBoard_Catena5230_prepareForLaunch()
56
57Function:
58 Platform interface: prepare for launch of app on 5230.
59
60Definition:
61 void McciBootloaderBoard_Catena5230_prepareForLaunch(
62 void
63 );
64
65Description:
66 Return the board and the SOC to the boot state.
67 Delegates to common Catena1SJ logic.
68
69Returns:
70 No explicit result.
71
72Notes:
73
74
75*/
76
77void
79 void
80 )
81 {
82 const McciBootloaderDeviceI2cResult_t result =
83 McciBootloaderDevice_NPM1300_writeRegister(
85 MCCI_PMIC_NPM1300_REG_TASKLDSWCLR_2,
86 1
87 );
88
89 if (result != McciBootloaderDeviceI2cResult_OK)
90 {
92 }
93
94 // done with the PMIC
95 (void) McciBootloaderDevice_end(&g_McciBootloaderBoard_Catena5230_pNPM1300->DeviceCast);
96
97 // done with the I2C bus
98 (void) McciBootloaderDevice_end(&g_McciBootloaderBoard_Catena5230_i2cBus2.DeviceCast);
99
100 // tear down everything else.
102 }
103
104/**** end of mccibootloaderboard_catena5230_prepareforlaunch.c ****/
@ McciBootloaderError_StoragePowerDownFailed
failed to turn off storage power.
McciBootloaderDeviceNpm1300_t * g_McciBootloaderBoard_Catena5230_pNPM1300
McciBootloaderDeviceI2cBusStm32l0_t g_McciBootloaderBoard_Catena5230_i2cBus2
McciBootloaderPlatform_PrepareForLaunchFn_t McciBootloaderBoard_Catena1sj_prepareForLaunch
void MCCI_BOOTLOADER_NORETURN_PFX McciBootloaderPlatform_fail(McciBootloaderError_t errorCode) MCCI_BOOTLOADER_NORETURN_SFX
void McciBootloaderBoard_Catena5230_prepareForLaunch(void)