-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
esp32c2 support (IDF v5.3) #15906
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
base: master
Are you sure you want to change the base?
esp32c2 support (IDF v5.3) #15906
Conversation
Isn't this already covered by #11869? |
That is about esp32c6 This PR has subject esp32c2. So c6 versus c2? |
@sanderjo I saw the ESP32C2 definition in |
@TrekMax Edit: forgot to mention that |
@agatti the latest changes on C6 (about to push) should enable the emitter on all risk chips based on the soc defines, rather than listing individual chips. I suggest this PR would be well placed to rebase on top of the C6 work once it's merged as lots of people have contributed to that PR to help it fill gaps / support that will then naturally apply to many of the newer chips. |
@andrewleech oh, that's nice to hear. Hopefully that would make support for the C5 easier to add once that chip shows up in production :) |
Thanks @TrekMax for updating your PR! (Note for housekeeping: this is replacing earlier PR #15440). Similar to discussions above, suggest we tackle in this order:
@TrekMax Let us know if we can help with any part of this process. It should be possible to update this PR with totally new commits without needing to close and open a new PR. There is a guide to doing this online at https://github.com/jimmo/git-and-micropython#README |
@projectgus Thanks. I will wait for esp32c6 support (IDF v5.2) #11869 to be merged, then rebase this branch, and then review and commit ESP32-C2 support. |
c7d3a2b
to
67dec7c
Compare
@projectgus Hey , the commit has been rebased to the latest master, please review it. Thanks! |
@andrewleech Of course. I have ESP32C3, ESP32C2 and ESP32S3 to verify it. |
67dec7c
to
2f8d960
Compare
@TrekMax please can you rebase this PR on the latest master, because there have been a lot of changes to the esp32 port, in particular support for IDF v5.3. |
0c8abf5
to
642eb25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience and for the quick update of this PR, @TrekMax ! I have some comments below, mostly minor.
@@ -50,7 +50,11 @@ | |||
#endif | |||
|
|||
#if SOC_I2C_SUPPORT_XTAL | |||
#if CONFIG_IDF_TARGET_ESP32C2 | |||
#define I2C_SCLK_FREQ APB_CLK_FREQ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? I would expect that because SOC_I2C_SUPPORT_XTAL
is set, the I2C frequency will be the XTAL frequency (so no change needed for C2 in this file).
boards/sdkconfig.base | ||
${SDKCONFIG_IDF_VERSION_SPECIFIC} | ||
boards/sdkconfig.ble | ||
boards/sdkconfig.26mhz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do all ESP32-C2 modules use 26MHz crystals? I see the docs say it can support both 26MHz and 40MHz.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you moved this into the sdkconfig.c2
file, which is fine.
Do we need to add a comment in board.md
that is supports boards with 26MHz crystals? Or do the modules all have 26MHz crystals, already?
642eb25
to
3492a56
Compare
esp32/esp32c2: Fix heap size is too small to enable Bluetooth. Signed-off-by: TianShuangKe <qinyun575@gmail.com>
3492a56
to
af01368
Compare
@TrekMax Thanks for updating the PR in response to the review! It's looking pretty tidy. There are a couple of unresolved questions above, do you know the answer to them? |
@@ -0,0 +1,14 @@ | |||
Program your board using the esptool.py program, found [here](https://github.com/espressif/esptool). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A reminder for the future that #16535 deletes these copy-paste deploy.md files, so depending on which PR merges first there is a cleanup step for the PR which is merged second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linked PR just merged, so it's OK to rebase this, remove this file, and link to the generic deploy.md
now.
@TrekMax Any updates on this PR? |
Current status of this PR: it needs rebasing on latest master, and resolving the few questions above left by @projectgus . |
Summary
The is esp32c2 officially supported in IDF v5.2 but requires a number of changes to work...
Pulling together changes and generic board support needed here.
Testing
Functions verified by actual hardware include: