Ich habe 2 Arduino Pro Micro von 5 V auf 3,3V umgebaut.
Dazu wurde der Spannungsregler MIC-5219-5.0V gegen einen 3,3V- Typ
ausgetauscht sowie der 16MHz- Quarz durch einen 8MHz- Quarz ersetzt.
Nach dem Umbau hatte ich dann keinen Zugriff über USB mehr.
Dmesg:
1 | usb 3-1: new full-speed USB device number 44 using ohci-pci
|
2 | usb 3-1: device descriptor read/64, error -62
|
3 | usb 3-1: device descriptor read/64, error -62
|
4 | usb 3-1: new full-speed USB device number 45 using ohci-pci
|
5 | usb 3-1: device descriptor read/64, error -62
|
6 | usb 3-1: device descriptor read/64, error -62
|
7 | usb 3-1: new full-speed USB device number 46 using ohci-pci
|
8 | usb 3-1: device not accepting address 46, error -62
|
9 | usb 3-1: new full-speed USB device number 47 using ohci-pci
|
10 | usb 3-1: device not accepting address 47, error -62
|
11 | usb usb3-port1: unable to enumerate USB device
|
Sparkfun stellt zwei verschiedene Caterina-Bootloader jeweils für die
3,3V und die 5,0V- Variante zur Verfügung.
3,3V:
1 | avrdude -p m32u4 -P /dev/ttyUSB0 -c avrisp -b 19200 -U flash:w:Caterina-promicro8.hex -U efuse:w:0xfe:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m
|
5,0V
1 | avrdude -p m32u4 -P /dev/ttyUSB0 -c avrisp -b 19200 -U flash:w:Caterina-promicro16.hex -U efuse:w:0xcb:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m
|
Die Fusebytes unterscheiden sich nur im efuse. Bei 3,3V „ 0xfe“ und bei
5,0V auf „0xcb“.
Ich nutze einen Arduino als avrisp.
1 | avrdude -p m32u4 -P /dev/ttyUSB0 -c avrisp -b 19200 -U flash:w:Caterina-promicro8.hex -U efuse:w:0xfe:m -U hfuse:w:0xd8:m -U lfuse:w:0xff:m
|
2 |
|
3 | avrdude: AVR device initialized and ready to accept instructions
|
4 |
|
5 | Reading | ################################################## | 100% 0.05s
|
6 |
|
7 | avrdude: Device signature = 0x1e9587
|
8 | avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
|
9 | To disable this feature, specify the -D option.
|
10 | avrdude: erasing chip
|
11 | avrdude: reading input file "Caterina-promicro8.hex"
|
12 | avrdude: input file Caterina-promicro8.hex auto detected as Intel Hex
|
13 | avrdude: writing flash (32758 bytes):
|
14 |
|
15 | Writing | ################################################## | 100% 0.00s
|
16 |
|
17 | avrdude: 32758 bytes of flash written
|
18 | avrdude: verifying flash memory against Caterina-promicro8.hex:
|
19 | avrdude: load data flash data from input file Caterina-promicro8.hex:
|
20 | avrdude: input file Caterina-promicro8.hex auto detected as Intel Hex
|
21 | avrdude: input file Caterina-promicro8.hex contains 32758 bytes
|
22 | avrdude: reading on-chip flash data:
|
23 |
|
24 | Reading | ################################################## | 100% 0.00s
|
25 |
|
26 | avrdude: verifying ...
|
27 | avrdude: 32758 bytes of flash verified
|
28 | avrdude: reading input file "0xfe"
|
29 | avrdude: writing efuse (1 bytes):
|
30 |
|
31 | Writing | ################################################## | 100% 0.05s
|
32 |
|
33 | avrdude: 1 bytes of efuse written
|
34 | avrdude: verifying efuse memory against 0xfe:
|
35 | avrdude: load data efuse data from input file 0xfe:
|
36 | avrdude: input file 0xfe contains 1 bytes
|
37 | avrdude: reading on-chip efuse data:
|
38 |
|
39 | Reading | ################################################## | 100% 0.02s
|
40 |
|
41 | avrdude: verifying ...
|
42 | avrdude: 1 bytes of efuse verified
|
43 | avrdude: reading input file "0xd8"
|
44 | avrdude: writing hfuse (1 bytes):
|
45 |
|
46 | Writing | ################################################## | 100% 0.02s
|
47 |
|
48 | avrdude: 1 bytes of hfuse written
|
49 | avrdude: verifying hfuse memory against 0xd8:
|
50 | avrdude: load data hfuse data from input file 0xd8:
|
51 | avrdude: input file 0xd8 contains 1 bytes
|
52 | avrdude: reading on-chip hfuse data:
|
53 |
|
54 | Reading | ################################################## | 100% 0.02s
|
55 |
|
56 | avrdude: verifying ...
|
57 | avrdude: 1 bytes of hfuse verified
|
58 | avrdude: reading input file "0xff"
|
59 | avrdude: writing lfuse (1 bytes):
|
60 |
|
61 | Writing | ################################################## | 100% 0.02s
|
62 |
|
63 | avrdude: 1 bytes of lfuse written
|
64 | avrdude: verifying lfuse memory against 0xff:
|
65 | avrdude: load data lfuse data from input file 0xff:
|
66 | avrdude: input file 0xff contains 1 bytes
|
67 | avrdude: reading on-chip lfuse data:
|
68 |
|
69 | Reading | ################################################## | 100% 0.02s
|
70 |
|
71 | avrdude: verifying ...
|
72 | avrdude: 1 bytes of lfuse verified
|
73 |
|
74 | avrdude: safemode: Fuses OK (H:FE, E:D8, L:FF)
|
75 |
|
76 | avrdude done. Thank you.
|
Nachdem ich nun den 3,3V Bootloader geflasht habe, meldet sich der Pro
Micro über USB am Rechner an.
Hier dmesg:
1 | usb 3-1: new full-speed USB device number 49 using ohci-pci
|
2 | usb 3-1: New USB device found, idVendor=1b4f, idProduct=9203
|
3 | usb 3-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
|
4 | usb 3-1: Product: Pro Micro 3.3V
|
5 | usb 3-1: Manufacturer: SparkFun Electronics
|
6 | cdc_acm 3-1:1.0: ttyACM0: USB ACM device
|
Ich habe nun die Atmega32U4 AddOns in die Arduino-IDE eingebunden.
https://github.com/sparkfun/SF32u4_boards
und das Example „blinkies“ mit den Einstellungen für den 3,3V/8MHz
Sparkfun- Arduino compiliert und auf den Arduino übertragen.
1 | /* Pro Micro Test Code
|
2 | by: Nathan Seidle
|
3 | modified by: Jim Lindblom
|
4 | SparkFun Electronics
|
5 | date: September 16, 2013
|
6 | license: Public Domain - please use this code however you'd like.
|
7 | It's provided as a learning tool.
|
8 |
|
9 | This code is provided to show how to control the SparkFun
|
10 | ProMicro's TX and RX LEDs within a sketch. It also serves
|
11 | to explain the difference between Serial.print() and
|
12 | Serial1.print().
|
13 | */
|
14 |
|
15 | int RXLED = 17; // The RX LED has a defined Arduino pin
|
16 | // The TX LED was not so lucky, we'll need to use pre-defined
|
17 | // macros (TXLED1, TXLED0) to control that.
|
18 | // (We could use the same macros for the RX LED too -- RXLED1,
|
19 | // and RXLED0.)
|
20 |
|
21 | void setup()
|
22 | {
|
23 | pinMode(RXLED, OUTPUT); // Set RX LED as an output
|
24 | // TX LED is set as an output behind the scenes
|
25 |
|
26 | Serial.begin(9600); //This pipes to the serial monitor
|
27 | Serial1.begin(9600); //This is the UART, pipes to sensors attached to board
|
28 | }
|
29 |
|
30 | void loop()
|
31 | {
|
32 | Serial.println("Hello world"); // Print "Hello World" to the Serial Monitor
|
33 | Serial1.println("Hello!"); // Print "Hello!" over hardware UART
|
34 |
|
35 | digitalWrite(RXLED, LOW); // set the LED on
|
36 | TXLED0; //TX LED is not tied to a normally controlled pin
|
37 | delay(1000); // wait for a second
|
38 | digitalWrite(RXLED, HIGH); // set the LED off
|
39 | TXLED1;
|
40 | delay(1000); // wait for a second
|
41 | }
|
Das ging ohne Fehlermeldung der IDE und der Arduino blinkt auch mit den
TX- und RX- LEDs.
Nur habe ich sofort keinen Kontakt mehr über USB.
Dmesg gibt das hier aus:
1 | usb 3-1: new full-speed USB device number 50 using ohci-pci
|
2 | usb 3-1: New USB device found, idVendor=1b4f, idProduct=9204
|
3 | usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
|
4 | usb 3-1: Product: SparkFun Pro Micro
|
5 | usb 3-1: Manufacturer: SparkFun
|
6 | dc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
|
7 | dc_acm 3-1:1.0: ttyACM0: USB ACM device
|
8 | input: SparkFun SparkFun Pro Micro as /devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:1B4F:9204.0027/input/input52
|
9 | id-generic 0003:1B4F:9204.0027: input,hidraw2: USB HID v1.01 Mouse [SparkFun SparkFun Pro Micro] on usb-0000:00:12.0-1/input2
|
10 | sb usb3-port1: disabled by hub (EMI?), re-enabling...
|
11 | sb 3-1: USB disconnect, device number 50
|
12 | usb 3-1: new full-speed USB device number 51 using ohci-pci
|
13 | usb 3-1: New USB device found, idVendor=1b4f, idProduct=9204
|
14 | usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
|
15 | usb 3-1: Product: SparkFun Pro Micro
|
16 | usb 3-1: Manufacturer: SparkFun
|
17 | cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
|
18 | cdc_acm 3-1:1.0: ttyACM0: USB ACM device
|
19 | input: SparkFun SparkFun Pro Micro as /devices/pci0000:00/0000:00:12.0/usb3/3-1/3-1:1.2/0003:1B4F:9204.0028/input/input53
|
20 | hid-generic 0003:1B4F:9204.0028: input,hidraw2: USB HID v1.01 Mouse [SparkFun SparkFun Pro Micro] on usb-0000:00:12.0-1/input2
|
Nach Neustart des Arduino das gleiche Spiel, die Dioden blinken,
allerdings kein Kontakt zum Computer.
Ich habe den Bootloader noch einmal geflasht und der Arduino meldet sich
wieder.
Dann habe ich einen leeren Sketch, also nur:
1 | void setup() {
|
2 | // put your setup code here, to run once:
|
3 |
|
4 | }
|
5 |
|
6 | void loop() {
|
7 | // put your main code here, to run repeatedly:
|
8 |
|
9 | }
|
auf den Arduino geflasht. Das gleiche Spiel. Der Sketch wird ohne Fehler
übertragen und sofort kein Kontakt mehr zum Arduino. Eine erneute
Übertragung von der IDE bricht dann mit Fehlermeldung ab.
Es scheint, als ob bei der Übertragung des Sketches in den Bootloader
geschrieben wird und damit die Kommunikation über USB unterbrochen wird.
Inzwischen bin ich ziemlich ratlos und hoffe auf Eure Hilfe.