Page 1 of 1

WiringPi onT4

Posted: Wed Sep 04, 2019 12:46 pm
by Franck.mh
Hi all,

I notice that PinMode (from wiringPi library version wiringpi-v2.44-friendlyelec-rk3399.deb ) does not work on some pin's on T4. All GPIO3_X can not be set as output.

My ridiculous test is :
#include <wiringPi.h>
int main(void)
{
wiringPiSetup() ;
pinMode (6, INPUT) ;
pinMode (5, OUTPUT) ;
pinMode (25, OUTPUT) ;
pinMode (28, OUTPUT) ;
pinMode (29, OUTPUT) ;

for(;;)
{
digitalWrite(5, HIGH) ;
digitalWrite(25, HIGH) ;
digitalWrite(28, HIGH) ;
digitalWrite(29, HIGH) ;
delay (10) ;
digitalWrite(5, LOW) ;
digitalWrite(25, LOW) ;
digitalWrite(28, LOW) ;
digitalWrite(29, LOW) ;
delay (200) ;
}
}


the result from gpio readall:
| Physical | V | Mode | Name | wPi | GPIO |
| 18 | 0 | OUT | GPIO1_C7 | 5 | 55 |
| 22 | 1 | IN | GPIO1_D0 | 6 | 56 |
| 37 | 0 | IN | GPIO3_D4 | 25 | 124 |
| 38 | 0 | IN | GPIO3_D5 | 28 | 125 |
| 40 | 0 | IN | GPIO3_D6 | 29 | 126 |


What is happening ?

Re: WiringPi onT4

Posted: Thu Sep 05, 2019 12:58 pm
by Franck.mh
Something strange appear when i try to modify the gpio line with gpio utility :
>gpio readall
| Physical | V | Mode | Name | wPi | GPIO |
| 40 | 0 | IN | GPIO3_D6 | 29 | 126 |

>gpio export 126 out
>gpio export 126 out
>gpio readall


| Physical | V | Mode | Name | wPi | GPIO |
| 40 | 1 | OUT | GPIO3_D6 | 29 | 126 |

I can apparently change the sens and value of the line but I still measure 0v to the connector.

After research, I guess the lines GPIO3_D4-6 are used together with I2S0 (line 2S0_SDI1SDO3_d to 2S0_SDI3SDO1_d)
I disable I2S0 through dts file but the problem persist