S32K322 Debug LVD HVD and error notification

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K322 Debug LVD HVD and error notification

869 次查看
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 项奖励
回复
3 回复数

839 次查看
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 项奖励
回复

834 次查看
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 项奖励
回复

814 次查看
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 项奖励
回复