IVOR1 exception occurs when reading Flash memory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IVOR1 exception occurs when reading Flash memory

1,094 Views
suchaeha
Contributor I

Hi everybody,

I'm using MPC5674F EVB and implementing 'write and read' functions to/from internal flash memory.
Specifically speaking, the following logic is under implementation.

1) Read 100KB of structural data from internal RAM
2) Erase and program the internal flash area of FLASH_B M0 in MPC5674F with the 100KB data which were read from RAM. FLASH_B M0 area is as follows. Starting address: 0x000C0000, size: 0x00040000
3) Reset MCU (MPC5674F)
4) Read variables from structural data in the internal flash memory which were written before a reset
5) Copy the variables to internal RAM

where, my problem is that IVOR1 exception occurs when I read data from internal FLASH during step 4 above and system is hanged up.

The structure information is as follows.

[Definition of structure]
typedef struct s_reset_mem_info
{
   unsigned long aaa;
   unsigned long bbb;
   unsigned long ccc;
   unsigned long ddd;
   unsigned long eee;
   unsigned long fff;
  unsigned long ggg;
   unsigned long hhh;
   unsigned long iii;
   unsigned long jjj;
   // buffers
   t_aaa_info aaa_list[256];
   t_bbb_info bbb_info;
   t_ccc_info ccc_info;
   t_ddd_info ddd_list[10];
   t_eee_info eee_list[3];
   unsigned char fff_buffer[40000];
   t_ggg_info ggg_list[4];
   t_hhh_info hhh_list[16];
   // last
   unsigned long reserved_for_last[1];
} t_reset_mem_info;

[Declaration of structure:]
const t_reset_mem_info *picd_reset_mem = (const t_reset_mem_info *)(0x000C0000);

[Usage of structure:]
void flash_load(void)
{
   unsigned long value_aaa = 0;
   unsigned long value_bbb = 0;
   ...
   unsigned long value_jjj = 0;

   /* IVOR1 exception occurs in the following arbitary routine */
   value_aaa = picd_reset_mem->aaa;
   value_bbb = picd_reset_mem->bbb;
   ...
   value_jjj = picd_reset_mem->jjj;
   ...
}

Can anybody help me to solve my 'Flash Write and Read' problem.

Thanks in advance

Hoseok

0 Kudos
2 Replies

582 Views
suchaeha
Contributor I

I found myself making an error.

Thanks to all

0 Kudos

582 Views
bhavaniananda
Contributor II

Hi Hoseok,

Can you share with me your code as I am having trouble to test flash error. 

The scenario is so:

1. I need to have a IVOR1 exception raised while reading from flash. 

Your case matches my requirement. I am looking forward your reply at the earliest.

0 Kudos