• Please tell me how to read the code data of the entire area of the program memory space of segment 0 by software.

    • 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;

      addr += FLASH_SEG8_ADDR;

      for(verify_cnt = 0; verify_cnt < size; verify_cnt++){
      if(*(unsigned char __far *)(addr + verify_cnt) != *(data + verify_cnt)){ // *1
      return NG;
      return OK;

      *1:Since the address of the mirror area is from 0x8: 00, the pointer size must be 3 bytes. Please qualify with far.

      Related Products: ML610(Q)40x, ML610(Q)42x, ML610(Q)47x, ML610(Q)48x, ML610Q10x, ML610Q11x, ML610Q17x, ML610Q30x, ML610Q35x, ML610Q38x, ML610Q41x, ML610Q43x, ML610Q46x, ML620Q13x, ML620Q15x, ML620Q416/ML620Q418, ML620Q503H/ML620Q504H/ML620Q506H, ML62Q12xx, ML62Q13xx, ML62Q14xx, ML62Q15xx/ML62Q18xx, ML62Q16xx, ML62Q17xx

    • Products: General-purpose MCUs (16bit) , Speech Playback MCUs (8bit)