P-flash protected but PE Multilink is still erasing it

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

P-flash protected but PE Multilink is still erasing it

505 次查看
sumanmotaparthy
Contributor I

Hi,

    I am using K20 series of micro controller. I intend to develop a bootloader code and application code. The bootloader code is downloaded using PE Micro Multilink USB Debugger. The p-flash region(0x0000 - 0x3FFF) has been set to protected region.

 

I then downloaded the Application layer started from 0x4000 and intended to debug it using PE debugger. However, I have not noticed that while downloading, the bootloader code (0x0000 - 0x3FFF) has been erased. Why and how is PE debugger still able to erase the flash region.

 

I am using PE for generating my linker file(s).

 

Thanks and regards,

Suman

标签 (1)
标记 (1)
0 项奖励
1 回复

402 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Suman,

how did you protect the Pflash?

One solution in CW 10.1 would be to use Target Tasks to download the application.

To do that, from Target Tasks view, you need to:

  1. Import () Flash_Programmer/ARM/K40DX256Z.xml.

Untitled.png

2 . Double click on the “Erase” action to edit it

3. Uncheck “Mass erase all devices”

4. Select only FTFL_PFlash256 from the left hand grid box and select the sectors you need to erase

Untitled1.png

5.      Click “Update Erase Action”

7.     Save Flash Programmer task with CTRL-S and you may choose to save it to a file in the project folder

8.     Open Debug Configurations/<Your Download configuration>, Click on Debugger tab, then on Download Tab

9.     Uncheck “Perform Standard Download”, and check “Execute Tasks”

10.      Add... the previously edited target task “K40DX256Z”

Untitled3.png

11. Click Apply

Now the download procedure will not affect the D-Flash anymore.


Have a great day,
Zhang Jun

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励