Hello everyone,
I'm currently evaluating the MCX N23x series for a project that requires glitch detection (GDET). The datasheet and user manual indicate that the MCX N23x series supports GDET. However, I've noticed that the drivers and examples for GDET are missing from the SDK.
Has anyone encountered this issue or have any information on when the SDK might include support for GDET in the MCX N23x series? Any guidance or resources would be greatly appreciated.
Thanks!
Thanks for the reply!
I noticed that in the start-up code for both MCXN94x and MCXN23x, the GDET (glitch detection) is turned off.
void GDET_DriverIRQHandler(void)
{
NVIC_DisableIRQ(GDET_IRQn);
PRINTF("GDET IRQ Reached \r\n");
NVIC_EnableIRQ(GDET_IRQn);
}
Thanks for your help!
Hi @Embedded_Engineer ,
Does this mean the MCXN94x example won't work properly as well?
Yes, because of the recommendation in order to avoid false detections the GDET is turn off in the early start-up code so MCXN94x example may not work properly on the MCXN23x.
Is it possible to trigger an interrupt instead of a reset when a glitch is detected, allowing us to handle the event programmatically?
Yes, it is possible, as stated in this note of the reference manual.
Hope it helps you!
Something important to point out is a recommendation in the Reference Manual that is to make sure the GDET is disabled at startup to avoid false triggers, this is already done in the SDK(in startup code), this depends on the application this is only a recommendation.
The example of the MCXN94x was created earlier on and will not likely work properly in the MCXN23x due to recommendation but you can still use it for reference.
The operations that can be done with the GDET are the following:
Monitor/clear events using SYSCON->GDETn_CTRL
Change GDET configuration when CORE_VDD voltage changes
Set SYSCON->GDETn_CTRL[GDET_ISO_SW] = 10b (must set the value in both GDETn_CTRL register for it to take effect)
Change the CORE_VDD voltage
Configure GDETn->GDET_DLY_CTRL[VOL_SEL] based on the CORE_VDD voltage
Set GDETn->GDET_RESET[SFT_RST]
Clear both SYSCON->GDETn_CTRL[GDET_ISO_SW] fields
The register descriptions can be found in the secure reference manual.
Check if this applies for your project.
Hope it helps you!