Hello All,
I've attempted to make my own board using the MIMXRT1062CVJ5B. This is my first experience in the electronics world and my first attempts at hardware design (KiCad), software design (MBDT in Simulink) and debugging (MCUXpresso with MCU-Link). I've been stuck on this issue for months and would appreciate any help.
When using the SDK-Examples with the MIMXRT1060-EVKB, they work without issue (iled Blinky + Hello World). When using my board and flashing over SWD in MCUXpresso, iBlinky appears to stop when trying to do something with the EnetPLL:

And Hello World generates a Hardfault, but also has issues, I believe, during the Clock Enabling

But I can write my own code using MBDT in Simulink and flash over SWD to generate a flashing LED and it works, the LED will flash but at times it has memory access issues when looking at "Disassembly".

This is all with the device in "Internal Boot" with BOOT_MODE_0 pulled low and BOOT_MODE_1 pulled high. The board has USB and UART and I'd like to use "Serial Downloader". When I set the device to "Serial Downloader" (BOOT_MODE_0 pulled high and BOOT_MODE_1 pulled low), the LED will stop blinking but the device can't been detected by MCUBootUtility or SecureProvisioningTool (either with UART or USB).
From all of this, I believe I have a hardware issue and my best guess is that I have an issue with clocks, specifically the XTAL 24MHz.
I'm using the NX3225GA-24MHZ-STD-CRG-2 (
https://datasheet.lcsc.com/lcsc/1810171130_NDK-NX3225GA-24MHZ-STD-CRG-2_C156248.pdf). To my knowledge, it fulfills the requirements from NXP:

Measurements at XTALO with an oscilloscope seem, to a rookie, ok:

Here's my schematic:

And my layout:

I did make the rookie mistake of copying the capacitors for the XTAL from a schematic. My design has 12pF, but my calculations show that 6-8pF may be better (Cl = 8pf, Cstray = ~4-5pF).
Any obvious mistakes or things I can check?
I've also checked that the power supplies are all and stable. Measurements with the oscilloscope at the capacitors closest to the pins show stable voltages and within the ranges specified in the Hardware Design Guideline:

I also measured RTC_XTALO:

I know that the chip has to start up in a certain way and there's requirements for Por_B, but the start up appears to conform to the requirements in the Hardware Design Guideline:

I've also posted some additional information here:
https://forum.pjrc.com/index.php?threads/custom-pcb-board-with-mimxrt1062dvj6b.74992/My device can be powered by USB or a 12V supply. The issues are independent of the power supply and whether the USB is plugged in or not.
The board was manufactured by JLCPCB with FR-4 TG155, ENIG and JLC04161H-3313.
I'd appreciate any and all help.
Regards,
Sam