Hello NXP Community,
Controller: S32K144
Scenario:
ADC0 and ADC1 are configured in hardware trigger mode using PDB and are running continuously as part of the application. During runtime, a 4 KB flash sector erase is performed in a reserved flash memory region, followed by programming of new data into the same sector. To avoid execution issues during flash erase, interrupts are disabled before starting the flash operation and re-enabled after the erase/program sequence is completed.
Observed Behavior:
When interrupts are re-enabled after the flash operation, the application continues to run normally. Other interrupt sources continue to execute as expected, indicating that global interrupt functionality is restored correctly. However, ADC0 and ADC1 interrupt handlers are no longer triggered after the flash erase/program operation. As a result, ADC sampling stops and the application no longer receives ADC conversion updates. The issue is observed consistently whenever a flash sector erase is performed during runtime.
Additional Observation: ADC operation can be restored by forcing a software-triggered ADC conversion, after which ADC interrupts start occurring again and normal operation resumes.
Query: Is there any known interaction between flash erase/program operations and PDB-triggered ADC conversions on S32K144? Are there any recommended steps to re-synchronize or recover the ADC/PDB trigger chain after a flash operation so that ADC conversions and interrupts resume normally?
Hi,
Looks like typical PDB/ADC chain stuck after flash operation. The fact that a software-triggered conversion restores operation suggests the ADC/PDB state machine is not dead, only out of sync after the flash sequence.
Recommended checks/workaround:
So likely root cause is not NVIC itself, but unserviced ADC/PDB state during flash operation.
BR, Petr
One more observation:
After enabling the Global ISR when P flash erase complete, I have one cycle of triggering sequence
PDB ISR call back --> ADC 1 --->ADC 0 After that ADC ISR call back function is not triggered
Hi,
PDB pretrigger lock mechanism is described in chapter 46.4.1 PDB pre-trigger and trigger outputs of the device RM.
BR, Petr