1 1

Setting up the alternative function of NanoPi Neo pins

Recommended Posts

Hello, I use the NanoPi Neo (4.19.38-sunxi,  Armbian #5.85 ) to pool an external device over /dev/ttyS1 serial port.  At flashing moment of the external device, I should switch pins of ttyS1 to input mode by using bash commands

firmware=`ls update_*.hex`

echo "198" > /sys/class/gpio/export
echo "199" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio198/direction
echo "in" > /sys/class/gpio/gpio199/direction

# device update
flash -P linuxgpio -b 40000 $firmware

echo "198" > /sys/class/gpio/unexport
echo "199" > /sys/class/gpio/unexport

Is it possible to change up the mode of pins to the alternate function (ALT5) without the rebooting the OS?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

1 1