Re: SerialUSB doesn't work on Maple Mini
Posted: Sat Jan 18, 2020 1:04 am
Great 

Everything relating to using STM32 boards with the Arduino IDE and alternatives
https://www.stm32duino.com/
Code: Select all
fu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1eaf:0003
Run-time device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download [=========================] 100% 18796 bytes
Download done.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
Waiting for /dev/ttyACM0 serial...Done
# ls -l /dev/serial/by-id
insgesamt 0
lrwxrwxrwx 1 root root 13 20. Jan 18:15 usb-STMicroelectronics_MAPLEMINI_F103CB_CDC_in_FS_Mode_8D7452895051-if00 -> ../../ttyACM0
Code: Select all
# ls -l /dev/serial/by-id
ls: Zugriff auf '/dev/serial/by-id' nicht möglich: Datei oder Verzeichnis nicht gefunden
gdenton61 wrote: Wed Jan 22, 2020 11:45 pm I'm seeing something similar with the 1.8.0 core on Ubuntu, after uploading a sketch the board never shows back up as /dev/ttyACM0, so I cannot open the Serial Monitor.
To upload the sketch again I have to hit RESET right after selecting Upload.
I can then switch to Roger's core, upload a sketch using the above method and the board magically shows back up as /dev/ttyACM0, and works fine after that.
I thought the STM core worked before I updated to the latest release.
Code: Select all
int8_t led = 0;
#define csPin 7
#define csPin2 31
void setup() {
pinMode(csPin, OUTPUT);
pinMode(csPin2, OUTPUT);
digitalWrite(csPin, HIGH);
digitalWrite(csPin2, HIGH);
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
if(Serial.available()) {
char c = Serial.read();
Serial.print("hello ");
Serial.print(c);
Serial.println();
}
led = ~ led & 1;
digitalWrite(LED_BUILTIN, led);
delay(100);
}
Code: Select all
led = 1 - led;
Code: Select all
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download [=========================] 100% 16268 bytes
Download done.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
Waiting for /dev/ttyACM0 serial...Done
# ls -l /dev/serial/by-id
insgesamt 0
lrwxrwxrwx 1 root root 13 2. Feb 23:11 usb-LeafLabs_Maple-if00 -> ../../ttyACM0
Code: Select all
Setting Alternate Setting #2 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0110
Device returned transfer size 1024
Copying data from PC to DFU device
Download [=========================] 100% 19880 bytes
Download done.
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
Waiting for /dev/ttyACM0 serial...Done
# ls -l /dev/serial/by-id
insgesamt 0
lrwxrwxrwx 1 root root 13 2. Feb 20:10 usb-STMicroelectronics_MAPLEMINI_F103CB_CDC_in_FS_Mode_8D7452895051-if00 -> ../../ttyACM0
Code: Select all
# ls -l /dev/serial/by-id
ls: Zugriff auf '/dev/serial/by-id' nicht möglich: Datei oder Verzeichnis nicht gefunden