Hi,
I am currently working on a S32DS project for S32K118 EVB with SDK 4.0.2 included. I cannot find in mex configuration or in drivers files how to change pin mode in runtime. I need to change pin mode from default GPIO output to ADC input and back.
Best regards
Hi
Have a look at the PINS_DRV_SetMuxModeSel (hello_world_s32k118_SDK402/SDK/platform/drivers/src/pins/pins_driver.c)
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
You need to initialize ADC peripheral and GPIO output. But before ADC sample that channel, please change the pin from GPIO output to ADC input.
Since S32K11x does not support ADC interleave channel, the macro FEATURE_PINS_HAS_ADC_INTERLEAVE_EN defined as (0).