Ok, the last hurdle has been passed. The new 1 Mbyte flash memory on the new JeeLink v2 works – I’ve been able to erase the chip, write data to it, and read it back.
Here is the main test code I used:
And here’s the output:
Some timing results can be gleaned from that output:
- Erasing the entire chip takes 5.7 seconds (!)
- Reading takes about 1.1 mSec per 256-byte page
- Writing takes about 1.4 mSec per 256-byte page
- Reading 8 bytes takes about 90 µSec
Good enough, but definitely not instant in the ATmega’s time scale.
This code needs to block-out interrupts while accessing flash memory because the radio can generate lots of interrupts which need to be serviced quickly over that same SPI bus. Some care is needed to give enough attention to the radio during long memory transfers – it looks doable.
Anyway, I’ve started assembling a bunch of these JLv2’s. Here’s the very first hand-soldered batch: