Powering on the c3u



  • Hi M5Stack.

    I have a sligt problem powering on the M5Stamp c3u devises I got.
    I have a package of 5, and none of them (so far tested 4) seems to run the standart progam that comes on the board, when not pluged into a computer.
    I.e., if I either hook its 5v and ground pins up directly, or if I hook it up to a usb charger. The same board however works fine when usb is connected to my computer.
    I also have a M5Stamp c3 which works when hooked up to pins, and to external usb powersupply.

    So far I have not installed the suggested drivers on my computer, since I managed to program this following example on my first attemt (and because I want to use platform IO and not the arduino IDE).
    https://github.com/leCandas/M5Stamp-C3
    But since the behaviour is also present on the bords I have not used, I dont think that is related.

    Also what is the accepted voltage range on the 5v input, I cant seem to find it on the documentation page https://docs.m5stack.com/en/core/stamp_c3u?

    Best regards
    Kenneth



  • Hello @KjaerN

    hmm, my M5StampC3U does not exhibit the behavior you are describing. The program starts up when USB is plugged into a computer, an USB charger or an USB power bank. It also starts up when power is supplied via 5 V and GND pins.

    Have you tried to press the little reset button on the M5StampC3U to start the program?

    The M5StampC3U, according to its schematic, uses a DC/DC converter HM8089 with a maximal input voltage of 5.5 V, according to its datasheet.

    Thanks
    Felix



  • Hello @felmue

    Well, that was also the beahviour I would expect.
    so I just pulled the last "untuched" board out of the foil, and plugged it straight into a usb charger. But still nothing happens, when I press either buttons.
    But yes, I had also tried the reset button with the other boards.

    Then I plugged this new one into my pc, and it emidiatly worked.
    Really strange. And unfortunatly not that usefull for the application I had in mind, if it only runs when hooked up to a pc.

    Thanks for the reply, and for the input specs.
    Kenneth



  • Hello @KjaerN

    I am wondering if for some reason your M5StampC3U, when not PC USB powered, comes up in download mode. If you have a multi meter, you could measure the level of GPIO9. For normal SPI boot mode it should be HIGH (~ 3.3 V). (For download mode it would be LOW.)

    If you have a regular USB Serial converter you should be able to see the debug output of the M5StampC3U. That could probably tell you more about why it did not start to run properly. Connect GND and GPIO21 (TX) of the M5StampC3U to GND and RX of the USB Serial converter.

    Thanks
    Felix



  • Hi @felmue

    Thanks again.
    Yes, indeed, it is set to high (3.3v between ground and gpio9). And that is the case both when connected to powersupply and pc.
    I have an old FTD1232 (FT232RL I think it is), for uploading sketches to some old arduino pro mini boards. But I have never used it for debugging purposes, and have not used it for years. So not sure how to get that debug info out.
    I have tried with the Python serial module, but non of the listed ports in device manager will allow me to connect.

    The bord I have uploaded this to:
    https://github.com/leCandas/M5Stamp-C3

    gives the following error in the serial output, but continious executing the expected code:
    22:52:51.175 > Build:Feb 7 2021
    22:52:51.176 > rst:0x15 (USB_UART_CHIP_RESET),boot:0xd (SPI_FAST_FLASH_BOOT)
    22:52:51.176 > Saved PC:0x40385a1c
    22:52:51.176 > SPIWP:0xee
    22:52:51.178 > mode:DIO, clock div:1
    22:52:51.180 > load:0x3fcd6100,len:0x38c
    22:52:51.182 > load:0x403ce000,len:0x6a8
    22:52:51.185 > load:0x403d0000,len:0x236c
    22:52:51.190 > SHA-256 comparison failed:
    22:52:51.194 > Calculated: 86b6856493d23fe741a1623c3d149a38bdf91ca0101173d85f25c3fdb6d605ee
    22:52:51.200 > Expected: e7bbd322b12b609ed444a0547cebdc54bbcf46aefed1e04449d9827791f3e8ab
    22:52:51.203 > Attempting to boot anyway...
    22:52:51.205 > entry 0x403ce000

    But given the ones I havent put anything on is failing, I think that should be understood first.

    Best regards
    Kenneth



  • Hello @KjaerN

    I've flashed the original firmware my M5StampC3U came with onto mine again. (It's a program which changes the color of the LED every time the button is pressed.) It still runs fine from PC USB, power bank USB or 5 V and GND pins. I also varied the voltage and it runs ok from 3.1 V to 5.5 V.

    At this point in time I am out of ideas. Sorry.

    Thanks
    Felix



  • Hi @felmue

    Ok, but thank you for loking into it anyway.

    Best regards
    Kenneth