ESP32 C3 Boot loop “SHA-256 arduino ide comparison failed:” pinmapping issue?

Bodhi1
Posts: 8
Joined: Mon Mar 07, 2022 8:14 pm

ESP32 C3 Boot loop “SHA-256 arduino ide comparison failed:” pinmapping issue?

Postby Bodhi1 » Sun Mar 13, 2022 5:05 pm

Hello, I am transferring a ESP32 WROOM code to a C3. I updated all the pins to my new configuration (missed a few the first time) but when the C3 tries to boot, it gets stuck in a booting loop (see below). I did some research, and it looks like this is likely a pin mapping issue, I confirmed that all the pins do not conflict with any C3 core functions (but a second set of eyes is probably a good idea). I am going off of the Version 1.1 C3 datasheet from Espressif - which does seem to have a few conflicts in the pin table. Cross posted from arduino forum. Thanks, Bodhi

Serial monitor:

Code: Select all

17:40:29.316 -> ESP-ROM:esp32c3-api1-20210207
17:40:29.362 -> Build:Feb  7 2021
17:40:29.362 -> rst:0x1 (POWERON),boot:0xe (SPI_FAST_FLASH_BOOT)
17:40:29.362 -> SPIWP:0xee
17:40:29.362 -> mode:DIO, clock div:1
17:40:29.362 -> load:0x3fcd6100,len:0x420
17:40:29.362 -> load:0x403ce000,len:0x90c
17:40:29.362 -> load:0x403d0000,len:0x236c
17:40:29.362 -> SHA-256 comparison failed:
17:40:29.362 -> Calculated: ccb0d00bac7e84e1d90a12e4f75f4ab6c5f7e71bb209afd5819c4c9557a6db71
17:40:29.362 -> Expected: c9cf160580940ec7801c73b16423824e72ad12055c732e83ce66332240af42a7
17:40:29.362 -> Attempting to boot anyway...
17:40:29.362 -> entry 0x403ce000
17:40:29.455 -> 
Applicable code (reduced from 1500 lines):

Code: Select all

#define FASTLED_ESP32_SPI_BUS HSPI

#include <Arduino.h>
#include <FastLED.h>
#include <SPI.h>
#include <Wire.h>
#include <U8g2lib.h>
#include "IRremote.h"

#define DATA_PIN 10

#define IR_RECEIVE_PIN 3

#define LED_BUILTIN  4

#ifdef U8X8_HAVE_HW_SPI
#endif
#ifdef U8X8_HAVE_HW_I2C
#endif


unsigned long lastExecutedMillis = 0;

unsigned long key_value = 0;

uint32_t id = 0; //serial number

CRGB leds[58];

U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /*clock*/ 18, /*data*/ 19, /* reset=*/ U8X8_PIN_NONE);

void setup() {

    pinMode(20, OUTPUT);
    pinMode(21, OUTPUT);

    pinMode(LED_BUILTIN, OUTPUT);
    //pinMode(18, OUTPUT); 
    SPI.begin( /*18, 4, 19*/ );         
    digitalWrite(LED_BUILTIN, HIGH);

  u8g2.begin();
compile:

Code: Select all

In file included from C:\Users\User\Documents\Arduino\libraries\IRremote\src/IRremote.h:10,
                 from C:\Users\User\Documents\Arduino\EMDR\Lightbar4.1_58_TEST_C3\Lightbar4.1_58_TEST_C3.ino:85:
C:\Users\User\Documents\Arduino\libraries\IRremote\src/IRremote.hpp:209:2: warning: #warning For ESP32, RP2040 and particle boards SEND_PWM_BY_TIMER is enabled by default. If this is not intended, deactivate the line over this error message in file IRremote.hpp. [-Wcpp]
 #warning For ESP32, RP2040 and particle boards SEND_PWM_BY_TIMER is enabled by default. If this is not intended, deactivate the line over this error message in file IRremote.hpp.
  ^~~~~~~
In file included from C:\Users\User\Documents\Arduino\libraries\IRremote\src/IRremote.h:10,
                 from C:\Users\User\Documents\Arduino\EMDR\Lightbar4.1_58_TEST_C3\Lightbar4.1_58_TEST_C3.ino:85:
C:\Users\User\Documents\Arduino\libraries\IRremote\src/IRremote.hpp:271:2: warning: #warning INFO: No definition for LED_BUILTIN found -> default LED feedback is disabled. [-Wcpp]
 #warning INFO: No definition for LED_BUILTIN found -> default LED feedback is disabled.
  ^~~~~~~
In file included from C:\Users\User\Documents\Arduino\libraries\FastLED\src/FastLED.h:67,
                 from C:\Users\User\Documents\Arduino\EMDR\Lightbar4.1_58_TEST_C3\Lightbar4.1_58_TEST_C3.ino:81:
C:\Users\User\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sketch uses 251166 bytes (19%) of program storage space. Maximum is 1310720 bytes.
Global variables use 12404 bytes (3%) of dynamic memory, leaving 315276 bytes for local variables. Maximum is 327680 bytes.
C:\Users\User\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0/esptool.exe --chip esp32c3 --port COM7 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0xe000 C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2/tools/partitions/boot_app0.bin 0x0 C:\Users\User\AppData\Local\Temp\arduino_build_650310/Lightbar4.1_58_TEST_C3.ino.bootloader.bin 0x10000 C:\Users\User\AppData\Local\Temp\arduino_build_650310/Lightbar4.1_58_TEST_C3.ino.bin 0x8000 C:\Users\User\AppData\Local\Temp\arduino_build_650310/Lightbar4.1_58_TEST_C3.ino.partitions.bin 
esptool.py v3.1
Serial port COM7
Connecting....
Chip is unknown ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: a0:76:4e:5a:53:80
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00010000 to 0x0004dfff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 539.6 kbit/s)...
Hash of data verified.
Flash params set to 0x022f
Compressed 12528 bytes to 8981...
Writing at 0x00000000... (100 %)
Wrote 12528 bytes (8981 compressed) at 0x00000000 in 0.4 seconds (effective 265.7 kbit/s)...
Hash of data verified.
Compressed 253392 bytes to 144894...
Writing at 0x00010000... (11 %)
Writing at 0x000172c1... (22 %)
Writing at 0x00020195... (33 %)
Writing at 0x00026094... (44 %)
Writing at 0x0002da31... (55 %)
Writing at 0x00033a99... (66 %)
Writing at 0x00039ba4... (77 %)
Writing at 0x00041b5a... (88 %)
Writing at 0x000487a4... (100 %)
Wrote 253392 bytes (144894 compressed) at 0x00010000 in 4.3 seconds (effective 469.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 372.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Who is online

Users browsing this forum: No registered users and 60 guests