MCXE316 will not run without debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCXE316 will not run without debugger

Jump to solution
344 Views
brucebowling
Contributor III

Working on a custom board with the MCXE316 in the 48-pin package. I can download and execute code without issue with the debugger attached (PE Micro), however without the debugger attached with debug session in MCUXpresso the processor appears to not be running. If I power cycle the board is dead, if I plug in the debugger and start a debug session the board operates properly. Some of the things I have tested/verified:

1) I made sure I built the project without Semihosting enabled, and using the Redlib nohost -nf library which I believe disables Semihosting. Also there seems to be code in the semihost_hardfault.c to catch a hard fault from no debugger.

2) I have checked the reset register MC_RGM.FES and DES in the debugger and the power-on reset bit is the only one active - even if I apply a POR without the debugger attached (hung), then physically connect the debugger and initiate a debug session without a power cycle, the only bit set is power-on.

3) I have one LED on my board at PTB13, and I created the simplest code to flash the LED with no setup changes on clocks, etc, just flash the LED as the first operation in main with an infinite loop - here is the test code:

#include "fsl_siul2.h"

main()

{

// Make PTB13 an output

SIUL2->MSCR[45] = 0x200000;

 

while(1)

{

for(volatile uint32_t s=0; s<100000; s++);

 

SIUL2_PortToggle(SIUL2, kSIUL2_PTB, 1u << 13U);

}

}

This code operates fine when the debugger is attached, but standalone there is nothing. I have also made this same code using SDK functions and the same result, it operates only with a debugger session active.

I have also disabled the SWT watchdog in the code, same result. I don't think it is a watchdog reset event.

Any ideas or checks I can perform? Thanks!

Labels (1)
0 Kudos
Reply
1 Solution
124 Views
brucebowling
Contributor III

Ok, I began the steps you outlined in the response, and right out of the gate the issue showed up. Checking the memory at 0x0040_0000 was 0xFFFFFFFF, as were all of the subsequent address contents. So evidently these areas were not being programmed by the SDK default project.

Checking the reference manual for the Image Vector Table (section 31.5) I see the section regarding the magic number, etc. that needs to be programmed into the IVT. I was assuming that the default project setup for the MCXE316 device would include initializing this section, but I did not see anything regarding this.

I did notice that the FRDM MCXE31B board (big brother chip to the MCXE316) demo applications like the LED_Blinky did properly allow program execution without debugger attachment, as expected. And after loading in LED_Blinky into the FRDM-MCXE31B board, checking the memory address location 0x0040_0000 had the expected 0x5AA5_5AA5. So evidently this project contains the setup that is missing from the default SDK project I was using for the MCXE316 variant.

A little digging into the project for LED_Blinky shows a "boot_header" folder with the files "boot_header.c" and "boot_header.h". Looking at the boot_header.c source it appears this is where the project initializes the magic number and other items for the IVT. So I just copied the source and .h file from the LED_Blinky project to my SDK project. I also had to set a #define BOOT_HEADER_ENABLE 1U in order for the code to be included in the build.

This works! The applications continues to operates without debugger hardware on my custom test board. Apparently this file does what you were asking before in the test #2 section.

NXP needs to include this in the next SDK release for the MCXE316 device, otherwise others will experience the same issue.

Thanks for the help on this!

View solution in original post

0 Kudos
Reply
5 Replies
125 Views
brucebowling
Contributor III

Ok, I began the steps you outlined in the response, and right out of the gate the issue showed up. Checking the memory at 0x0040_0000 was 0xFFFFFFFF, as were all of the subsequent address contents. So evidently these areas were not being programmed by the SDK default project.

Checking the reference manual for the Image Vector Table (section 31.5) I see the section regarding the magic number, etc. that needs to be programmed into the IVT. I was assuming that the default project setup for the MCXE316 device would include initializing this section, but I did not see anything regarding this.

I did notice that the FRDM MCXE31B board (big brother chip to the MCXE316) demo applications like the LED_Blinky did properly allow program execution without debugger attachment, as expected. And after loading in LED_Blinky into the FRDM-MCXE31B board, checking the memory address location 0x0040_0000 had the expected 0x5AA5_5AA5. So evidently this project contains the setup that is missing from the default SDK project I was using for the MCXE316 variant.

