Skip to content

Commit

Permalink
Merge branch 'bugfix/esp32c3_eco7_usj_console_v5.4' into 'release/v5.4'
Browse files Browse the repository at this point in the history
fix(esp_rom): fix esp32c3 eco7 console rom function address (v5.4)

See merge request espressif/esp-idf!34738
  • Loading branch information
Jiang Jiang Jian committed Nov 28, 2024
2 parents 5af12cf + 7bba3df commit 05b6d92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/esp_rom/patches/esp_rom_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ IRAM_ATTR void esp_rom_output_tx_wait_idle(uint8_t uart_no)

#if CONFIG_IDF_TARGET_ESP32C3
/**
* The ESP32-C3 ROM has released two versions, one is the ECO3 version,
* and the other is the version before ECO3 (include ECO0 ECO1 ECO2).
* These two versions of the ROM code do not list uart_tx_switch wrap
* The ESP32-C3 ROM has released three versions, ECO7 (v1.1), ECO3, and
* the version before ECO3 (include ECO0 ECO1 ECO2).
* These three versions of the ROM code do not list uart_tx_switch wrap
* function in the ROM interface, so here use the uart_tx_switch direct
* address instead.
*/
Expand All @@ -38,6 +38,8 @@ IRAM_ATTR void esp_rom_output_set_as_console(uint8_t uart_no)

if (efuse_hal_chip_revision() < 3) {
uart_tx_switch = (rom_func_t)0x4004b8ca;
} else if (efuse_hal_chip_revision() >= 101) {
uart_tx_switch = (rom_func_t)0x40001c44;
} else {
uart_tx_switch = (rom_func_t)0x4004c166;
}
Expand Down

0 comments on commit 05b6d92

Please sign in to comment.