Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions soc/ti/mspm0/mspm0g1x0x_g3x0x/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include <zephyr/init.h>
#include <zephyr/sys/reboot.h>
#include <ti/driverlib/m0p/dl_core.h>
#include <soc.h>

Expand All @@ -19,4 +20,18 @@ static int ti_mspm0g_init(void)
return 0;
}

/* Overrides the weak ARM implementation */
void sys_arch_reboot(int type)
{
switch (type)
{
case SYS_REBOOT_COLD:
DL_SYSCTL_resetDevice(DL_SYSCTL_RESET_POR);
break;
default:
NVIC_SystemReset();
break;
}
}

SYS_INIT(ti_mspm0g_init, PRE_KERNEL_1, 0);
Loading