Use of PI port as GPIO issue

Started by morind79, March 26, 2024, 03:02:52 PM

Previous topic - Next topic

morind79

Hello,

I have a A20 Micro board and designing a daughter board that is adding a 8bit port (GPIO). I am still using an old kernel so use FEX script to setup the GPIO pins.
Here is an extraction of the 8bit port in FEX :

gpio_pin_63 = port:PI02<0><default><default><default>
gpio_pin_64 = port:PI03<0><default><default><default>
gpio_pin_65 = port:PC17<0><default><default><default>
gpio_pin_66 = port:PC18<0><default><default><default>
gpio_pin_67 = port:PC23<0><default><default><default>
gpio_pin_68 = port:PC24<0><default><default><default>
gpio_pin_69 = port:PI19<0><default><default><default>
gpio_pin_70 = port:PI18<0><default><default><default>

Then I try to set logic level for each individual bit of the 8bit port (I set logic level to 1 for 500ms and then to 0).
For the one attached to PC17, PC18, PC23 and PC24 all is working fine, LED blinks.
But for the 4 others using PI this is really strange because some are working well and suddenly PI02, PI03, PI18 and PI19 are set to HIGH even if I am not working on them ! Also if when I set HIGH to PI19, all PI02, 03, 18 and 19 get level HIGH, but if I try again with the same PI19, then all is ok. So I am completely lost here.

Can someone please help ?

Thanks
I tried to pinpoint from which bit it is doing that

LubOlimex

Are PI02, PO03, PI18, PI19 defined elsewhere in the fex? CTRL + F ?

PI18 and PI19 are defined for SPI usually, you have to either remove them from there or define other pins.
Technical support and documentation manager at Olimex