gustavonihei commented on a change in pull request #5827:
URL: https://github.com/apache/incubator-nuttx/pull/5827#discussion_r838058084



##########
File path: arch/xtensa/src/esp32s2/esp32s2_start.c
##########
@@ -160,6 +169,62 @@ uint32_t g_idlestack[IDLETHREAD_STACKWORDS]
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: esp_config_data_cache_mode
+ *
+ * Description:
+ *   Configure the data cache mode to use with PSRAM.
+ *
+ * Input Parameters:
+ *   None.
+ *
+ * Returned Value:
+ *   None.
+ *
+ ****************************************************************************/
+
+IRAM_ATTR void esp_config_data_cache_mode(void)
+{
+    cache_size_t cache_size;
+    cache_ways_t cache_ways;
+    cache_line_size_t cache_line_size;
+
+#if defined(CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB)
+#if defined(CONFIG_ESP32S2_DATA_CACHE_8KB)
+    cache_allocate_sram(CACHE_MEMORY_ICACHE_LOW, CACHE_MEMORY_DCACHE_LOW,
+                        CACHE_MEMORY_INVALID, CACHE_MEMORY_INVALID);
+    cache_size = CACHE_SIZE_8KB;

Review comment:
       ```suggestion
       cache_size = CACHE_SIZE_HALF;
   ```




-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to