Page 1 of 1

Direct flash write.

Posted: Thu Jan 27, 2022 10:05 pm
by rascalito
Hello!

I have a problem writing bitmaps directly into flash.
I used to write bitmaps in RAM_G first and then use the commanda to copy the RAM_G contents
to the flash using FLASHPROGRAM or FLASHUPDATE.
However, these commands require 4K byte pages, which is an average loss of 2K per bitmap for
random images. So I thought it would be better to write directly. The blocks are 256 bytes instead
of 4k, so it would be better in terms of flash usage, but it doesn't work well.
- For small images (I have one example which is 6kBytes in format ASTC8x8), it works if I put
a timeout between 4K buffers.
- For larger images, it doesn't work at all.

Question: what are the limitations of FLASH_WRITE? I'm using 13.5 MHz SPI, therefore a period
around 70 ns, and the specs say 33 or more, so I'm within the limits.

Thanks for any hint.

R

Re: Direct flash write.

Posted: Mon Jan 31, 2022 9:11 am
by Rudolph
As I wrote over in the BRT-Forum (with too many words upon reflection), whatever FLASH_WRITE in the BT81x does exactly,
the bare minimum for writing a page of 256 bytes is whatever time the flash chip needs to do a page-write.