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

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

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

Jump to solution
2,795 Views
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 ?

Labels (1)
0 Kudos
Reply
1 Solution
1,040 Views
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

 

View solution in original post

0 Kudos
Reply
8 Replies
1,040 Views
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 Kudos
Reply
1,039 Views
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 Kudos
Reply
1,040 Views
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 Kudos
Reply
1,040 Views
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 Kudos
Reply
1,040 Views
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 Kudos
Reply
1,040 Views
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 Kudos
Reply
1,040 Views
J2MEJediMaster
Specialist I

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

 

---Tom

 

0 Kudos
Reply
1,041 Views
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 Kudos
Reply