This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Serial Communication Issue with TM4C123GH6PM in Linux

Other Parts Discussed in Thread: TM4C123GH6PM

Hi,

I am trying to control stepper motor using Tiva C series TM4C123GH6PM LaunchPad Evaluation Kit.

Kit is connected to Computer using USB Cable(serial communication).

I am trying to rotate motor clockwise if input "12" is sent to serial port and anticlockwise when "13" is sent to serial port.

In windows

Kit is detected as com3. When I send "12" to serial port(com 3) by command :  echo 12 > com3 , motor rotates clockwise as expected.

In Linux

Kit is detected as /dev/ttyACM0 . When I send "12" to serial port(/dev/ttyACM0) by command :  echo 12 > /dev/ttyACM0 , motor does not spin.

Is I am missing something.

Thanks,

Tushar

  • tushar nimje said:

    In Linux

    Kit is detected as /dev/ttyACM0 . When I send "12" to serial port(/dev/ttyACM0) by command :  echo 12 > /dev/ttyACM0 , motor does not spin.

    Is I am missing something.

     have you used stty to set / view if all parameter are ok?

     why not use a terminal like moserial or gtkterm (serial port terminal) adding some debug feature too?

  • Hi,

    Thanks for your reply Roberto Romano.

    1) I tried to set baud rate and stop bits using command: " stty -F /dev/ttyACM0 9600 -cstopb"  and sent 12 as input through "echo 12>/dev/ttyACM0"   -> motor does not spin.

    2) Tried to set up parameters using moserial and sent 12 as an input (ASCII and Hex both), still motor does not spins.

    Is I need to do more configuration?

    Thanks,

    Tushar

  • When you send command or invoke stty you receive some error message or it set and echo new baud rate?
    same on moserial, on connect you receive acknowledge and connection open or report failure?
    To debug trouble try send some character from launchpad to see if communication is ok or just lock reset at low and connect rx to tx to see if echo come back, if this doesn't work trouble can come from linux settings, is tty device on dialout group with RW granted right?