Problems Flashread XC164 sector 5

Hello,
I am using XC164 and would like to read flash values wordwise.
All other Sectors can be read (0..4 does it fine), but on every access to sector 5 a controller hangup occurs.
Code is:

#define SECTOR_4 0xC08000
#define SECTOR_5 0xC10000
// tried to use local as well as global definition:
unsigned int huge* flashptr_Start;

  flashptr_Start = SECTOR_5;
  for (i = 0; i <= 0xFF; i++)
{
  siVal = (*(flashptr_Start)) & 0xFFFF;
  _nop_();_nop_();_nop_();_nop_(); // wait
  flashptr_Start++;
}

I don't see anything wrong with that piece of code. I tried to slow down (sfr IMBCTR) the flash access read time but it didnt help.

Did anyone get similar problems?
Can anyone help me?

Thanks in advance,
Helmut

More questions in this forum