Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chip_detect_error on ESP32-P4 #679

Open
mutatrum opened this issue Sep 12, 2024 · 3 comments
Open

chip_detect_error on ESP32-P4 #679

mutatrum opened this issue Sep 12, 2024 · 3 comments

Comments

@mutatrum
Copy link

When using espflash 3.1.1 on the P4 dev board, it fails to detect the chip:

$ espflash board-info
[2024-09-12T15:32:39Z INFO ] Serial port: '/dev/ttyUSB0'
[2024-09-12T15:32:39Z INFO ] Connecting...
[2024-09-12T15:32:39Z INFO ] Using flash stub
Error: espflash::chip_detect_error

  × Unrecognized magic value: 0xffffffff
  help: Supported chips are: esp32, esp32c2, esp32c3, esp32c6, esp32h2, esp32p4, esp32s2, esp32s3
        If your chip is supported, try hard-resetting the device and try again

Hard resetting results in the same error.

Flashing a C build with EPS-IDF works fine over the same ttyUSB0. Not sure which details can be provided that would help here.

@mutatrum
Copy link
Author

Addition: I got a different magic value, but only once?
Unrecognized magic value: 0x61632220

@mutatrum
Copy link
Author

It seems the magic value detection is no longer working for the P4:

We have recently found out that the magic number autodetection method is not reliable for ESP32-P4, as the value at the arbitrary address (CHIP_DETECT_MAGIC_REG_ADDR) can change between runs. Due to this, we are now considering changing the address (for all of the previous targets as well).

Fortunately, this is shouldn't be a big deal for P4, as autodetection based on the magic number is just a fallback method. The get_security_info method is primarily used and reliable.

espressif/esptool#1008 (comment)

@SergioGasquez
Copy link
Member

Thanks for sharing your findings! We are currently not very focused on P4, since its not yet on mass production. The P4 version that I have is quite old, and I was able to flash it with the magic value that we currently have. We would of course accept and appreciate any PR updating this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants