Skip to content

No sketch is not running on my D1 Mini Pro. Even not the "Blink"-Sketch. #7964

Closed

Description

@Mathias2803

I was able to flash several "D1 Mini V3" with different Sketches and I never had a problem. But due to the external antenna I decided to get a "D1 Mini Pro".

I am able to flash the sketch on the board without error messages, but then nothing is happening.

I even tried the "Blink" example code, but even with this program I had no success.
When I push the reset button with the connected serial output I get following message:

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3584, room 16 
tail 0
chksum 0x55
csum 0x55
csum err
ets_main.c 

Here you can see my Arduino IDE settings:
image

Can anybody help me what I am doing wrong?

Thanks a lot and kind regards Mathias


Activity

  1. d-a-v commented on Apr 6, 2021

    @d-a-v
    Collaborator

    Try a full flash erase ("Erase flash" entry).
    Also check with esptool.py that your flash is 16MBytes.

  2. Mathias2803 commented on Apr 7, 2021

    @Mathias2803
    Author

    Hello, thanks for your feedback.

    The esptool.py gives out following information, so the flash size seems to be 16MB:
    image

    I also made a a full flash erase as you can see in my settings now:
    image

    But after the restart still the same error message and even the example skretch "Blink" is not running:
    image

    What else can I do to get it running?

    Thanks a lot, kind regards Mathias

  3. changed the title [-]"Blink"-Sketch is not running on my D1 Mini Pro[/-] [+]No sketch is not running on my D1 Mini Pro. Even not the "Blink"-Sketch.[/+] on Apr 7, 2021
  4. Jason2866 commented on Apr 8, 2021

    @Jason2866
    Contributor

    Try a slower upload speed. I have several devices not working with 921600.
    You can try with 115200

  5. Mathias2803 commented on Apr 9, 2021

    @Mathias2803
    Author

    I have changed the upload speed to 115200 but still the same error message at the end.

    image

  6. Jason2866 commented on Apr 9, 2021

    @Jason2866
    Contributor

    There is a high chance that the board is just defect.

  7. d-a-v commented on Apr 9, 2021

    @d-a-v
    Collaborator

    Another test would be to try another flash mode by selecting the "esp8266 generic board".
    D1 is by default DIO, you could try DOUT.

  8. devyte commented on Apr 9, 2021

    @devyte
    Collaborator

    Try also:

    • without FS (the ingo above shows 14MB FS)
    • selecting 4MB flash size (your flash chip may be fake despite being detected as 16MB)
  9. Tech-TX commented on Apr 10, 2021

    @Tech-TX
    Contributor

    I'd bet money on the Flash mode David mentioned above. 👍 I wasn't aware that it defaulted to DIO; I thought most of them were DOUT. Since there are probably more cheap clone D1 Mini Pro boards than official Lolin boards, maybe I should do a PR to switch that to DOUT. The error message is a checksum error, which can happen if the chip is in a mode that it can't support at 40MHz. I have a clone D1 Mini Pro V1.x and a couple of real Lolin D1 Mini Pro V2.x boards that work with the current defaults, but that's no guarantee that a clone with cheap Flash from Wo Fat Electronics will work.

  10. Jason2866 commented on Apr 10, 2021

    @Jason2866
    Contributor

    It seems new crappy boards are out there arendst/Tasmota#11615
    Changing flash chip didn´t help.

  11. d-a-v commented on Apr 10, 2021

    @d-a-v
    Collaborator

    @Mathias2803
    Can you provide a photo of your flash chip?
    Can you use esptool.py to identify it ?

    @Jason2866
    I can't seem to understand whether the issue you mention came to a conclusion ?
    It seems it's not the flash chip since it has been replaced.
    What version of the core is used in these tries ?

    @Tech-TX
    The DIO configuration for d1 mini was made by @wemos
    If a change has to be made, what about

    • adding the flash mode menu for wemos boards (with DIO by default)
    • adding a new board labeled "wemos d1 mini clone" "wemos d1 mini pro clone" with DOUT
  12. Jason2866 commented on Apr 10, 2021

    @Jason2866
    Contributor

    @d-a-v i dont think it is the flash chip. Imho the board design is crappy at all.
    Core is 2.7.4.x (we added some backports)
    I have a batch of (clone) NodeMCU which never did run stable. Only after replacing the ESP8266 chip the worked as expected (with 160Mhz too). The have no ESP-12F module soldered. Builded with ESP8266 and extra Flash chip like the module here and the one in Tasmota discussions

  13. Mathias2803 commented on Apr 10, 2021

    @Mathias2803
    Author

    Thanks for all your support. I will try all later. But here is the photo from my board as good as I can do it.

    3DA933FE-8227-4166-89F0-967F0775E1F1
    DE9FBCD9-4988-4171-89D7-7CC2BEA6E81D

  14. Mathias2803 commented on Apr 10, 2021

    @Mathias2803
    Author

    This is the chip I have ordered:
    https://a.aliexpress.com/_msEoiOT

  15. Tech-TX commented on Apr 10, 2021

    @Tech-TX
    Contributor

    Hi, @d-a-v ! I'm willing to do anything that you gentlemen think will help, David. I'll let you folks set the direction. As I'd mentioned above, Wemos doesn't make the D1 Mini Pro any longer, and the authentic Lolin D1 Mini Pro are rare since they cost 2x what a clone board does. Simpler than adding another board type is allowing the Flash mode to be selectable for the D1 Mini Pro with the initial default set to DOUT. That will raise the fewest issues with "my board doesn't work..." I have a couple of boards marked WEM*S (cheap clones), so the name on the board could easily be misleading to newbies.

    I'd thought that the default Flash mode was changed to DOUT as it works with nearly all Flash brands, fewer questions & issues. The only weird part I've heard of (haven't seen myself) was Macronix MX25L3205D which only works in DIO mode, not DOUT. That Flash was on a clone D1 Mini that one person was having issues with. The Winbond parts I have work in all 4 modes; I bought 50 of their 4MB parts in case I needed to swap out cheap Flash. ;-)

    I was wrong earlier, the Lolin D1 Mini Pro boards I have are v2.0.0, not v3.x.

    @Mathias2803 Those photos look like a really cheap clone. I hadn't seen anyone use an unbranded ceramic antenna yet; all of the boards I'd seen use the Rainsun antenna. That likely means the rest of the parts on the board are also floor sweepings. The Flash chip has marking of a Micron 16MB Flash although the chip looks shiny, and the real Micron chips I've seen are a matte finish. That's the hallmark of a rebranded IC, so no telling what the Flash truly is. You can read out the Flash ID with this:
    esptool.py -p COMx flash_id (Windoze, where COMx is whatever COM port your board ends up at)

    The LDO voltage regulator has the marking used by a Torex XC6102, a 300mA 3.3V regulator (a little underpowered for ESP8266) but again, there's no honor among thieves so it may be a cheap Chinese clone part that only runs 150mA. If the LDO is underrated, there's a quick low-power test you can run that will boot with a 150mA regulator:

    #include <user_interface.h>
    
    #define _R (uint32 *)PERIPHS_RTC_BASEADDR
    #define valRTC 0xFE000000  // normal value during CONT (modem turned on)
    
    RF_PRE_INIT() {
      *(_R + 4) = 0;  // value of RTC_COUNTER for wakeup from light/deep-sleep (sleep the modem)
      system_phy_set_powerup_option(2);  // stop the RFCAL at boot
      wifi_set_opmode_current(NULL_MODE);  // set Wi-Fi to unconfigured, don't save to flash
      wifi_fpm_set_sleep_type(MODEM_SLEEP_T);  // set the sleep type to Forced Modem Sleep
    }
    
    void preinit() {
      *(_R + 4) = 0;  // sleep the modem again after another initialize attempt before preinit()
      wifi_fpm_open();  // enable Forced Modem Sleep
      wifi_fpm_do_sleep(0xFFFFFFF);  // enter Modem Sleep mode
      // won't go into Forced Modem Sleep until it sees the delay() in setup()
    }
    
    void setup() {
      *(_R + 4) = valRTC;  // Force Modem Sleep engaged, set the modem back to 'normal' briefly
      delay(1);  // and sleep the modem at 18mA nominal substrate current
      Serial.begin(74880);  // bootloader baud rate so you can also see the boot message
      pinMode(LED_BUILTIN, OUTPUT);
    }
    
    void loop() {
      Serial.println("I'm alive!");
      digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
      delay(500);
    }

    You can either monitor the serial port at 74880 baud or watch the blinky LED to see that it booted correctly. If that runs, then I'd immediately file a complaint with the seller you bought from as there's no way the board will work with WiFi on.

  16. 3 remaining items

  17. Tech-TX commented on Apr 10, 2021

    @Tech-TX
    Contributor

    Hi, Mathias! The only D1 Mini Pro boards I can truly recommend are the real boards from Lolin that I linked above. Everything else I've seen was poor quality design, poor parts, or both. I have a couple of boards very much like yours that I bought >here< last year, although there's no guarantee that he still has the same quality boards. The Flash chip on the ones I got is a 16MB Winbond, which is one of the better Chinese brands. It has the same poor bypass around the LDO, though. I had some 10uF 0805 caps, so I bodged them in place of the (2) 0603 bypass caps around the LDO. It worked fine before I did the mod to the bypass caps, but I'm cautious with power. One of the comments suggests that what he's selling now doesn't have the Winbond Flash chip on it. I paid around $3.50USD for the boards I bought, and the same ad is showing $1.17 each for three boards now so he obviously found a cheaper source.

    Did the low-current blink sketch I listed above work for you? That only briefly needs a maximum of 50mA, the rest of the time it's running around 35mA (or less) substrate current for the ESP8266. If your LDO is dropping out, that should boot.

  18. Mathias2803 commented on Apr 10, 2021

    @Mathias2803
    Author

    Thanks d-a-v for his tip. I have changed to DIO and it is running now.

    Thanks a lot!!

    image

  19. Mathias2803 commented on Apr 10, 2021

    @Mathias2803
    Author

    Hey Tech-Tx,
    I guess you see that I could get my board running, BUT I don't wanna have a board with bad quality where I cannot relay on the functionality later. So my next order should be a better one.
    Can you explain me the problem on my board?
    And if I wanna order the "real" ones, how do I recognice them? Is this the correct link from you? It has a different boad size, is this correct? (https://www.aliexpress.com/item/32724692514.html?spm=a2g0o.store_home.productList_2559240.pic_1)
    Thanks a lot for your support, kind regards Mathias

  20. Mathias2803 commented on Apr 10, 2021

    @Mathias2803
    Author

    I also run your "Low-Power-Test" but I'm not sure if this helps anything to check the quality?

    Here is the result:

    image

    Kind regards Mathias

  21. Tech-TX commented on Apr 11, 2021

    @Tech-TX
    Contributor

    Cool! The problem was that your Flash wouldn't run in DIO mode. (You nailed it, @d-a-v) It probably won't run in the Quad modes either. At least it's not power related, if it runs a normal 'blink' sketch. Mine is for a special case where you don't have enough power.

    Yes, the Ali link is authentic Lolin boards. They use Winbond Flash since it's very reliable. They also use a 600mA LDO regulator, which is excellent. Build quality like that is why they cost 3X what the cheap clones cost. However, they work. The ugly truth of clones is that you rarely get the same thing twice, and the next batch will invariably be worse than the last as they shave pennies off of the cost. If you're only buying a few boards for learning, then I'd always recommend an authentic board and not a clone. If you're buying tens of boards, it's harder to choose... I look VERY closely at the photos and then ask if the board is EXACTLY like the photo (not a representative sample). I recognize good parts, though that's tough with anything made in China. Can I get a schematic for it? I've worked in electronics & microprocessors since ~ 1976, so I have experience. Recognizing good vs. poor components isn't something I can teach in a paragraph or three; the same goes for board layout, and rules of thumb for component selection.

  22. Mathias2803 commented on Apr 12, 2021

    @Mathias2803
    Author

    Thanks a lot for your support.

    Should I close the issue due to the fact that is is solved or is this done by an admin after there have been modifications in Arduino IDE?

    Kind regards Mathias

  23. devyte commented on Apr 15, 2021

    @devyte
    Collaborator

    Closing.

  24. d-a-v commented on Apr 15, 2021

    @d-a-v
    Collaborator

    @devyte
    Do you think we should do something about the Arduino IDE and the default flash mode ?
    Users may not be aware about official boards named LOLIN, good clones named WEMOS, and bad clones named whatever.
    The board in the IDE is "LOLIN (WEMOS)", and it is not immediately obvious to the user whether a wrong choice has been made or by whom, and nowhere is advised that the generic board has to be selected and DOUT chosen as flash mode, at least for a try.
    Before this was closed there were several choices:

    • rename current LOLIN (WEMOS) to LOLIN using DIO and add WEMOS(clone) using DOUT,
    • change LOLIN (WEMOS) from using DIO to DOUT,
    • add the flash mode menu to LOLIN(WEMOS).
  25. devyte commented on Apr 15, 2021

    @devyte
    Collaborator

    In general, my thinking is that there are too many variants out there combining weird flash chips under cloned names, and we can't individualize them all in the board selection.
    Having said that, I like your idea: we could have "clone" boards that default to the slowest most compatible flash mode.

    Reopening.

  26. reopened this on Apr 15, 2021
  27. devyte commented on Apr 15, 2021

    @devyte
    Collaborator

    About the options you listed:

    rename current LOLIN (WEMOS) to LOLIN using DIO and add WEMOS(clone) using DOUT

    I don't think this is a good idea. The current board name was requested by someone at Lolin.

    change LOLIN (WEMOS) from using DIO to DOUT

    This would degrade all users of the real boards.

    add the flash mode menu to LOLIN(WEMOS).

    This sounds like a good idea.

    I see the following possibilities:

    • Simply add the flash mode menu to the LOLIN(Wemos) board like you said
    • Leave the current LOLIN(Wemos) board intact and add a new board LOLIN/Wemos clone that uses DOUT
    • A combination of both: leave the current LOLIN intact, and add a new LOLIN/Wemos clone board that has the flash mode menu included, DOUT mode by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions