Go Down

Topic: Arduino Zero port gets greyed out (Read 177 times) previous topic - next topic

gab27

Hi,

I have an Arduino Zero, connected to native port.

I compile and upload a .ino file and after the file is uploaded the command window shows the following error message. Also the Arduino IDE under Tools/Port the field port is greyed out and I can't click on it.

Code: [Select]
Arduino: 1.8.7 (Linux), Board: "Arduino/Genuino Zero (Native USB Port)"

Sketch uses 23000 bytes (8%) of program storage space. Maximum is 262144 bytes.
Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v1.1 [Arduino:XYZ] Oct  9 2015 17:27:23
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
Boot Flash   : true
BOD          : true
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
done in 0.859 seconds

Write 23288 bytes to flash (364 pages)

[=====                         ] 17% (64/364 pages)
[==========                    ] 35% (128/364 pages)
[===============               ] 52% (192/364 pages)
[=====================         ] 70% (256/364 pages)
[==========================    ] 87% (320/364 pages)
[==============================] 100% (364/364 pages)
done in 0.196 seconds

Verify 23288 bytes of flash with checksum.
Verify successful
done in 0.093 seconds
CPU reset.
processing.app.SerialException: Error opening serial port '/dev/ttyACM0'.
at processing.app.Serial.<init>(Serial.java:147)
at processing.app.Serial.<init>(Serial.java:82)
at processing.app.SerialMonitor$4.<init>(SerialMonitor.java:101)
at processing.app.SerialMonitor.open(SerialMonitor.java:101)
at processing.app.AbstractMonitor.resume(AbstractMonitor.java:104)
at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2078)
at processing.app.Editor.access$1400(Editor.java:114)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2056)
at java.lang.Thread.run(Thread.java:748)
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.<init>(Serial.java:136)
... 8 more
Error opening serial port '/dev/ttyACM0'.


Thanks

Juraj

the board reconnects after flashing and linux has the port not as free yet so it assigns ACM01
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

gab27

and where could the mistake be. This is the port where the arduino is connected to.
It should assign to ACM0?

Juraj

this is how it is with boards with native USB of the MCU on linux. it changes port. it changes port on Windows too but not so often. I use remote upload, but if I experiment then I push the reset and the board changes the port again usually back to the first port ACM0
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

gab27

#4
Nov 14, 2018, 06:02 pm Last Edit: Nov 15, 2018, 09:02 am by gab27
But that's a severe error? In my case: I upload and immediatley the port gets greyed out.


Could the it be that somewhere Serial is defined where SerialUSB should be used for the zero?

gab27

#5
Nov 15, 2018, 03:22 pm Last Edit: Nov 15, 2018, 03:23 pm by gab27
if I type dmesg in the terminal:

These are the last 5 lines

Code: [Select]

[78505.711092] amdgpu 0000:02:00.0: GPU pci config reset
[78607.351836] usb 1-1: new full-speed USB device number 22 using xhci_hcd
[78607.500658] usb 1-1: New USB device found, idVendor=2341, idProduct=024d
[78607.500663] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[78607.501601] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[78616.517610] usb 1-1: USB disconnect, device number 22


Why does it get disconnected?

Juraj

On Uno there is a separate MCU for USB, which doesn't reset if the main CPU is flashed or reset.

SAMD MCU has USB build in. So the handling of USB is on the program in the MCU. The core code linked to your sketch handles the USB port. But when the MCU resets the USB is disconnected and connected back after reset. Linux doesn't like it and assigns a new port alias.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

gab27


Robin2

but I doesn't connect again
Exactly what does not connect?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Juraj

but I doesn't connect again
The core code linked to your sketch handles the USB port.  If the sketch hangs, the USB is not handled and the port disappers on computer. Push reset button twice to enter bootloader. Bootloader will handle the port for 10 seconds and you can upload a working sketch.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Go Up