Skip to content

Reading of some eFuses#85

Merged
jessebraham merged 1 commit into
esp-rs:mainfrom
bjoernQ:feature/read_efuse
Jun 17, 2022
Merged

Reading of some eFuses#85
jessebraham merged 1 commit into
esp-rs:mainfrom
bjoernQ:feature/read_efuse

Conversation

@bjoernQ
Copy link
Copy Markdown
Contributor

@bjoernQ bjoernQ commented Jun 17, 2022

This adds support for reading a few eFuses

  • all chips: MAC and status of flash boot encryption
  • ESP32: core_count, bt_enabled, chip, max CPU clock frequency

Currently there is separate code for each chip - while ESP32 is different the other three ones currently look 100% identical. If we see that the code for those chips doesn't diverge, we can get rid of the copies. But that should be easier than the other way around so I kept it like this for now.

In the old HAL there were also some functions to read ADC calibration data which apparently was used nowhere. After looking into ESP-IDF I think it's more complicated than that and also quite different for different chips. Additionally, there seem to be multiple versions of how the calibration data is stored. That's the main reason I didn't include it here.

Another reason is that I think while reading the raw data should belong here the calculations on top of that probably should go somewhere else.

I'd say we can add more functionality as needed since I cannot make a good guess at what might be useful and what not in the future. Anyway, the basics are there and adding more shouldn't be too hard.

@bjoernQ bjoernQ requested a review from jessebraham June 17, 2022 14:16
Copy link
Copy Markdown
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely a great start! I agree with all your points/justifications above, thanks for writing that all out.

@jessebraham jessebraham merged commit 8a3a0e7 into esp-rs:main Jun 17, 2022
@bjoernQ bjoernQ deleted the feature/read_efuse branch October 27, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants