I've recently bought MachXO3L starter kit. When I was uploading my bitstream file I accidentally selected 'NVCM Erase,Program,Verify' in diamond programmer. So I've done 'NVCM Erase', tried programming SPI flash again but ended up with the following error:
INFO - Device1 LCMXO3L-6900C: LCMXO3L-6900C: Verify ID
ERROR - Verification Error...when Processing function: 'CHECK_ID'
After that I looked at the programming manual and read the following:
MachXO3L multi-time (up to two times) programmability through non-volatile technology (NVCM)
![Face Palm :palm:](https://www.eevblog.com/forum/Smileys/default/facepalm.gif)
So basically I've already written to the nvcm twice. On the other hand, if I select 'SPI Flash Erase,Program,Verify' instead of 'SPI Flash Background Erase,Program,Verify' I can upload the bitstream file into the SPI flash without problems. Unfortunately, FPGA does absolutely nothing (8 leds are lit all the time). My guess is - it tries to read configuration from nvcm instead of external flash for some reason.
Is there a way to 'unbrick' this thing?
edit: I can confirm that by programming SRAM I can get the FPGA working, but obviously the configuration will be erased once I power cycle. I assume I need to find some way to tell it to boot from SPI flash instead of NVCM.