Flash Logical Block in MCF52235

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

Flash Logical Block in MCF52235

Jump to solution
998 Views
MDB
Contributor II

Hi.

Quote of MCF52235 Reference Manual (page 17-1): “It is not possible to read from any flash logical block while the same logical block is being erased, programmed, or verified.”

My question is:

- What is the size of FLASH LOGICAL BLOCK in MCF52235?

Regards,

Marcos Bloedow

Labels (1)
1 Solution
742 Views
TomE
Specialist II

You're lucky you aren't using the MCF5213. It has "multiple -kByte logical pages".

ColdFire MCF5213 Flash page size

It is possible the models with 128k of Flash have "one logical block" and the ones with 256k have two, but I don't think so. In the above post there's a definitive response from Freescale saying that (for the MCF5213) there is only one "block", either 128k or 256k.

I suspect the implication that there might be more than one "logical block" may be copied from the documentation from the company that provided the Flash module - "SuperFlash® technology licensed from SST”. If a chip maker did put multiple separate Flash modules in a chip then you could run from one while programming the other.

But you should always assume that you can't run from (or read data from) a Flash system while erasing or programming it - the code that does that should be written to run in RAM. Remember to disable all interrupts while the Flash programming is happening, unless all the vectors, stack and all possible code paths to service those interrupts are in RAM also.

Tom

View solution in original post

5 Replies
742 Views
waynestewart
Contributor I

Thanks Tom

I guess I was used to the 9s12 series with a separate flash area.

0 Kudos
742 Views
miduo
NXP Employee
NXP Employee

I know there really has confusion regarding this issue, for MCF52235:

- Physical block: there are 2 (128 Kbytes each one, 16 bits and both are known as ODD and EVEN)

- Logical block: there is 1 (in this micro and is also know as just block)

- Sector: part of a Physical block (there are 32 sectors each one 8Kbytes, also know as logical sector)

- Logical Page: each page is 2 Kbytes

742 Views
MDB
Contributor II

Hi Fang Li.

Thanks so much for the help.

So I'm sure I have to run my code from RAM when programming the FLASH.

0 Kudos
743 Views
TomE
Specialist II

You're lucky you aren't using the MCF5213. It has "multiple -kByte logical pages".

ColdFire MCF5213 Flash page size

It is possible the models with 128k of Flash have "one logical block" and the ones with 256k have two, but I don't think so. In the above post there's a definitive response from Freescale saying that (for the MCF5213) there is only one "block", either 128k or 256k.

I suspect the implication that there might be more than one "logical block" may be copied from the documentation from the company that provided the Flash module - "SuperFlash® technology licensed from SST”. If a chip maker did put multiple separate Flash modules in a chip then you could run from one while programming the other.

But you should always assume that you can't run from (or read data from) a Flash system while erasing or programming it - the code that does that should be written to run in RAM. Remember to disable all interrupts while the Flash programming is happening, unless all the vectors, stack and all possible code paths to service those interrupts are in RAM also.

Tom

742 Views
MDB
Contributor II

Hi Oi TomE.

Thanks so much for the help.

I'll make my code run from RAM when programming the FLASH.

0 Kudos