A little digging into the project for LED_Blinky shows a "boot_header" folder with the files "boot_header.c" and "boot_header.h". Looking at the boot_header.c source it appears this is where the project initializes the magic number and other items for the IVT. So I just copied the source and .h file from the LED_Blinky project to my SDK project. I also had to set a #define BOOT_HEADER_ENABLE 1U in order for the code to be included in the build.

This works! The applications continues to operates without debugger hardware on my custom test board. Apparently this file does what you were asking before in the test #2 section.

NXP needs to include this in the next SDK release for the MCXE316 device, otherwise others will experience the same issue.

Thanks for the help on this!

0 Kudos
Reply
112 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @brucebowling ,

Thank you for sharing the progress. As you correctly pointed out, the SDK should include the boot_header file when creating a new project. Therefore, I also consider this to be a bug.
I will report this issue to the SDK team and remind them to address it as soon as possible. Thank you again for your valuable suggestion!

BR

Celeste

0 Kudos
Reply
269 Views
brucebowling
Contributor III

Hello Celeste,

Thank you for the response and items to check. I am still experiencing the issue with no operation without the debugger - here are responses to the individual items to check:

-  I monitored the RESET pin during powerup with an oscilloscope, and the reset pin level always drives to +5V on POR reset (i.e. not being held in reset).  There is no jumping or other visuals of the part going back into repeated resets, the line stays logic high. I can manually pull the reset line low then release (manual reset), the signal just goes to logic high and stays there

- I have also maintained power (verified) and manually pulled RESET line low then released, still no operation. I would believe this would bypass any power supply powerup rate issues.

- I have powered up the board without the debugger attached (no run state but with power applied), then physically plugged in the debugger cable (external power still applied without interruption) and viewed the FES and DES registers in the debugger, they indicate only a POR reset reason, no other faults are present. The PC is pointing to the main() entry breakpoint, I assume the debugger issues a reset at the beginning of the debug session and hence the code runs and halts at the beginning of main - but since the board has maintained power the DES and RES should still be valid from the original POR when the part hangs up.

- I am not setting up the clock at all, it is using the default clock configuration on reset as provided by the SDK project. I have also attempted to set the clock up with code to use the external crystal and PLL, and under the debugger this operates and I indeed get the higher PLL clock in the debugger just fine. But with no debugger the part is just dead, does not matter if I set up a **bleep** in the code or I just let the part default to the internal clock source present on boot.

- As far as I can measure the power supply ramp-up is within specification. I will try to bring the board up with an external power supply just to add a variable to see if there is a difference. However I would assume that once the part is powered-up then an external reset would subsequently wake it up - and if the chip was latched up hard then maintaining board power and re-hooking up the debugger would stay in a locked state, but the debugger always works.

Any other checks or verifications I can perform let me know. I am running out of ideas. Thanks

0 Kudos
Reply
170 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @brucebowling ,

Thank you for your response. Please proceed with the following checks in sequence:

1. Verify whether a valid IVT exists at the Flash base

  • Read address 0x0040_0000, expected value: 0x5AA5_5AA5
  • Check 0x0040_0004 (Boot Configuration Word): ensure CM7_0_ENABLE is set to 1
  • Verify 0x0040_000C contains a valid CM7_0 application entry address

2. Confirm that the project / linker script / programming method generates a valid MCXE31 boot image

  • Ensure that you are not programming only a standard ELF or vector table
  • The image must include an IVT recognizable by Secure BAF
  • The IVT must be located at one of the supported IVT addresses for MCXE316

3. Capture POR-related status at the earliest point after reset

  • PMC.LVSC: check PORF / LVR flags
  • DCM read-only registers: check POR_WDG_EN and POR_WDOG_TRIM

4. Perform a minimal experiment to verify true independent application entry

  • Avoid relying solely on LED toggling
  • Instead, in ResetISR or very early startup code, set a reserved RAM flag or a dedicated GPIO state
  • Then, use attach mode without triggering a debugger reset to read the status, this helps eliminate interference caused by debugger-induced resets

Best Regards,

Celeste

0 Kudos
Reply
276 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @brucebowling ,

