Skip to content

arch/risc-v/espressif: Bump common source version #16219

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

Merged

Conversation

tmedicci
Copy link
Contributor

Summary

  • arch/risc-v/espressif: Bump common source version

This PR bumps common source version for RISC-V-based Espressif SoCs on NuttX. Specifically, this solves an issue regarding SPI flash frequency selection on ESP32-C6.

Although 80MHz is the default frequency for the SPI flash, it isn't being set properly, as shown on testing section.

Impact

Impact on user: YES. Applications may run faster if the correct frequency is set.

Impact on build: NO.

Impact on hardware: YES. It sets the correct frequency for the SPI flash.

Impact on documentation: NO.

Impact on security: NO.

Impact on compatibility: NO.

Testing

This common source update fixes a known issue regarding SPI flash frequency on ESP32-C6. Before and after logs are provided as evidence for it. Build, flash and run the firmware on ESP32-C6 according to the following instructions:

Building

make -j distclean && ./tools/configure.sh esp32c6-devkitc:spiflash && kconfig-tweak -e DEBUG_FEATURES && make olddefconfig && make flash ESPTOOL_PORT=/dev/ttyUSB0 -j$(nproc)

Running

picocom -b 115200 /dev/ttyUSB0

Results

Compare the boot lgo before and after applying this patch and check the SPI flash frequency:

Before

*** Booting NuttX ***
I (47) boot: chip revision: v0.1
I (47) boot.esp32c6: SPI Speed      : 40MHz
I (47) boot.esp32c6: SPI Mode       : DIO
I (48) boot.esp32c6: SPI Flash Size : 4MB

Note: 80MHz was expected!

After

*** Booting NuttX ***
I (47) boot: chip revision: v0.1
I (47) boot.esp32c6: SPI Speed      : 80MHz
I (47) boot.esp32c6: SPI Mode       : DIO
I (48) boot.esp32c6: SPI Flash Size : 4MB

80MHz is set as expected.

This commit bumps common source version for RISC-V-based Espressif
SoCs on NuttX. Specifically, this solves an issue regarding SPI
flash frequency selection on ESP32-C6.

Signed-off-by: Tiago Medicci Serrano <[email protected]>
@github-actions github-actions bot added the Size: XS The size of the change in this PR is very small label Apr 15, 2025
@xiaoxiang781216
Copy link
Contributor

@tmedicci why add a no-op pr?

Copy link
Contributor

@jerpelea jerpelea left a comment

Choose a reason for hiding this comment

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

why?

@tmedicci tmedicci force-pushed the bugfix/esp32c6_spi_flash_frequency branch from d59f345 to 3420486 Compare April 16, 2025 11:52
@github-actions github-actions bot added the Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture label Apr 16, 2025
@tmedicci
Copy link
Contributor Author

@tmedicci why add a no-op pr?

Sorry. I reverted the commit locally to get the boot log before the patch and that ended-up to this PR. Fixed!

@xiaoxiang781216 xiaoxiang781216 merged commit 0cec2bd into apache:master Apr 16, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants