How to read PORST pin status

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

How to read PORST pin status

3,239 Views
jayasankar_band
Contributor I

Hello NXP.

Very Good morning.

I am working on a automotive project using MPC5746C MCU. There is a requirement like, I need to read the PORST pin on system power ON and while running in BOOT and main application.

We want to always read the PORST pin and needs to perform some operations in my application.

But, It is not mentioned like a general purpose IO pin. Can you please suggest me a method to read such pins status ?

Expecting an earlier response.

Regards,

Jayasankar

Labels (1)
0 Kudos
Reply
3 Replies

2,986 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

You are right this pin is not GPIO.

You can use ADC to read its level, once ADC is configured. But I see no benefit here as when the Power on reset is triggered the device is reset anyway and you will loose its monitoring.

Second you can read POR_LV flag of PMC[SGSR] register.

01: Indicates that a POR event had occured in the past after the time instance when.

or the RGM[DES] POR flag which indicates power on reset event in order to do branching in your application.

regards,

Peter

0 Kudos
Reply

2,986 Views
jayasankar_band
Contributor I

Hi Peter,

Thanks for the information.

I have few doubts regarding POSRT line with respect to my project. 

In my project, PORST line is connected to a +5V_SW line. So, when the PORST is active I need to keep the MCU in safe mode and when it is released I will start init and run application. 

As per this, I should keep the system in safe state until the PORST line is released/OK. 

1. Can you please explain me the behavior of MCU when the PORST line high/low. 

2. Can we set the configuration to do not perform MCU reset when there is PORST is active.

3. If we configure it to do not perform a reset, when the RGM[DES] POR status will be 0x01/0x00.

4. If the RGM[DES] POR is 0x01, when it will be cleared. So that I can start running application.

Can you please clarify these points.

0 Kudos
Reply

2,986 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

1. Can you please explain me the behavior of MCU when the PORST line high/low. 

High - MCU is powered and operating (staring from reset phase0)

pastedImage_6.png

Low - MCU does not have supply. (unpowered)

2. Can we set the configuration to do not perform MCU reset when there is PORST is active.

Yes, for 'Functional' Bidirectional Reset you can set.

3. If we configure it to do not perform a reset, when the RGM[DES] POR status will be 0x01/0x00.

makes no sense.

4. If the RGM[DES] POR is 0x01, when it will be cleared. So that I can start running application.

It doesn't matter. You clear it after power on reset, so on next reset event you will know if it was power on reset or any other kind of reset.

In my project, PORST line is connected to a +5V_SW line. So, when the PORST is active I need to keep the MCU in safe mode and when it is released I will start init and run application. 

 As per this, I should keep the system in safe state until the PORST line is released/OK. 

Why would you do it this way? MCU is in safe state if it is in reset state. So just hold externally reset on micro.

Furthermore, after exit from reset, you device will provide necessary initialization to reach state considered as safe state.

After that you can start execution of your safety related tasks.

regards,
Peter

0 Kudos
Reply