Thank you for your detailed description and for already checking several potential causes, that is very helpful.
Based on what you described, this behavior is typically related to startup conditions rather than the application code itself. We would recommend focusing on the following key areas:
1. Check for reset or early startup failures
Please monitor the RESET_B pin with an oscilloscope during power-on (without the debugger connected). Check if there are any unexpected pulses, glitches, or repeated assertions of reset.
If possible, power the board without a debugger, then attach the debugger without resetting the device, halt execution, and check:
  • Program Counter (PC)
  • MC_RGM.FES and MC_RGM.DES register

Celeste_Liu_0-1780026991905.png


This helps identify whether the device is stuck or being reset repeatedly.

 

2. Verify clock configuration
This is one of the most common root causes for this type of issue.

If your project configures external clock sources or PLL:

- Please ensure that all clock domains are correctly configured, not only the core clock.
- For example, some derived clocks (such as HSE or other system clocks) must follow specific relationships with the core clock.
- Incorrect clock configuration can lead to unexpected resets or execution failure during early startup, even if debugging appears to work normally.

3. Check power supply ramp rate

Since you are using a custom board, please also double-check the power supply stability during startup. The design needs to comply with the requirements specified in the MCX E31x Hardware Design Guide and the DS.
Please refer to the screenshots below for details.
 
Celeste_Liu_2-1780027412174.png

 

 
Celeste_Liu_1-1780027334033.png

 

Hope it helps.

BR

