Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch/arm/src/imxrt/imxrt_start.c: Clear CONTROL register at start to … #222

Merged
merged 1 commit into from
Feb 13, 2024
Merged
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
7 changes: 6 additions & 1 deletion arch/arm/src/imxrt/imxrt_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,16 @@ void __start(void)
const register uint32_t *src;
register uint32_t *dest;

/* Make sure that interrupts are disabled and set SP */
/* Make sure that interrupts are disabled and set MSP */

__asm__ __volatile__ ("\tcpsid i\n");
__asm__ __volatile__ ("MSR MSP, %0\n" : : "r" (IDLE_STACK) :);

/* Make sure that we use MSP from now on */

__asm__ __volatile__ ("MSR CONTROL, %0\n" : : "r" (0) :);
__asm__ __volatile__ ("ISB SY\n");

/* Make sure VECTAB is set to NuttX vector table
* and not the one from the boot ROM and have consistency
* with debugger that automatically set the VECTAB
Expand Down
Loading