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?
Thanks.
Solved! Go to Solution.
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.
Regards,
Daniel
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
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.
Regards,
Daniel
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?
If the peripheral gets disabled, the pins is routed to a disabled peripheral, so in general, yes.
Regards,
Daniel