awawa-dev / HyperSPI

HyperHDR bridge using SPI bus. Connects Raspberry Pi with a generic Raspberry Pi Pico (rp2040)/ESP32/ESP8266 to control a LED strip. Fasted possible cable solution for external Pico/ESP LED driver. Data integration check included.
https://hyperhdr.eu
MIT License
63 stars 119 forks source link

Invalid header after flashing firmware #42

Closed amigthea closed 7 months ago

amigthea commented 7 months ago

after I flash the .bin and I try to connect to serial port it outputs continuosly this log:

st:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0x28202b20
invalid header: 0x28202b20
invalid header: 0x28202b20
invalid header: 0x28202b20
invalid header: 0x28202b20
invalid header: 0x28202b20
invalid header: 0x28202b20
invalid header: 0x28202b20

it is expected?

awawa-dev commented 7 months ago

no more details: which firmware, board model etc

amigthea commented 7 months ago

Platform: ESP32 MH-ET Live

I followed the wiki instructions:

[env:SK6812_RGBW_NEUTRAL]
build_flags = -DNEOPIXEL_RGBW -DDATA_PIN=2 ${env.build_flags} -DSECOND_SEGMENT_START_INDEX=112 -DSECOND_SEGMENT_DATA_PIN=4 -DSECOND_SEGMENT_REVERSED
custom_prog_version = esp32_SK6812_RGBW_NEUTRAL

board = esp32dev
platform = ${esp32.platform}
lib_deps = ${esp32.lib_deps}
test_ignore = ${esp32.test_ignore}

./esptool write_flash 0x0 firmware_esp32_SK6812_RGBW_NEUTRAL.bin

awawa-dev commented 7 months ago

You flashed the firmware at wrong address and damaged the bootloader. Use factory firmware: https://github.com/awawa-dev/HyperSPI?tab=readme-ov-file#flashing-the-firmware

amigthea commented 7 months ago

ok, now I flashed the factory firmware and then the custom one at the correct address

./esptool write_flash 0x0 firmware_esp32_SK6812_RGBW_NEUTRAL.factory.bin
./esptool write_flash 0x10000 firmware_esp32_SK6812_RGBW_NEUTRAL.bin

and now it does not gives me those error anymore

but even if I configured the Led Hardware section as shown by the guide I get

[LEDDEVICE0_AWA_SPI] Device 'awa_spi' is disabled due to an error: 'Failed to open device (/dev/spidev0.0). Error message: No such file or directory'

tried to change that to /dev/ttyACM0 to no avail, what could be the cause?

edit: the controller is usb connected to the rpi4 where HyperHDR is running

awawa-dev commented 7 months ago

/dev/spidev0.0 must be activated in the system first, usually HyperHDR installer tries to enable it but it requires a restart. Use raspi-config alternatively.