Celeste

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2372008%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCXE316%20will%20not%20run%20without%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2372008%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWorking%20on%20a%20custom%20board%20with%20the%20MCXE316%20in%20the%2048-pin%20package.%20I%20can%20download%20and%20execute%20code%20without%20issue%20with%20the%20debugger%20attached%20(PE%20Micro)%2C%20however%20without%20the%20debugger%20attached%20with%20debug%20session%20in%20MCUXpresso%20the%20processor%20appears%20to%20not%20be%20running.%20If%20I%20power%20cycle%20the%20board%20is%20dead%2C%20if%20I%20plug%20in%20the%20debugger%20and%20start%20a%20debug%20session%20the%20board%20operates%20properly.%20Some%20of%20the%20things%20I%20have%20tested%2Fverified%3A%3C%2FP%3E%3CP%3E1)%20I%20made%20sure%20I%20built%20the%20project%20without%20Semihosting%20enabled%2C%20and%20using%20the%20Redlib%20nohost%20-nf%20library%20which%20I%20believe%20disables%20Semihosting.%20Also%20there%20seems%20to%20be%20code%20in%20the%20semihost_hardfault.c%20to%20catch%20a%20hard%20fault%20from%20no%20debugger.%3C%2FP%3E%3CP%3E2)%20I%20have%20checked%20the%20reset%20register%20MC_RGM.FES%20and%20DES%20in%20the%20debugger%20and%20the%20power-on%20reset%20bit%20is%20the%20only%20one%20active%20-%20even%20if%20I%20apply%20a%20POR%20without%20the%20debugger%20attached%20(hung)%2C%20then%20physically%20connect%20the%20debugger%20and%20initiate%20a%20debug%20session%20without%20a%20power%20cycle%2C%20the%20only%20bit%20set%20is%20power-on.%3C%2FP%3E%3CP%3E3)%20I%20have%20one%20LED%20on%20my%20board%20at%20PTB13%2C%20and%20I%20created%20the%20simplest%20code%20to%20flash%20the%20LED%20with%20no%20setup%20changes%20on%20clocks%2C%20etc%2C%20just%20flash%20the%20LED%20as%20the%20first%20operation%20in%20main%20with%20an%20infinite%20loop%20-%20here%20is%20the%20test%20code%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%23include%20%22fsl_siul2.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Emain()%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CP%3E%3CSPAN%3E%2F%2F%20Make%20PTB13%20an%20output%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESIUL2-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EMSCR%3C%2FSPAN%3E%3CSPAN%3E%5B45%5D%20%3D%200x200000%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3Ewhile%3C%2FSPAN%3E%3CSPAN%3E(1)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Efor%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Evolatile%3C%2FSPAN%3E%20%3CSPAN%3Euint32_t%3C%2FSPAN%3E%3CSPAN%3E%20s%3D0%3B%20s%26lt%3B100000%3B%20s%2B%2B)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3ESIUL2_PortToggle(SIUL2%2C%20%3C%2FSPAN%3E%3CSPAN%3EkSIUL2_PTB%3C%2FSPAN%3E%3CSPAN%3E%2C%201u%20%26lt%3B%26lt%3B%2013U)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%7D%3C%2FP%3E%3CP%3EThis%20code%20operates%20fine%20when%20the%20debugger%20is%20attached%2C%20but%20standalone%20there%20is%20nothing.%20I%20have%20also%20made%20this%20same%20code%20using%20SDK%20functions%20and%20the%20same%20result%2C%20it%20operates%20only%20with%20a%20debugger%20session%20active.%3C%2FP%3E%3CP%3EI%20have%20also%20disabled%20the%20SWT%20watchdog%20in%20the%20code%2C%20same%20result.%20I%20don't%20think%20it%20is%20a%20watchdog%20reset%20event.%3C%2FP%3E%3CP%3EAny%20ideas%20or%20checks%20I%20can%20perform%3F%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2372008%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EBoot%20ROM%7CBooting%20%7C%20Flash%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2373146%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE316%20will%20not%20run%20without%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2373146%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Celeste%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20response%20and%20items%20to%20check.%20I%20am%20still%20experiencing%20the%20issue%20with%20no%20operation%20without%20the%20debugger%20-%20here%20are%20responses%20to%20the%20individual%20items%20to%20check%3A%3C%2FP%3E%3CP%3E-%26nbsp%3B%20I%20monitored%20the%20RESET%20pin%20during%20powerup%20with%20an%20oscilloscope%2C%20and%20the%20reset%20pin%20level%20always%20drives%20to%20%2B5V%20on%20POR%20reset%20(i.e.%20not%20being%20held%20in%20reset).%26nbsp%3B%20There%20is%20no%20jumping%20or%20other%20visuals%20of%20the%20part%20going%20back%20into%20repeated%20resets%2C%20the%20line%20stays%20logic%20high.%20I%20can%20manually%20pull%20the%20reset%20line%20low%20then%20release%20(manual%20reset)%2C%20the%20signal%20just%20goes%20to%20logic%20high%20and%20stays%20there%3C%2FP%3E%3CP%3E-%20I%20have%20also%20maintained%20power%20(verified)%20and%20manually%20pulled%20RESET%20line%20low%20then%20released%2C%20still%20no%20operation.%20I%20would%20believe%20this%20would%20bypass%20any%20power%20supply%20powerup%20rate%20issues.%3C%2FP%3E%3CP%3E-%20I%20have%20powered%20up%20the%20board%20without%20the%20debugger%20attached%20(no%20run%20state%20but%20with%20power%20applied)%2C%20then%20physically%20plugged%20in%20the%20debugger%20cable%20(external%20power%20still%20applied%20without%20interruption)%20and%20viewed%20the%20FES%20and%20DES%20registers%20in%20the%20debugger%2C%20they%20indicate%20only%20a%20POR%20reset%20reason%2C%20no%20other%20faults%20are%20present.%20The%20PC%20is%20pointing%20to%20the%20main()%20entry%20breakpoint%2C%20I%20assume%20the%20debugger%20issues%20a%20reset%20at%20the%20beginning%20of%20the%20debug%20session%20and%20hence%20the%20code%20runs%20and%20halts%20at%20the%20beginning%20of%20main%20-%20but%20since%20the%20board%20has%20maintained%20power%20the%20DES%20and%20RES%20should%20still%20be%20valid%20from%20the%20original%20POR%20when%20the%20part%20hangs%20up.%3C%2FP%3E%3CP%3E-%20I%20am%20not%20setting%20up%20the%20clock%20at%20all%2C%20it%20is%20using%20the%20default%20clock%20configuration%20on%20reset%20as%20provided%20by%20the%20SDK%20project.%20I%20have%20also%20attempted%20to%20set%20the%20clock%20up%20with%20code%20to%20use%20the%20external%20crystal%20and%20PLL%2C%20and%20under%20the%20debugger%20this%20operates%20and%20I%20indeed%20get%20the%20higher%20PLL%20clock%20in%20the%20debugger%20just%20fine.%20But%20with%20no%20debugger%20the%20part%20is%20just%20dead%2C%20does%20not%20matter%20if%20I%20set%20up%20a%20**bleep**%20in%20the%20code%20or%20I%20just%20let%20the%20part%20default%20to%20the%20internal%20clock%20source%20present%20on%20boot.%3C%2FP%3E%3CP%3E-%20As%20far%20as%20I%20can%20measure%20the%20power%20supply%20ramp-up%20is%20within%20specification.%20I%20will%20try%20to%20bring%20the%20board%20up%20with%20an%20external%20power%20supply%20just%20to%20add%20a%20variable%20to%20see%20if%20there%20is%20a%20difference.%20However%20I%20would%20assume%20that%20once%20the%20part%20is%20powered-up%20then%20an%20external%20reset%20would%20subsequently%20wake%20it%20up%20-%20and%20if%20the%20chip%20was%20latched%20up%20hard%20then%20maintaining%20board%20power%20and%20re-hooking%20up%20the%20debugger%20would%20stay%20in%20a%20locked%20state%2C%20but%20the%20debugger%20always%20works.%3C%2FP%3E%3CP%3EAny%20other%20checks%20or%20verifications%20I%20can%20perform%20let%20me%20know.%20I%20am%20running%20out%20of%20ideas.%20Thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2372737%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE316%20will%20not%20run%20without%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2372737%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F129422%22%20target%3D%22_blank%22%3E%40brucebowling%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CDIV%3EThank%20you%20for%20your%20detailed%20description%20and%20for%20already%20checking%20several%20potential%20causes%2C%20that%20is%20very%20helpful.%3C%2FDIV%3E%0A%3CDIV%3EBased%20on%20what%20you%20described%2C%20this%20behavior%20is%20typically%20related%20to%20startup%20conditions%20rather%20than%20the%20application%20code%20itself.%20We%20would%20recommend%20focusing%20on%20the%20following%20key%20areas%3A%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E1.%20Check%20for%20reset%20or%20early%20startup%20failures%3C%2FDIV%3E%0A%3CDIV%3EPlease%20%3CSTRONG%3Emonitor%20the%20RESET_B%20pin%20with%20an%20oscilloscope%3C%2FSTRONG%3E%20during%20power-on%20(without%20the%20debugger%20connected).%26nbsp%3B%3CSPAN%3ECheck%20if%20there%20are%20any%20unexpected%20pulses%2C%20glitches%2C%20or%20repeated%20assertions%20of%20reset.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3EIf%20possible%2C%20power%20the%20board%20without%20a%20debugger%2C%20then%20attach%20the%20debugger%20%3CEM%3Ewithout%20resetting%20the%20device%3C%2FEM%3E%2C%20halt%20execution%2C%20and%20check%3A%0A%3CUL%3E%0A%3CLI%3EProgram%20Counter%20(PC)%3C%2FLI%3E%0A%3CLI%3EMC_RGM.FES%20and%20MC_RGM.DES%20register%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Celeste_Liu_0-1780026991905.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_0-1780026991905.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_0-1780026991905.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_0-1780026991905.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_0-1780026991905.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F387172i07CB46EC78217B82%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Celeste_Liu_0-1780026991905.png%22%20alt%3D%22Celeste_Liu_0-1780026991905.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EThis%20helps%20identify%20whether%20the%20device%20is%20stuck%20or%20being%20reset%20repeatedly.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CDIV%3E2.%20Verify%20clock%20configuration%3C%2FDIV%3E%0A%3CDIV%3EThis%20is%20one%20of%20the%20most%20common%20root%20causes%20for%20this%20type%20of%20issue.%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CP%3EIf%20your%20project%20configures%20external%20clock%20sources%20or%20PLL%3A%3C%2FP%3E%0A%3CP%3E-%20Please%20ensure%20that%20all%20clock%20domains%20are%20correctly%20configured%2C%20not%20only%20the%20core%20clock.%3CBR%20%2F%3E-%20For%20example%2C%20some%20derived%20clocks%20(such%20as%20HSE%20or%20other%20system%20clocks)%20must%20follow%20specific%20relationships%20with%20the%20core%20clock.%3CBR%20%2F%3E-%20Incorrect%20clock%20configuration%20can%20lead%20to%20unexpected%20resets%20or%20execution%20failure%20during%20early%20startup%2C%20even%20if%20debugging%20appears%20to%20work%20normally.%3C%2FP%3E%0A%3CP%3E3.%20Check%26nbsp%3Bpower%20supply%20ramp%20rate%3C%2FP%3E%0A%3CDIV%3ESince%20you%20are%20using%20a%20custom%20board%2C%20please%20also%20double-check%20the%20power%20supply%20stability%20during%20startup.%26nbsp%3BThe%20design%20needs%20to%20comply%20with%20the%20requirements%20specified%20in%20the%20MCX%20E31x%20Hardware%20Design%20Guide%20and%20the%20DS.%3CBR%20%2F%3EPlease%20refer%20to%20the%20screenshots%20below%20for%20details.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Celeste_Liu_2-1780027412174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_2-1780027412174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_2-1780027412174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_2-1780027412174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_2-1780027412174.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F387174iDB56761021E234A8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Celeste_Liu_2-1780027412174.png%22%20alt%3D%22Celeste_Liu_2-1780027412174.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Celeste_Liu_1-1780027334033.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_1-1780027334033.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_1-1780027334033.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_1-1780027334033.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Celeste_Liu_1-1780027334033.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F387173i96378A790F20C742%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Celeste_Liu_1-1780027334033.png%22%20alt%3D%22Celeste_Liu_1-1780027334033.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHope%20it%20helps.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2375103%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE316%20will%20not%20run%20without%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375103%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F129422%22%20target%3D%22_blank%22%3E%40brucebowling%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EThank%20you%20for%20your%20response.%20Please%20proceed%20with%20the%20following%20checks%20in%20sequence%3A%3C%2FP%3E%0A%3CP%3E1.%20Verify%20whether%20a%20valid%20IVT%20exists%20at%20the%20Flash%20base%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERead%20address%20%3CCODE%3E0x0040_0000%3C%2FCODE%3E%2C%20expected%20value%3A%20%3CCODE%3E0x5AA5_5AA5%3C%2FCODE%3E%3C%2FLI%3E%0A%3CLI%3ECheck%20%3CCODE%3E0x0040_0004%3C%2FCODE%3E%20(Boot%20Configuration%20Word)%3A%20ensure%20CM7_0_ENABLE%20is%20set%20to%201%3C%2FLI%3E%0A%3CLI%3EVerify%20%3CCODE%3E0x0040_000C%3C%2FCODE%3E%20contains%20a%20valid%20CM7_0%20application%20entry%20address%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E2.%20Confirm%20that%20the%20project%20%2F%20linker%20script%20%2F%20programming%20method%20generates%20a%20valid%20MCXE31%20boot%20image%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EEnsure%20that%20you%20are%20not%20programming%20only%20a%20standard%20ELF%20or%20vector%20table%3C%2FLI%3E%0A%3CLI%3EThe%20image%20must%20include%20an%20IVT%20recognizable%20by%20Secure%20BAF%3C%2FLI%3E%0A%3CLI%3EThe%20IVT%20must%20be%20located%20at%20one%20of%20the%20supported%20IVT%20addresses%20for%20MCXE316%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E3.%20Capture%20POR-related%20status%20at%20the%20earliest%20point%20after%20reset%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPMC.LVSC%3A%20check%20PORF%20%2F%20LVR%20flags%3C%2FLI%3E%0A%3CLI%3EDCM%20read-only%20registers%3A%20check%20POR_WDG_EN%26nbsp%3Band%20POR_WDOG_TRIM%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E4.%20Perform%20a%20minimal%20experiment%20to%20verify%20true%20independent%20application%20entry%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAvoid%20relying%20solely%20on%20LED%20toggling%3C%2FLI%3E%0A%3CLI%3EInstead%2C%20in%20ResetISR%26nbsp%3Bor%20very%20early%20startup%20code%2C%20set%20a%20reserved%20RAM%20flag%20or%20a%20dedicated%20GPIO%20state%3C%2FLI%3E%0A%3CLI%3EThen%2C%20use%20attach%20mode%20without%20triggering%20a%20debugger%20reset%20to%20read%20the%20status%2C%20this%20helps%20eliminate%20interference%20caused%20by%20debugger-induced%20resets%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EBest%20Regards%2C%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2375950%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE316%20will%20not%20run%20without%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375950%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOk%2C%20I%20began%20the%20steps%20you%20outlined%20in%20the%20response%2C%20and%20right%20out%20of%20the%20gate%20the%20issue%20showed%20up.%20Checking%20the%20memory%20at%200x0040_0000%20was%200xFFFFFFFF%2C%20as%20were%20all%20of%20the%20subsequent%20address%20contents.%20So%20evidently%20these%20areas%20were%20not%20being%20programmed%20by%20the%20SDK%20default%20project.%3C%2FP%3E%3CP%3EChecking%20the%20reference%20manual%20for%20the%20Image%20Vector%20Table%20(section%2031.5)%20I%20see%20the%20section%20regarding%20the%20magic%20number%2C%20etc.%20that%20needs%20to%20be%20programmed%20into%20the%20IVT.%20I%20was%20assuming%20that%20the%20default%20project%20setup%20for%20the%20MCXE316%20device%20would%20include%20initializing%20this%20section%2C%20but%20I%20did%20not%20see%20anything%20regarding%20this.%3C%2FP%3E%3CP%3EI%20did%20notice%20that%20the%20FRDM%20MCXE31B%20board%20(big%20brother%20chip%20to%20the%20MCXE316)%20demo%20applications%20like%20the%20LED_Blinky%20did%20properly%20allow%20program%20execution%20without%20debugger%20attachment%2C%20as%20expected.%20And%20after%20loading%20in%20LED_Blinky%20into%20the%20FRDM-MCXE31B%20board%2C%20checking%20the%20memory%20address%20location%200x0040_0000%20had%20the%20expected%200x5AA5_5AA5.%20So%20evidently%20this%20project%20contains%20the%20setup%20that%20is%20missing%20from%20the%20default%20SDK%20project%20I%20was%20using%20for%20the%20MCXE316%20variant.%3C%2FP%3E%3CP%3EA%20little%20digging%20into%20the%20project%20for%20LED_Blinky%20shows%20a%20%22boot_header%22%20folder%20with%20the%20files%20%22boot_header.c%22%20and%20%22boot_header.h%22.%20Looking%20at%20the%20boot_header.c%20source%20it%20appears%20this%20is%20where%20the%20project%20initializes%20the%20magic%20number%20and%20other%20items%20for%20the%20IVT.%20So%20I%20just%20copied%20the%20source%20and%20.h%20file%20from%20the%20LED_Blinky%20project%20to%20my%20SDK%20project.%20I%20also%20had%20to%20set%20a%20%23define%20BOOT_HEADER_ENABLE%201U%20in%20order%20for%20the%20code%20to%20be%20included%20in%20the%20build.%3C%2FP%3E%3CP%3EThis%20works!%20The%20applications%20continues%20to%20operates%20without%20debugger%20hardware%20on%20my%20custom%20test%20board.%20Apparently%20this%20file%20does%20what%20you%20were%20asking%20before%20in%20the%20test%20%232%20section.%3C%2FP%3E%3CP%3ENXP%20needs%20to%20include%20this%20in%20the%20next%20SDK%20release%20for%20the%20MCXE316%20device%2C%20otherwise%20others%20will%20experience%20the%20same%20issue.%3C%2FP%3E%3CP%3EThanks%20for%20the%20help%20on%20this!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2376355%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXE316%20will%20not%20run%20without%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2376355%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F129422%22%20target%3D%22_blank%22%3E%40brucebowling%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20sharing%20the%20progress.%20As%20you%20correctly%20pointed%20out%2C%20the%20SDK%20should%20include%20the%20boot_header%20file%20when%20creating%20a%20new%20project.%20Therefore%2C%20I%20also%20consider%20this%20to%20be%20a%20bug.%3CBR%20%2F%3EI%20will%20report%20this%20issue%20to%20the%20SDK%20team%20and%20remind%20them%20to%20address%20it%20as%20soon%20as%20possible.%20Thank%20you%20again%20for%20your%20valuable%20suggestion!%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%3C%2FLINGO-BODY%3E