UART1 on GPIO

58 views
Skip to first unread message

Peter RCNC Newbery

unread,
Sep 27, 2019, 10:58:34 AM9/27/19
to Machinekit
Hi everyone!

I'm new to the project, but I'm looking at using Machinekit on BBB to be my motion controller for the Root CNC project I run. I want to use LinuxCNC as I want to add support for a 4th Axis to the machine. 

I've got it working on the BBB using the pre-compiled version and loaded the CRAMPS board, too which I would like to modify. I'm a Hardware engineer and I'm expecting to create my own cape to aligned towards a 4 AXIS CNC (dual Y), RS485 for VFD controller and input to later driver a plasma cutter. So as you can guess, software in't my strongest point - although I would like to jump in and get stuck it with it.

I want to use the HY_VFD Modbus controller/ "plugin" but do not want to use a external USB to RS485 (dev/ttyUSB0) controller but instead use the onboard UART1 port (dev/tty01) - now this is where my problems start. 

I know about the different pin modes the GPIO can be put into and by default this is mode 7, IE standard GPIO but for the UART1 port to be sent to the I/O pin, the Pin MUX setting has to be changed to mode 1 which I have no idea how to do in the HAL library. does anyone know how to do this in the HAL library? or can you point me in any directions to get this to work with the machinekit software?

Thanks for any help! 

markus

unread,
Sep 28, 2019, 4:30:18 AM9/28/19
to Peter RCNC Newbery, Machinekit
I don't have my BBB accessible right now, but if you do a

"config-pin -i p9-24"

you should see all the possible values for that pin. And then you add
the configuration (possibly something like "P9_24 uart1_txd") to the
file

"CRANPS.bbio" - or whatever your setup is using.

HTH,
Markus

Peter RCNC Newbery

unread,
Apr 4, 2020, 6:03:20 PM4/4/20
to Machinekit
This worked - thank you 
Reply all
Reply to author
Forward
0 new messages