Skip to content

Commit 7098d4c

Browse files
committed
8Kib may align better with flash blocks than 9KiB
1 parent 4621cd5 commit 7098d4c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ports/esp32s2/mpconfigport.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@
4545
// 20kB is statically allocated to nvs, but when overwriting an existing
4646
// item, it's temporarily necessary to store both the old and new copies.
4747
// Additionally, there is some overhad for the names and values of items
48-
// in nvs. So, set the size at 9/20ths of the allocated space
48+
// in nvs, and alignment to 4kB flash erase boundaries may give better
49+
// performance characteristics (h/t @tannewt). This implies we should select an
50+
// 8kB size for CircuitPython'ns NVM.
4951
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
50-
#define CIRCUITPY_INTERNAL_NVM_SIZE (9 * 1024)
52+
#define CIRCUITPY_INTERNAL_NVM_SIZE (8 * 1024)
5153
#endif
5254

5355
#endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H

0 commit comments

Comments
 (0)