vignesh-aerlync opened a new pull request, #21372:
URL: https://github.com/apache/nuttx/pull/21372

   ## Summary
      
   This pull request resolves boot failure and reset loops on the NXP  
FRDM-MCXN236:        
   
   1. **`arch/arm/armv8-m`: Set reserved exception vectors to NULL**
      The Armv8-M Architecture Reference Manual (Sections B3.9 and B3.30) 
specifies that reserved exception vector slots (7–10 and 13) must be set to 0. 
Previously, NuttX initialized all exception vector slots up to 
`NVIC_IRQ_PENDSV` with
   `exception_common`, including the reserved slots. On NXP MCXN devices, the 
ROM bootloader checks flash offsets `0x20`–`0x34` for an image header before 
jumping to the application. If these reserved entries contain non-zero values, 
the bootloader treats the image as invalid and falls back to ISP mode. This 
change sets the reserved vector entries to NULL, allowing the ROM bootloader to 
correctly recognize and boot the application.
   
   2. **`arch/arm/mcx-nxxx`: Mask glitch detectors before voltage scaling**
      On MCXN236 Rev C silicon, the analog and digital glitch detectors (aGDET 
and dGDET) are enabled by default and connected to the `CHIP_RESET` signal 
through ITRC Output 4. During PLL0 and core voltage scaling, temporary voltage 
drops can trigger these detectors, causing the chip to reset repeatedly before 
the scheduler starts. This change masks the glitch detector inputs in ITRC, 
disables aGDET in SPC, and gates the dGDET clocks in GDET0 and GDET1 during 
chip initialization. The changes follow the initialization sequence used by the 
NXP MCUXpresso SDK and prevent unwanted resets during voltage scaling.        
   
   ## Impact
   
   * Is new feature added? NO
   * Impact on user? Fixes booting on FRDM-MCXN236.
   * Impact on build? NO
   * Impact on hardware? Positive fix for MCXN236; brings ARMv8-M vector table 
into strict Armv8-M specification compliance.
   * Impact on documentation? NO
   * Impact on security? NO (matches vendor SDK boot sequence).
   * Impact on compatibility? Backward compatible.
   
   ## Testing
   
   I confirm that changes are verified on the local setup and work as intended:
   * Build Host: Linux x86_64
   * Target: ARM Cortex-M33, `frdm-mcxn236:nsh`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to