sam-ba can only sometimes switch /dev/ttyACM0 to binary mode on my desktop. Always works on my work laptop

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I write firmware to a SAMA5D2 based card with sam-ba using a custom QML script (just a wrapper for applet.write). On my work machine (a Debian VM on a Macbook Pro) this works 100% of the time. I boot the card into romboot, run the script with sam-ba -x ... and it writes the whole image. However, the exact same software only works on my home machine some of the time, maybe one success for every five attempts. (I'm running Manjaro on an AMD B450 chipset). When it fails sam-ba gives the error


Opening serial port 'ttyACM0'
Error: Could not switch monitor on port 'ttyACM0' to binary mode
Connection closed.

On my home machine the serial port always presents as

$ stty -F /dev/ttyACM0
speed 9600 baud; line = 0;
-brkint -imaxbel


Where the work machine it's

$ stty -F /dev/ttyACM0
speed 921600 baud; line = 0;
min = 0; time = 0;
-brkint -icrnl -imaxbel
-isig -icanon -iexten -echo

I'm unsure how to go about debugging this. Is this a Linux config issue where my serial port isn't being set up correctly?

Last Edited: Fri. Jul 17, 2020 - 02:31 AM