For the SIUL2 of S32V234, I want to set one GPIO as input or output. If I have already config it as GPIO function by set MUX_MODE of MSCR. But if I want to set it as input or output, how can i set the regs? Set OBE or IBE enable or disable? If so, both IBE and OBE are enabled, how about the GPIO direction?
please help to support.
Thanks.
Hello 4348638@qq.com,
On this community we handle issues regarding MATLAB/Simulink or our toolboxes. I think you can find a more detailed answer if you ask on S32V community.
I did not read the RM for S32V234, but in general, regarding OBE/IBE:
- if you want the gpio to be input, you should put OBE as disabled (check the RM for value) and IBE as enabled. In the case of using as an input, you might want to also configure PUE (pull enable) and PUS (pull select)
- if you want the gpio to be output, you should have OBE enabled (again, check the RM for appropriate value)
Either case, you should set the SSS - source signal select. Note that SSS is present both in MSCR and IMCR. For when you set the pin as output, you should use SSS from MSCR; when you set the pin as input, you should use SSS from IMCR.
For writing/reading you should use GPDO / GPDI.
Kind regards,
Razvan.