Date: Wed, 14 Sep 2022 18:55:05 +0300 From: Daniel Braniss <danny@cs.huji.ac.il> To: CeDeROM <cederom@tlen.pl> Cc: freebsd-hackers <hackers@freebsd.org>, "usb@freebsd.org" <usb@freebsd.org> Subject: Re: USB chip CH9102F Message-ID: <DA41DFB7-C619-4801-A067-F816D83A7BD6@cs.huji.ac.il> In-Reply-To: <CAFYkXjmrA=jR69JwS=dt-H%2BNotQw6zT2H5JGzQk4P92nmJn9Sg@mail.gmail.com> References: <DD3BBD04-3455-4732-9DA1-68D79A2195A3@cs.huji.ac.il> <CAFYkXjmrA=jR69JwS=dt-H%2BNotQw6zT2H5JGzQk4P92nmJn9Sg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] > On 14 Sep 2022, at 18:14, CeDeROM <cederom@tlen.pl> wrote: > > On Wed, Sep 14, 2022 at 3:43 PM Daniel Braniss wrote: >> Hi, >> is there/will there be any support for this chip? CH9102F. >> >> there is a driver for linux and windows, but event though it sort of works on FreeBSD, >> the magic needed to flash the firmware on newer esp32’s is not working. > > I also bought USB-C based UART-to-USB adapter from Waveshare with > CH343G chip and use it for ESP32 flashing. > > This chip is a bit tricky and I have noticed it is less reliable for > initial flashing on a custom ESP32 board (boot mode selection using > RTS/CTS pins). It sometimes fails, while older USB-UART converters > works fine. > > What are your problems exactly? > > Are you sure this is not the custom hardware design issue? > > Do you have Reset and BootSel pins on your board that you can trigger > by hand in order to help USB-UART cable? > > What is your magic that you need to do in order to flash the chip successfully? > > Does standard operations (UART CLI) work as expected? > > Did you take a look at man stty and use stty crtscts <port> / stty > -crtscts <port> to see if that fixes anything? > > -- > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info i have many esp32’s, all the old ones work fine, it’s only the latest ones, for example: m5stac esp3c3 and my latest batch of m5stack base black v1,26 which i get: pampa> /vol/src/esp/current/components/esptool_py/esptool/esptool.py -p /dev/ttyU0 read_mac esptool.py v3.3-dev Serial port /dev/ttyU0 Connecting... Failed to get PID of a device on /dev/ttyU0, using standard reset sequence. . Detecting chip type... ESP32-C3 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: Operation timed out) the fatal error I also get when trying to flash/erase/ etc. i have some esp32 that have usb, some don’t, some can flash, some need sounding g0, etc, I can mostly work with them, it’s only the latest batch, which ’seem’ to have this CH9102f that fail to flash with the above ‘A fatal error …’ BTW, regular connect via usb works, so i get console messages ok. thanks, danny [-- Attachment #2 --] <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 14 Sep 2022, at 18:14, CeDeROM <<a href="mailto:cederom@tlen.pl" class="">cederom@tlen.pl</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Wed, Sep 14, 2022 at 3:43 PM Daniel Braniss wrote:<br class=""><blockquote type="cite" class="">Hi,<br class="">is there/will there be any support for this chip? CH9102F.<br class=""><br class="">there is a driver for linux and windows, but event though it sort of works on FreeBSD,<br class="">the magic needed to flash the firmware on newer esp32’s is not working.<br class=""></blockquote><br class="">I also bought USB-C based UART-to-USB adapter from Waveshare with<br class="">CH343G chip and use it for ESP32 flashing.<br class=""><br class="">This chip is a bit tricky and I have noticed it is less reliable for<br class="">initial flashing on a custom ESP32 board (boot mode selection using<br class="">RTS/CTS pins). It sometimes fails, while older USB-UART converters<br class="">works fine.<br class=""><br class="">What are your problems exactly?<br class=""><br class="">Are you sure this is not the custom hardware design issue?<br class=""><br class="">Do you have Reset and BootSel pins on your board that you can trigger<br class="">by hand in order to help USB-UART cable?<br class=""><br class="">What is your magic that you need to do in order to flash the chip successfully?<br class=""><br class="">Does standard operations (UART CLI) work as expected?<br class=""><br class="">Did you take a look at man stty and use stty crtscts <port> / stty<br class="">-crtscts <port> to see if that fixes anything?<br class=""><br class="">--<br class="">CeDeROM, SQ7MHZ, <a href="http://www.tomek.cedro.info" class="">http://www.tomek.cedro.info</a><br class=""></div></div></blockquote><br class=""></div><div>i have many esp32’s, all the old ones work fine, it’s only the latest ones, for example: m5stac esp3c3 and my latest</div><div>batch of m5stack base black v1,26 which i get:</div><div><br class=""></div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">pampa> /vol/src/esp/current/components/esptool_py/esptool/esptool.py -p /dev/ttyU0 read_mac</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">esptool.py v3.3-dev</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Serial port /dev/ttyU0</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Connecting...</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Failed to get PID of a device on /dev/ttyU0, using standard reset sequence.</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">.</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Detecting chip type... ESP32-C3</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Chip is ESP32-C3 (revision 3)</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Features: Wi-Fi</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Crystal is 40MHz</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">MAC: 7c:df:a1:a3:61:74</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">Uploading stub...</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)</span><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><br class=""></span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class=""><br class=""></span></div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 12px;" class="">the fatal error I also get when trying to </span><font color="#000000" face="Menlo-Regular" class=""><span style="caret-color: rgb(0, 0, 0); font-size: 12px;" class="">flash/erase/ etc.</span></font></div><div class=""><font color="#000000" face="Menlo-Regular" class=""><span style="caret-color: rgb(0, 0, 0); font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font color="#000000" face="Menlo-Regular" class=""><span style="caret-color: rgb(0, 0, 0); font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font color="#000000" face="Menlo-Regular" class=""><span style="font-size: 12px;" class="">i have some esp32 that have usb, some don’t, some can flash, some need sounding g0, etc,</span></font></div><div class=""><font color="#000000" face="Menlo-Regular" class=""><span style="font-size: 12px;" class="">I can mostly work with them, it’s only the latest batch, which ’seem’ to have this CH9102f that</span></font></div><div class=""><font color="#000000" face="Menlo-Regular" class=""><span style="font-size: 12px;" class="">fail to flash with the above ‘A fatal error …</span><span style="caret-color: rgb(0, 0, 0); font-size: 12px;" class="">’</span></font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">BTW, regular connect via usb works, so i get console messages ok.</div><div class=""><br class=""></div><div class="">thanks,</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>danny</div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DA41DFB7-C619-4801-A067-F816D83A7BD6>
