S32K322 Debug LVD HVD and error notification

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

S32K322 Debug LVD HVD and error notification

868 Views
AbdNxp
Contributor II

Hello Teach Supports,

I am working on NXP S32K322.

I want to use LVD and HVD and power related callback.

I have enabled the above configuration from POWER configuration also added notification and error callbacks.

Now, when I reduce the power to 2.9V debugger notifying target power lost.

My simple question is how I can test that on low/high voltage detection the control jumps to respective interrupt/callback. 

 

Thanks & Regards

0 Kudos
Reply
3 Replies

838 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@AbdNxp

The HVD and LVD interrupt events have the same interrupt function, so they will only enter the same interrupt function,that it "McuErrorIsrNotification()" .

You need to determine whether the LVD or HVD event occurs based on the value of LVSC.

For example:

void McuErrorIsrNotification(uint8 u8ErrorCode)//McuErrorIsrNotification
{
      uint32_t PMC_Status = 0;

      PMC_Status = IP_PMC->LVSC;//get LVSC register vaule

      if((PMC_Status>>4) & 0x01)//LVDA5F = 1
      {
      ;//LVD event happend
      }

      if((PMC_Status>>0) & 0x01)//HVDAF= 1
      {
      ;//HVD event happend
      }
}

 

 

0 Kudos
Reply

833 Views
AbdNxp
Contributor II

Hello Senlent,

Thanks for the clarification.

How I can debug it ? I want to see if the control jumps to the notification callback. mainly for Low Voltage detect.

What configuration I need to do to achieve this ? 

Thanks.

0 Kudos
Reply

813 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@AbdNxp

"Now, when I reduce the power to 2.9V debugger notifying target power lost."

I think you have some misunderstandings here. If it is lower than 2.9V, it should be an LVR event rather than an LVD event. By default, an LVR event will cause a POR instead of an interrupt.

Senlent_0-1752546605866.png

For LVD:

Senlent_1-1752557676507.png

 

0 Kudos
Reply