- OTP, once and for all
- volatile, as an SPI slave connected to an MCU (the SPI pins are free to use after configuration)
- volatile, from an SPI Flash chip connected to the FPGA (the FPGA is SPI master in this case)
The second option is easy to implement, and it's already done! Here's the repo: https://github.com/crteensy/dipsydownloader
Currently there's only one way of getting your config into the DIPSY: Add it to your C++ code as an array. The consequence of this is that the array must fit into your microcontroller's program memory. This is not a problem on larger chips (the config is about 32 kB), and we will come up with examples for smaller ones as well. An external EEPROM or an SD card come to mind.
Enough talking, here's the main part of the current example (also in the repo):
static const uint8_t DIPSY_CRESETB = 0;
static const uint8_t DIPSY_CDONE = 1;
static const uint8_t DIPSY_SS = 2;
SPI.begin();
extern const uint8_t top_bitmap_bin[];
extern const uint16_t top_bitmap_bin_len;
dipsy::ArrayConfig config(top_bitmap_bin_len, top_bitmap_bin);
if (dipsy::configure(DIPSY_CRESETB, DIPSY_CDONE, DIPSY_SS, SPI, config))
{
Serial.print("config done");
}
else
{
Serial.print("config error");
}
SPI.end();
Simple enough, I hope.dipsy::configure() is a function template that will chew *a lot* of different config source and SPI implementations.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
looking quite simple, indeed!
Are you sure? yes | no