pkarashchenko commented on code in PR #16644:
URL: https://github.com/apache/nuttx/pull/16644#discussion_r2173509166
##########
arch/risc-v/src/common/espressif/esp_i2s.c:
##########
@@ -173,7 +167,7 @@
cfg.sinc_scale = I2S_PDM_SIG_SCALING_MUL_1, \
cfg.line_mode = I2S_PDM_TX_ONE_LINE_CODEC, \
cfg.hp_en = true, \
- cfg.hp_cut_off_freq_hz = 35.5, \
+ cfg.hp_cut_off_freq_hzx10 = 35.5, \
Review Comment:
```suggestion
cfg.hp_cut_off_freq_hzx10 = 35.5, \
```
##########
arch/risc-v/src/common/espressif/esp_start.c:
##########
@@ -380,12 +386,42 @@ static int map_rom_segments(uint32_t app_drom_start,
uint32_t app_drom_vaddr,
/* ------------------Enable Cache----------------------------------- */
- cache_hal_enable(CACHE_TYPE_ALL);
+ cache_hal_enable(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
return (int)rc;
}
#endif
+/****************************************************************************
+ * Name: recalib_bbpll
+ *
+ * Description:
+ * Workaround for bootloader calibration issues. This function is placed in
+ * IRAM because disabling BBPLL may influence the cache.
+ *
+ * Input Parameters:
+ * None.
+ *
+ * Returned Value:
+ * None.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_ARCH_CHIP_ESP32H2
+static void IRAM_ATTR NOINLINE_ATTR recalib_bbpll(void)
+{
+ rtc_cpu_freq_config_t old_config;
+ rtc_clk_cpu_freq_get_config(&old_config);
+
+ if (old_config.source == SOC_CPU_CLK_SRC_PLL || \
Review Comment:
```suggestion
if (old_config.source == SOC_CPU_CLK_SRC_PLL ||
```
##########
arch/xtensa/src/esp32s3/esp32s3_spiram.c:
##########
@@ -272,7 +272,8 @@ static int IRAM_ATTR esp_mmu_map_region(uint32_t vaddr,
uint32_t paddr,
{
entry_id = (vaddr & MMU_VADDR_MASK) >> 16;
DEBUGASSERT(entry_id < MMU_ENTRY_NUM);
- if (write_back == false && FLASH_MMU_TABLE[entry_id] != MMU_INVALID)
+ if (write_back == false &&
Review Comment:
Minor suggestion
```suggestion
if (!write_back &&
```
##########
arch/xtensa/src/esp32s3/esp32s3_spiram.c:
##########
@@ -229,10 +229,10 @@ static inline bool
mmu_check_valid_ext_vaddr_region(uint32_t vaddr_start,
{
uint32_t vaddr_end = vaddr_start + len - 1;
bool valid = false;
- valid |= (ADDRESS_IN_IRAM0_CACHE(vaddr_start) &&
- ADDRESS_IN_IRAM0_CACHE(vaddr_end)) |
- (ADDRESS_IN_DRAM0_CACHE(vaddr_start) &&
- ADDRESS_IN_DRAM0_CACHE(vaddr_end));
+ valid |= (SOC_ADDRESS_IN_IRAM0_CACHE(vaddr_start) &&
+ SOC_ADDRESS_IN_IRAM0_CACHE(vaddr_end)) |
+ (SOC_ADDRESS_IN_DRAM0_CACHE(vaddr_start) &&
+ SOC_ADDRESS_IN_DRAM0_CACHE(vaddr_end));
Review Comment:
```suggestion
bool valid = (SOC_ADDRESS_IN_IRAM0_CACHE(vaddr_start) &&
SOC_ADDRESS_IN_IRAM0_CACHE(vaddr_end)) ||
(SOC_ADDRESS_IN_DRAM0_CACHE(vaddr_start) &&
SOC_ADDRESS_IN_DRAM0_CACHE(vaddr_end));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]