I am using for the first time the Mikromedia 3 for PIC32MZ board, with the PIC32MZ2048EFH100 processor on board. I would need to store two measurement parameters (bytes) in the internal Flash of the MCU. To do this, I chose the last two unused memory locations, also in view of future code expansions. Using the libraries of the MikroC for PIC32 compiler, I was able to store the data (and the reading of the flash with the programmer confirms this), but I did not understand how I can extract them at startup to use them in the program. Has anyone had a similar need? Can you help me understand better?
Code: Select all
Flash_Erase_Page(0x9D1FFFE0);
Flash_Write_Word(0x9D1FFFE0,1);
Flash_Write_Word(0x9D1FFFF0,22);
Delay_ms(100);