MC56F844x dflash programming

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC56F844x dflash programming

ソリューションへジャンプ
1,006件の閲覧回数
jolantamienkino
Contributor II

Hello,

using MC56F844789. This device has Primary program/data flash memory, mapped into 0x00 0000 - 0x01 ffff & 0x02 0000 - 0x03 ffff, and also Secondary (boot) program/data flash memory, mapped into 0x06 8000 - 0x06 bfff & 0x00 8000 - 0x00 bfff. 

I can program Primary program/data flash memory, when only providing flash command an address within program space range (0x00 0000 - 0x01 ffff) - programing / erasing doesn't work when providing address from aliased data space.

However, I cannot program Secondary (boot) program/data flash memory regardless if flash command is given an address from program or data space. Software has been uploaded with checkbox "always mass erase on download" and therefore data flash shall default to 32 Kbytes of data flash, No EEPROM.

Can you please advise how to program Secondary (boot) program/data flash memory from within user application?

Thanks,

Jolanta.

0 件の賞賛
1 解決策
882件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jolanta,

Regarding the address generation, as you know that the Flash of MC56F84xxx/MC56F82xxx use the flash IP which is the same as Kinetis, the flash IP use Byte(8 bits) accessing mode, the MC56F84xxx/82xxx use half word address mode(16 bits), so the address is left shifted by ONE bit. There are program Flash and Data Flash for DSC, they are in different domain, so we use bit23 to identify the program/data flash type. But all the information are not documented in DSC reference manual.  I am sorry for the inconvenience.

BR

Xiangjun Rong

元の投稿で解決策を見る

4 返答(返信)
882件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jolanta Mienkinova

I forgot to attach the example, here, I attach it.

BR

Xiangjun Rong

882件の閲覧回数
jolantamienkino
Contributor II

Hi Rong,

thanks for example. It works after address of data flash to be programmed /erased is pre-processed:

*((dword *)(void *)&FTFL_FCCOB3) = (dword)(((Address - DATA_FLASH_START) << 1) | (1UL << 23));

I couldn't find this key information about address pre-processing in device reference manual. If there is such a section, and I just didn't notice it, please provide reference. 

Thanks,

Jolanta.

0 件の賞賛
883件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jolanta,

Regarding the address generation, as you know that the Flash of MC56F84xxx/MC56F82xxx use the flash IP which is the same as Kinetis, the flash IP use Byte(8 bits) accessing mode, the MC56F84xxx/82xxx use half word address mode(16 bits), so the address is left shifted by ONE bit. There are program Flash and Data Flash for DSC, they are in different domain, so we use bit23 to identify the program/data flash type. But all the information are not documented in DSC reference manual.  I am sorry for the inconvenience.

BR

Xiangjun Rong

882件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Jolanta,

Regarding your question, we have the processor Expert(PE), the PE has intFLASH bean, with which you can erase both Program/data Flash, program Program/Data Flash.

This is the bean:

pastedImage_1.png

In the IntFLASH bean, you can select data Flash as Following:

pastedImage_2.png

I attach an example for MC56F84789  which is based on CodeWarrior for mcu ver11 tools can erase/program program flash, it tell you how to call the erasing function and program function. You can select the data flash and program it based on the erase/program function with different address and size.

Hope it can help you

BR

Xiangjun rong

0 件の賞賛