Re: usb serial - need quirk?

From: Daniel Braniss <danny_at_cs.huji.ac.il>
Date: Mon, 29 Nov 2021 07:05:12 UTC

> On 29 Nov 2021, at 02:36, Daniel O'Connor <darius@dons.net.au> wrote:
> 
> 
> 
>> On 29 Nov 2021, at 03:39, Daniel Braniss <danny@cs.huji.ac.il> wrote:
>> 
>> hi,
>> this usb device (actually the micro usb on a esp32c3) is reported by FreeBSD 12.1 as:
>> ugen0.10: <vendor 0x1a86 USB Single Serial> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (134mA)
>> 
>> and dimes shows:
>> 
>> Nov 28 19:02:19 pampa kernel: ugen0.10: <vendor 0x1a86 USB Single Serial> at usbus0
>> Nov 28 19:02:19 pampa kernel: umodem0 on uhub3
>> Nov 28 19:02:19 pampa kernel: umodem0: <vendor 0x1a86 USB Single Serial, class 2/0, rev 1.10/4.43, addr 16> on usbus0
>> Nov 28 19:02:19 pampa kernel: umodem0: data interface 1, has no CM over data, has no break
>> 
>> it’s the last line that I think is causing failure to flash the device (probably needs the break to set the speed?)
> 
> Why would it need break to set the speed?
don’t know, but I’ve seen in the past serial stuff that needed the break to synchronize.
> 
>> any ways, is there some fix for this?
> 
> You didn't actually post the problem you are having so it's impossible to say :)

> I assume esptool fails but it would be helpful if you posted the output.
the flashing  keeps failing with:
Chip is ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 7c:df:a1:a3:61:74
Uploading stub...

A fatal error occurred: Failed to write to target RAM (result was 01070000)
> 
> I haven't used an ESP32-C3 but all of the other ESP's don't have USB built in so it depends what USB UART you have on your board - any idea which one it it?
all the other esp32 I have work fine, it’s this esp32c3 that fails.
anyways, i got hold of a ttl to usb from m5stack, and after some fiddling got it to flash!
this chip is CP2104,
so the problem seems to be in the driver for the unknown chip on this esp32c3 - no
indication in the diagrams, nor can I read the micro words on the chip :-(

thanks,
	danny

> 
> --
> Daniel O'Connor
> "The nice thing about standards is that there
> are so many of them to choose from."
> -- Andrew Tanenbaum