This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem of reading FLASH

Hello. Has faced with the following problem: at reading FLASH of memory of the controller since 0x00120000 address (bank 0 sector 12 - 14)

occurs interruption on a vector _dabort


The code is resulted more low:

void main(void)
{
/* USER CODE BEGIN (3) */

    volatile unsigned long data;
    volatile unsigned long adr;
    adr = 0x00020000;
    data = *((unsigned long*)adr);
    
    adr = 0x00040000;
    data = *((unsigned long*)adr);

    adr = 0x00060000;
    data = *((unsigned long*)adr);
    
    adr = 0x00080000;
    data = *((unsigned long*)adr);
    
    adr = 0x000A0000;
    data = *((unsigned long*)adr);
    
    adr = 0x000C0000;
    data = *((unsigned long*)adr);    
    
    adr = 0x000E0000;
    data = *((unsigned long*)adr);
    
    adr = 0x00100000;
    data = *((unsigned long*)adr);  

 
   /* Instructions resulted cause interruption at reading more low */
    adr = 0x00120000;
    data = *((unsigned long*)adr);
    
    adr = 0x00140000;
    data = *((unsigned long*)adr);    
    
    adr = 0x00160000;
    data = *((unsigned long*)adr);
/* USER CODE END */
}

 

  • Sergey,

    There are two possibilities for causing data abort in Flash access.

    (1) Accessing the invalidation Flash location.

    (2) Uncorrectable ECC error.

    Would you please check if Flash ECC checking is enabled in your application? If ECC checking is enabled, you need make sure that you also calculate and program ECC for all the Flash memory locations used in your application.

    Thanks and regards,

    Zhaohong