The ML62Q1000 series instructions cannot read data outside the ROM window area of the program memory space of segment 0. For example, at the address to which the data memory space is allocated with overlap, the value of the data memory space is read. A mirror area of the program memory space of segment 0 is prepared in segment 8, so read it from segment 8.
A concrete example is shown below.
1st argument addr : verify start address 2nd argument data : pointer to an area for storing verify data 3rd argument size : verify size (byte)
#define FLASH_SEG8_ADDR 0x80000
static int exec_verify( unsigned long addr, unsigned char *data, unsigned char size ) { unsigned char verify_cnt;