diff options
Diffstat (limited to '_site/log/e-reader/index.html')
| -rw-r--r-- | _site/log/e-reader/index.html | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/_site/log/e-reader/index.html b/_site/log/e-reader/index.html index 23d409b..a5dbc01 100644 --- a/_site/log/e-reader/index.html +++ b/_site/log/e-reader/index.html @@ -46,25 +46,26 @@ <source src="ereader.mp4" type="video/mp4" /> </video> -<p>ESP-WROOM-32, 7.5” Waveshare e-paper display, three buttons (prev/next/sleep).</p> +<p>System: ESP-WROOM-32, 7.5” Waveshare e-paper display, three buttons +(prev/next/sleep).</p> -<p>No local storage—streams books over HTTP. RTC memory tracks reading progress -between sessions.</p> +<p>2023-09-23: 512KB SRAM, 4MB flash (shared with FreeRTOS and ESP-IDF). Not +enough storage for books. Using ESP32’s built-in WiFi to stream them over HTTP. +Recording the reading progress in RTC memory.</p> -<p>ESP32: 512KB SRAM, 4MB flash (shared with FreeRTOS, ESP-IDF). Not enough to -store books. Stream from webserver instead.</p> +<p>Rasterized pages encoded as tightly packed bitmaps (1 byte => 8 pixels), no +headers, arranged along 48 KB (480x800) boundaries; Reader can stream pages +using HTTP Range requests with zero server-side logic. Keeps both ends lean.</p> -<p>Custom EBM file format. Rasterized monochrome bitmaps, one per page (480x800). -One byte = 8 pixels. Pages on 48KB boundaries—HTTP Range requests work without -server logic. pdftoebm.py converts PDFs.</p> +<p>Page table stores 3 pages (prev/current/next) in a circular buffer. When the +user requests a page, program cycles through the table, updates the screen, and +downloads the next page.</p> -<p>Circular buffer holds 3 pages (prev/current/next)–page table. Single-threaded -approach too slow—user input, SPI, and HTTP on one core causes lag.</p> +<p>Responsiveness is inadequate. Scheduling GPIO (user input), SPI, and HTTP on +one core causes input lag. Pinned the GPIO and SPI tasks to one core, the HTTP +task to the other core.</p> -<p>Optimizations: pin the GPIO task (responding to user input and updating -display) to one core, pin the HTTP task to the other core.</p> - -<p>Better, but system unresponsive during screen updates. Made SPI transfer async:</p> +<p>Better, but screen updates are blocking user input; Made SPI transfer async:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>void epd_draw_async(const uint8_t *buf, size_t n) { @@ -92,11 +93,14 @@ display) to one core, pin the HTTP task to the other core.</p> } </code></pre></div></div> -<p>Much better. Squeeze a few more cycles by moving SPI buffer to DMA.</p> +<p>Much better.</p> + +<p>2023-10-06: Moved the page table to DMA-capable memory; Reclaimed a few more +CPU cycles from the SPI transfers.</p> <p>Can’t think of anything else.</p> -<p>Outcome: Works but limited. Led to <a href="../etlas/">Etlas</a>.</p> +<p>Verdict: Works but limited. Led to <a href="../etlas/">Etlas</a>.</p> <p>Commit: <a href="https://git.asciimx.com/esp32-e-reader/commit/?id=7f691c46093933b67aab466c0ca582ace8ab73d4">7f691c4</a></p> |
