Hello,
I had to implement a large buffer to control write delays to the SD card and found it's not that simple. I added a large block of heap memory (via pvPortMalloc) and used it as the source for my SD card block writes, to my dismay the fwrite() function went from 2ms to 70ms for a 16kB block write. I then realized that the cache was probably getting clobbered due to the task stacks and other memory requirements while the block was being written to the SD card and the memory manager is probably thrashing.
To resolve the issue I added a 16kB internal SRAM block and copied a block from the heap block to the internal SRAM block and called fwrite() with said block and the 2ms write times were restored. The penalty for coping the data block is about 1ms so in total the SD card write now takes 3ms as opposed to 70ms.
My question: Is there a document or web page I can use as a reference to designing a better system when using the 4MB SPI SRAM?
I understand there is a performance penalty to using the SPI SRAM but there must be some tips available increase performance.
Regards,
Charles
Best design principles for using SPI SRAM
-
- Posts: 19
- Joined: Fri Oct 06, 2017 10:27 am
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: abbas1375 and 120 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.