Wiringx does not set pinmux

This is annoying. Maybe I’m doing it wrong.

I used pins 16 & 17 for my bitbang i2c program, because I was having trouble with 14 & 15 for some reason (probably the same reason). To run my program I had to cvi_pinmux the pins to XGPIO. Ok fine, that worked. But, to my extreme annoyance, when I restarted the Duo and ran my program again it didn’t work. Had to cvi_pinmux those pins again.

I understand it switching to default pinmux on those pins on restart, but shouldn’t wiringx set that for me when I set a pin as a GPIO output? If it doesn’t then that’s fine, but it should have a function (method? command?) so I can set pinmux inside my program.

I guess I’ll find the processor datasheet and dig through it to find out what register(s) to change to set it in my program.

Huh. I forget sometimes that I’m running Linux on this little board. I guess I could write a quick shell script to do the pinmuxes and launch the program.

… a few minutes later …

That works just fine. I still think wiringx should take care of that, but whatever. This works. It’s not difficult.

Thank you for your feedback.
There is no automatic pinmux configuration in wiringX, and this is indeed a problem. We are working on finding a solution for this issue. Please stay tuned.

1 Like