logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[Solved] Sonoff S60 ESP32C3 - chip sync error, how to unlock and upload soft?

madamsz1 654 7
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • ESP32-C3 sync error suggests bootloader or RX issue

    #1 21902993
    madamsz1
    Level 42  
    Posts: 5866
    Help: 1054
    Rate: 1703
    Sonoff S60 socket

    White Sonoff S60 smart plug next to a gray retail box on a white background

    At first I had a problem with uploading the new software (here I'm running on Supli), in probably 3-4 times it went and it started to work, but I want to change something and the stairs started.
    At the moment however I try to upload something I get different errors depending on which WEBTool, but it looks like there is an "ESP32 Chip sync error esp_sync_blocking". This is what Flash Download Tools 3.9.10 reports, looks like bootloader corruption? I uploaded it with something like this:

    USB adapter module with capacitor and yellow pin header on a black PCB

    Now I have tried other USB programmers on the CP2102 and all the time it looks like TX goes, while no RX response.
    How can I unlock the ESP32C3 or otherwise upload something and get it back to normal programmability?
    The program that sits there now works and the socket functions, but I want to change the soft.
    I have changed the speeds on the port.
    Please make the instructions :D relatively simple, as I know little about programming.

    Pictures and link from Github what it looks like inside.
    https://github.com/arendst/Tasmota/discussions/21255
  • ADVERTISEMENT
  • #2 21903227
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14699
    Help: 656
    Rate: 12743
    So wait, do I understand correctly, there is already some of your software uploaded there? And you want to change it? AND THE OTA?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Missing EN capacitor may block ESP32C3 flashing

    #3 21903261
    madamsz1
    Level 42  
    Posts: 5866
    Help: 1054
    Rate: 1703
    Yes the soft is uploaded, not mine, but it is and it works, but I want to clear this socket and upload something else. I did a little experiment and it looks like the problems started after that. I don't know how to do it via OTA, while I wonder if it would go via JTAG, because I have some programmer that supports that. I've also read that there are sometimes problems with these ESP32C3s on devices with dedicated PCBs, as here in the S60, because you need an additional circuit on 2 transistors and often there is an additional delay capacitor missing on the EN pin (there is none here in the S60).
    Schematic of CP2102 with microUSB and a dual BC817 transistor circuit driving EN and PROG_IO
  • Check UART output and use Supla OTA update

    #4 21903304
    Chris_W
    Level 39  
    Posts: 8465
    Help: 384
    Rate: 1048
    Does anything at all appear on this uart when power is applied? Is there a jumper or switch from the BOOT pin somewhere?
    I think the supli gui-builder had an OTA - but as I remember correctly you had to activate it when creating the "project".
    When you reset the device, a new wifi network will appear - connect to it - go to the standard supla-device IP (192.168.4.1) - the device config will open and there should be a firmware change via wifi (OTA)
    https://gui-generic-builder.supla.io/guide/aktualizacja-oprogramowania
    https://gui-generic-builder.supla.io/guide/diagnostyka
  • ADVERTISEMENT
  • Suspected faulty RX pin on ESP32C3

    #5 21903506
    madamsz1
    Level 42  
    Posts: 5866
    Help: 1054
    Rate: 1703
    For esp8266 devices, Supla has a two-step update. The ESP32 on the other hand goes normally.
    I don't have the normal software from Supla GG uploaded, just the Zamel software for a little experiment whether the Sonoff S60 is the same as the Zamel SGW-01 and .... .
    Now I wanted to go back to the soft generated from the GUI and the problem started, and I think the problem will be a faulty RX port on the ESP32C3 because strangely enough it is pulled up to 3.2V on the TX and by some miracle it has 3.6V on the RX when supplied with 3.3V. Something is agitating on the ESP and I've recently fleshed out two more devices which will need to be taken apart and checked as I think the problem went from the programmer. I'll hook up the oscilloscope some more, but it looks like nothing is going on RX even the terminal isn't reading anything.
    This is how it is in the original Zamel modules with Supla:

    Sonoff S60 ESP32C3 - chip sync error, how to unlock and upload soft? Sonoff S60 ESP32C3 - chip sync error, how to unlock and upload soft?
  • #6 21903614
    Chris_W
    Level 39  
    Posts: 8465
    Help: 384
    Rate: 1048
    I gave up supli a long time ago and switched to esphome. But I had my first few devices at home on supli, so I don't remember the details. Anyway, flashing on supli never did any problems.
    The only problems I had with ESP programming were due to poor USB-UART converters (at the beginning of the adventure) - now I use the nucleo board as a converter - always stable signals, power available etc.
  • ADVERTISEMENT
  • Series resistors on ESP32C3 TX and RX lines block programming

    #7 21903686
    madamsz1
    Level 42  
    Posts: 5866
    Help: 1054
    Rate: 1703
    This programmer is so long ago bought and until now there has not been the slightest problem. However, I could also have messed up, because there is 5V coming in these sockets with which you have to power it or solder into a small board for 3.3V, but still something "comes back" because 2.8V appears before the stabiliser. I don't know, I'm not going to analyse it. I was just looking through the schematics of various solutions and what puzzles me is that in this Sonofie S60 the TX and RX signals are brought out for programming, but analysing the routing of these signals to the ESP32C3 chip there are resistors in series on the way. In the TX line - 470k ohms while in the RX line - 100 ohms. It's a bit strange because I've encountered the same values everywhere. Well, but I experimented and it doesn't talk anything on RX. I will order and substrate an ESP32C3 out of curiosity
  • ESP32C3 Super Mini programmed successfully in Sonoff S60

    #8 21919611
    madamsz1
    Level 42  
    Posts: 5866
    Help: 1054
    Rate: 1703
    I haven’t had much time recently, but I’ve managed to get it done – I’ll explain what happened.
    The new ESP32C3 arrived, I soldered it onto the board, but I still couldn’t get it to program. There was some progress – it was recognised correctly – but it wouldn’t let me program it. I desoldered that ESP32C3, soldered an ESP32C3 Super Mini onto the board, and it turned out that it programmed correctly. So, it went back into the Sonof S60, reprogrammed, and the socket works. I don’t know what the problem is with the original board. I even compared the measurements with another socket and the resistance values weren’t very different.
    Well, that’s done. It would have been cheaper to buy a new one and program it, but then I wouldn’t have learnt anything :D .
    I’m closing this thread, thanks for the suggestions.
ADVERTISEMENT