S32K322 Debug LVD HVD and error notification

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K322 Debug LVD HVD and error notification

924件の閲覧回数
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 返答(返信)

894件の閲覧回数
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 件の賞賛
返信

889件の閲覧回数
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 件の賞賛
返信

869件の閲覧回数
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 件の賞賛
返信