logo elektroda
logo elektroda
X
logo elektroda

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

madamsz1 414 6
ADVERTISEMENT
This content has been translated flag-pl » flag-en View the original version here
  • #1 21902993
    madamsz1
    Level 42  
    Posts: 5832
    Help: 1048
    Rate: 1690
    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: 14556
    Help: 654
    Rate: 12568
    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
  • #3 21903261
    madamsz1
    Level 42  
    Posts: 5832
    Help: 1048
    Rate: 1690
    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
  • #4 21903304
    Chris_W
    Level 39  
    Posts: 8447
    Help: 383
    Rate: 1042
    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
  • #5 21903506
    madamsz1
    Level 42  
    Posts: 5832
    Help: 1048
    Rate: 1690
    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: 8447
    Help: 383
    Rate: 1042
    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
  • #7 21903686
    madamsz1
    Level 42  
    Posts: 5832
    Help: 1048
    Rate: 1690
    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
ADVERTISEMENT