Hello!
I've encountered an issue with the power supply on my custom board. If the voltage drops to ~2.8V the RT1051 freezes and there is no way to reset the processor. I use a 18650 battery to power supply the board. Even if the USB cable will be connected (the voltage rises) the processor is not able to start working. The POR signal doesn't reset the MCU. The oscilloscope shows that DCDC_LP1 and 2 are 0V. So VDD_SOC is also 0V.
I tried to implement PMU Brownout detection but it doesn't work. There is not a lot of information in the Reference Manual about brownout detection. I also couldn't find any examples in SDK.
I want to use brownout detection because I have one GPIO connected to enable pin in the DCDC converter. So I can shutdown the MCU before it freezes.
According to fsl_pmu.h I tried to implement brownout:
PMU_1P1EnableBrownout(PMU, true);
PMU_1P1SetBrownoutOffsetVoltage(PMU, 0x5); // 5*25mV
PMU_2P5nableBrownout(PMU, true);
PMU_1P1SetBrownoutOffsetVoltage(PMU, 0x5); // 5*25mV
NVIC_EnableIRQ(PMU_EVENT_IRQn);
And interrupt
void ANATOP_EVENT0_IRQHandler(void)
{
const uint32_t status = PMU_GetStatusFlags(PMU);
if (status & kPMU_1P1BrownoutOnOutput)
{
// ...
}
if (status & kPMU_2P5BrownoutOnOutput)
{
// ...
}
NVIC_ClearPendingIRQ(PMU_EVENT_IRQn);
}
The RT1051 doesn't generate an interrupt before freezes. Do I need to enable 1.1V and 2.5V LDO or it doesn't matter?
Do you have any ideas?
Best
Dawid