2021-02-23 04:37 AM
2021-02-23 04:53 AM
It is good habit to write a short title and the real description in the text.
Are you sure you evaluated both masks really before any initialization was done?
2021-02-23 05:44 AM
I just put a breakpoint at:
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
and at this point using the Eclipse registers window I can see that both PRIMASK and FAULTMASK are 0.
2021-02-23 06:34 AM
As answered in your repeated question:
2021-02-23 07:13 AM
Yes, by contrast with some other architectures in Cortex-M the 'global' core interrupts are enabled after reset.
Most of interrupt sources are vendor-specific and controlled via NVIC. In the NVIC all vectors are disabled after reset.
So just be careful not to get a fault (exception) and you can safely set up your interrupts after reset.
Call __disable_irq() and __enable_irq() around configuration of NVIC and peripherals, if this comforts you.
-- pa