Slow EEprom block erasing S12G128 debugging with OBDM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Slow EEprom block erasing S12G128 debugging with OBDM

432 次查看
secrob
Contributor II

Hi all,

 

I am facing a pretty weird problem in my simple code that tests how much time is required to erase the EEprom flash block. I first write the entire block (0x400-0x13ff) with pre-defined data then I launch the following routine that was generated via Processor Expert:

 

//erase sector by sector 4 kB x 1024 sectors   for(i = 0x0400UL; i<0x1400UL; i=i+4){     Bit2_PutVal(1);       retVal_EE = IEE1_EraseSector((IEE1_TAddress)i);   }

 

I simply move a pin that's monitored with my oscilloscope when entering and exiting the for cycle. The time required to accomplish the operation is about 5 seconds.

I am flashing with OBDM. Moreover I tried to do the same using Freescale Flash Drivers provided in the website "Standard Software Driver v1.1.2" directly using the ppEEErase function with SSD pointers and opcodes (code imported in my current project)

 

This seems very curious for me because, the same test for Flash erasing of the block 0x20000-0x24000, executed via "IFsh1_EraseSector(...)" Processor Expert function, requires only 640 ms.

Even if I consider the appnote AN4302, that indicates as "max Sector Erase time (us)" 24 us for EEprom, I should obtain, without consider any latency, 27 milliseconds (operating frequency of 1 MHz as set by PE)

 

 

Thanks in advance for any advice,

 

roberto

标签 (1)
0 项奖励
回复
0 回复数