About pin state after deinit

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

About pin state after deinit

Jump to solution
453 Views
jetty_1012
Contributor II

Will the pin state change to default state that I configured in S32DS after the driver is deinitialized?

For example, I configured a pin to PWM, output, initial value: low.

And now my system is entering STR and I'm going to deinitializing PWM driver, will the pin be "output low" after deinitialization?

jetty_1012_0-1716861937941.png

 

Thanks.

Tags (1)
0 Kudos
Reply
1 Solution
414 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @jetty_1012,

The Siul2_Port_Ip_Init() initializes the MSCR, IMCR and GPDO registers if the pins.

The "initial value" applies to pins in the GPIO mode.

The other drivers, such as the eMIOS, do not change the configuration, that means that even if the eMIOS is disabled, the pins are still routed to the eMIOS in the MSCR, IMCR registers.

If you want to be sure the pins are set as GPIO with some defined values, you can call the Siul2_Port_Ip_Init() again with a different structure.

The configuration tool can generate more structures.

danielmartynek_0-1716903147247.png

 

Regards,

Daniel

View solution in original post

0 Kudos
Reply
5 Replies
428 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @jetty_1012,

What MCU part and driver version do you use?

Can you share the code? How do you deinitialize the ports?

 

Regards,

Daniel

0 Kudos
Reply
424 Views
jetty_1012
Contributor II

Hi @danielmartynek , thanks for your reply.

I'm using S32K312. My SW version is 3.0.0. 

 

Thanks.

0 Kudos
Reply
415 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @jetty_1012,

The Siul2_Port_Ip_Init() initializes the MSCR, IMCR and GPDO registers if the pins.

The "initial value" applies to pins in the GPIO mode.

The other drivers, such as the eMIOS, do not change the configuration, that means that even if the eMIOS is disabled, the pins are still routed to the eMIOS in the MSCR, IMCR registers.

If you want to be sure the pins are set as GPIO with some defined values, you can call the Siul2_Port_Ip_Init() again with a different structure.

The configuration tool can generate more structures.

danielmartynek_0-1716903147247.png

 

Regards,

Daniel

0 Kudos
Reply
408 Views
jetty_1012
Contributor II

Hi @danielmartynek,

Thanks for the explanation. I get it.

By the way, if I don't call Siul2_Port_Ip_Init() to initialize those pins, I just disable the drivers and use a multimeter to measure the voltages of those pins, does it mean the voltages are indeterminate?

0 Kudos
Reply
396 Views
danielmartynek
NXP TechSupport
NXP TechSupport

If the peripheral gets disabled, the pins is routed to a disabled peripheral, so in general, yes.

 

Regards,

Daniel

0 Kudos
Reply