Flash Logical Block in MCF52235

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

Flash Logical Block in MCF52235

跳至解决方案
2,148 次查看
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

标签 (1)
1 解答
1,892 次查看
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

在原帖中查看解决方案

5 回复数
1,892 次查看
waynestewart
Contributor I

Thanks Tom

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

0 项奖励
回复
1,892 次查看
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

1,892 次查看
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 项奖励
回复
1,893 次查看
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

1,892 次查看
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 项奖励
回复