Flash Sector Size on the QE128/96/64 family ?

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

Flash Sector Size on the QE128/96/64 family ?

跳至解决方案
2,856 次查看
pbouf
Contributor I

The QE128 Reference Manual states that the size of a sector for the Flash Sector Erase command is 1kBytes.

 

"The sector erase operation will erase all addresses in a 1 Kbyte sector of flash memory using an embedded
algorithm."

 

However, I am not sure if this applies to the QE64. I just discovered that only 512 bytes are erased for one single operation.

 

Can anyone confirm the flash sector size for each device in the QE128/96/64 family ?

标签 (1)
0 项奖励
回复
1 解答
1,101 次查看
bigmac
Specialist III

Hello,

 

It seems that both "page" and "sector" are variously used in the reference manual, and will generally mean the same thing.  Obviously, paragraph 4.6.3.2.4 contains an error, where the sector size stated contradicts other data from the same document.

 

Regards,

Mac

 

在原帖中查看解决方案

0 项奖励
回复
8 回复数
1,101 次查看
bigmac
Specialist III

Hello,

 

According to the reference manual (paragraph 4.6.1) the sector size is 512 bytes for all devices.  This is consistent with other HCS08 devices and your tests (with only one exception that I know of having 768 byte sectors).  Whereabouts did you observe the quoted paragraph?  This could possibly be an error in the document.

 

Regards,

Mac

 

0 项奖励
回复
1,100 次查看
pbouf
Contributor I

Paragraph 4.6.1 talks about "pages" not sectors. "MC9S08QE64: 65,536 bytes (128 pages of 512 bytes each)".

 

Paragraph 4.6.3.2.4 states "The sector erase operation will erase all addresses in a 1 Kbyte sector of flash memory using an embedded algorithm.".

 

Page and sector don't usually have the same definition but I guess they do in the reference manual which I think is misleading.

0 项奖励
回复
1,101 次查看
tonyp
Senior Contributor II

I think there is a mistake in the manual.  I've been using QE128 long enough to know flash pages are certainly 512-byte long.

 

I suspect by "sector" they are referring to the minimum amount of Flash that can be incrementally protected (FPROT register), which is 1K for the QE128/96/64, indeed.  And, I don't see a sector erase operation, only a page erase.  So, certainly a 'manual' bug.

 

0 项奖励
回复
1,101 次查看
pbouf
Contributor I

Paragraph 4.6.3.2, Table 4.23, there is a sector erase command 0x40. I don't see any page erase command.

 

Thank you for confirming the size of the sector/page is 512 bytes.

0 项奖励
回复
1,101 次查看
tonyp
Senior Contributor II

It's becoming apparent that the word "sector" is used instead of "page" in all sections but two (4.6.1 and Table 4-22) of the QE128 manual.

 

With some "disassembly" then: Both descriptions refer to the same FCMD[6:0] value ($40) which is the command for erasing a single page, which is clearly defined in all documents to be a 512-byte block.

 

Therefore, a 1KB "sector" or "page" size reference is dead wrong.

 

P.S. I think I got it.  Due to the MMU capability of QE128/96/64 the word "page" is used a lot in reference to the 16KB PPAGE-controlled memory area.  So, they probably thought using "sector" for a flash page would lessen the confusion.  Well, DID IT?

0 项奖励
回复
1,101 次查看
peg
Senior Contributor IV

Hello,

 

Similar threads have occurred in the past like this, not to QE specifically but in general.

This thread just seems to confirm the outcome of the others. That is that Freescale are confused about the definition of these words as they apply to the memory within their microcontrollers. "Array" was another.

It seems to me that Freescale have no "official" definition and it is left to individual authors to use their own.

0 项奖励
回复
1,101 次查看
J2MEJediMaster
Specialist I

FWIW, I have reported this problem to the docs people.

 

---Tom

 

0 项奖励
回复
1,102 次查看
bigmac
Specialist III

Hello,

 

It seems that both "page" and "sector" are variously used in the reference manual, and will generally mean the same thing.  Obviously, paragraph 4.6.3.2.4 contains an error, where the sector size stated contradicts other data from the same document.

 

Regards,

Mac

 

0 项奖励
回复