How write Byte/Word of flash memory of MWPR1516 using Jlink.

cancel
Showing results for 
Search instead for 
Did you mean: 

How write Byte/Word of flash memory of MWPR1516 using Jlink.

Jump to solution
398 Views
jayesh_joshi
Contributor IV

Hi All,

We are using MWPR1516  in our system. Now our customer requirement is to save parameters using the fixed-address section in MWPR1516 flash memory using the JTAG/JLINK interface.

 

From Segger's document, it looks like it does support such a feature. But I have done the basic experiments and when power is removed value changes to what it was earlier. I have even tried to erase the whole flash(0xFF) and tried to write 0xF9 at 0x00. But once I remove the power and again connect power 0x00 changes back to 0xFF. Please find below the procedure for the same in Jlink commander.

jayeshj_0-1649853789781.png

 

 

0 Kudos
1 Solution
353 Views
jayesh_joshi
Contributor IV

@xiangjun_rong 

We have found a way to update flash using the Write command. It turns out that if first I update the RAM Address of that variable and after that default value of that variable using the W4 command, we get the expected result. 

View solution in original post

0 Kudos
3 Replies
384 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls download the WPR1516RM.pdf from the link:

https://www.nxp.com.cn/docs/en/reference-manual/WPR1516RM.pdf

The memory space from 0x0000 to 0x3FFF are flash memory(16KB).

xiangjun_rong_0-1649928462397.png

You can not write flash as what you write RAM. If you want to program flash, pls erase the page or all flash firstly, then program the flash.

Hope it can help you

BR

XiangJun Rong

 

 

 

0 Kudos
374 Views
jayesh_joshi
Contributor IV

@xiangjun_rong 

Thank you for the response.

 

Can you please help me with the below question?

1) Can below command be used for writing on flash(0x0000 - 0x3FFF)?

2) Can we erase one page(0x0000 - 0x0200) and rewrite whole page using Write4(W4) command?

3) Is there more steps that need to be taken to write into flash in addition to the Write4(W4) command?

jayesh_joshi_0-1649929500418.png

 

 

0 Kudos
354 Views
jayesh_joshi
Contributor IV

@xiangjun_rong 

We have found a way to update flash using the Write command. It turns out that if first I update the RAM Address of that variable and after that default value of that variable using the W4 command, we get the expected result. 

0 Kudos