Error -160 on nrfjprog when verify nrf52840 using J-Link EDU Mini

I made my own board base on nrf52840 chip using your reference circuiry - Circuit configuration no. 1 for QFAA QFN48 from your web page

I make program using nrf Connect SDK 2.4.2 with zephyr and mcuboot and ota

nrfjprog -v
nrfjprog version: 10.22.1 external
JLinkARM.dll version: 7.80c

I program my board using nrfjprog using merged.hex and this commands:

>nrfjprog -f nrf52 --eraseall
Erasing user available code and UICR flash areas.
Applying system reset.

>nrfjprog -f nrf52 --program merged.hex --verify --log
[ #################### ] 1.528s | Program file - Done programming
[error] [ Client] - Encountered error -160: Command verify_file executed for 281 milliseconds with result -160
[error] [ nRF52] - Failed while performing 'Verify' operation on target address 0x00000000.
-160: Data does not match in address range [0x00000000 - 0x00005D8F] (Flash)
Expected byte value 0x00 but read 0x02 at address 0x00000047.
[error] [ nRF52] - Failed while verifying device. -160: Data does not match in address range [0x00000000 - 0x00005D8F] (Flash)
Expected byte value 0x00 but read 0x02 at address 0x00000047.
[error] [ Worker] - Data does not match in address range [0x00000000 - 0x00005D8F] (Flash)
Expected byte value 0x00 but read 0x02 at address 0x00000047.
ERROR: Write verify failed.

>nrfjprog -f nrf52 --reset
Applying system reset.
Run.

Board not starting :(

When I program nRF52840DK everything is ok using the same file and commands:

>nrfjprog -f nrf52 --eraseall
Erasing user available code and UICR flash areas.
Applying system reset.

>nrfjprog -f nrf52 --program merged.hex --verify --log
[ #################### ] 1.462s | Program file - Done programming
[ #################### ] 1.491s | Verify file - Done verifying

>nrfjprog -f nrf52 --reset
Applying system reset.
Run.

Board starting OK.

I check on programmer 4.0.1 both board and both are programmed. There is only one difference. nRF52840DK has one block of memory bigger then the same blok in my board. There is showing on screens under.

 

This is log from programming my board with error -160 on verify.

0636.log.log

Could this be something wrongly done on my board?

Update

I read the memory from both modules in Programmer 4.0.1 after writing, saved it to a file and compared it.

And this files are a little different. I thought that the same file uploaded to the two boards (nRF52840DK and my board uploaded by J-link Edu Mini) would be identical after reading.

This files are attached here.

7573.nRF_Connect_Programmer_nRF52840DK.hex

5430.nRF_Connect_Programmer_Board.hex

This is the file I am programming merged.hex

6011.merged.hex

Update 2

I programmed my board with J-tag Edu mini by the merge.hex file and read the memory contents into the file with the command >nrfjprog --readcode filename_Board.hex. I reprogrammed and read the memory again, I did this three times. Each time the memory content is slightly different.

It seems that uploading a file to memory via J-tag Edu mini is always loaded with errors.

Update 3

OK, I make it working!!!!

I connected the power supply to J-Link EDU Mini from the nrf52840dk development board, there is 3V voltage and everything started working ok, no errors.

Before, I connected the power supply from battery 3.6V and there were errors described above.

My board started and working. Works very poorly, but it works. 

For now, I don't know why my board doesn't work with a 3.6V power supply, programming and working after, but it works with 3V and only works over a very short distance, only centimeters.

Parents Reply Children
No Data
Related