Other Parts Discussed in Thread: C2000WARE
Hello,
So I´ve been trying to implement the EEPROM emulation detailed in here, into a brake module using the F28069 microcontroller. In essence there are some user defined parameters I would like to save in the FLASH so that they don't have to be set after every on/off cycle.
After some tinkering I managed to make the EEPROM emulation work, all the while adding my own functions to replace the EEPROM_Write() and EEPROM_Read() as they did not suit my needs exactly. The thing is the program works just fine in debugging mode, but whenever I load it onto the brake module and run it from flash it suddenly stops writing anything to the flash sector I defined for EEPROM emulation. I suspect that, since the program itself is running from flash, it is interfering with the flash API functions. Whats more, there are several interrupts ocurring from the ADC, CPU timers and the EPWM; so I am also concerned that those same interrupts are preventing the flash from programming.
Is there any way I could halt all interrupts and/or flash operation for a short time while the flash API programs the data into the flash sector? Does this sound like it has any fix, or should I focus on implementing an actual EEPROM into my design?
Thanks a bunch for any help you could offer.
Cheers,
Michael