Raspberry Pi Raspbian Jesse – free serial port ttyAMA0

I’ve posted the answer at stackexchange.

In short, disabling terminal on serial via raspi-config (advanced->Serial) should do the trick.

It it doesn’t for some reason – commenting out ttyAMA0 from /boot/cmdline.txt and disabling serial-getty via sudo systemctl mask serial-getty@ttyAMA0.service should definitely free the port.

But still one must manually set pins 15 and 16 into ALT0 state. Command-line “gpio” utility can be used for that:
gpio mode 15 ALT0
gpio mode 16 ALT0

Don’t do the manual pin ALT0 mode setting – enable UART in /boot/config.txt instead (find enable_uart=0 and change to enable_uart=1).
This will ensure /dev/ttyAMA0 will exist. Otherwise it may not exist.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s