Forum Discussion
I tried your code and either I cannot properly erase CFM sectors. Idk why it needs further investigation but I haven't face any situation like this. I tried several things like erasing all 5 sectors one by one, increasing erase delay, changing address bits and power cycle via dual boot core but when the fpga restarts I can see that the image has not erased. May be the erase operation cannot work because the core is busy. UFM user guide says: "Note: The IP core only accepts the sector erase address when it is in IDLE state; busy field at status register is 2'b00. If the IP core is busy, it will ignore the sector erase address.". You should check this I think.
Another issue that I noticed that, when I use programmer, I erase all sectors first then only write one of the 2 CFM sections, FPGA works and when I switch the other CFM image with dual boot core, FPGA works from other CFM image that I haven't load to FPGA. I use this techinque before with 10M08 and 10M04 devices and normally it shouldn't switch the other CFM because I erased it. Comes to my mind that even programmer cannot erase the CFMs but I don't sure. An addition to that, for example I switch the other CFM with dual boot core and then erase all sectors with programmer then load only one CFM that the opposite of switched one, The FPGA works from switched CFM image that is also wrong.