MCF51QE128 flash write-erase

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

MCF51QE128 flash write-erase

1,173 次查看
jluis
Contributor I

Hi,

 

I need help about how to write and erase segments of the flash memory. I wrote code as the flow chart that appears on page 84 of reference manual, but it doesn´t works.

When run the code resets the microcontroller, and de SRS indicates a illegal opcode and a Illegal address SRS = (0x18). The segment that I want to program  and erase is the last one (0x1FC00 - 0x1FFFF).

 

Have anybdy some comment? Are there something I'm missing?

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

577 次查看
RichTestardi
Senior Contributor II

You can see my code that works on the MCF51QE128 (as well as about a dozen different MCUs) in the skeleton.zip archive at the bottom of this page:

 

http://www.cpustick.com/downloads.htm

 

Just look in sources/flash.c and follow the MCF51QE128 #ifdef.  I'm happy to answer any questions you might have about how it works.  The routines you want are flash_erase_pages() and flash_write_words().

 

-- Rich

0 项奖励
回复