This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Failure to flash and to erase

Hallo

I am using a nrf52832_xxaa (evaluating on a sparkfun board)

I am unable to program the application (Im trying to flash a blinky examle)

I have tried the S132 version of SDK13,14 and SDK15, but always got a message : 

**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
Full Chip Erase Failed!
Error: Flash Download failed - "Cortex-M4"

as for the memory , for example for the SDK15.0.0  with  s132_nrf52_6.0.0_softdevice, the memory is as follows 

IROM1 : 0x26000 size 0x5A000

IRAM1 : 0x200022B8 size 0x6000

this is the algorithm for flahsing the app, before flushing it I programmed the softdevice and erased all using nrfproj

using nrfjprog I have succesfully erased the flash :eraseall, and programmed the softdevice : s132_nrf52_6.0.0_softdevice.hex

I have also tried to eraseall through the KEIL but was unsuccesful at that.

**JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
Full Chip Erase Failed!

I have also merged it with the application and programmed but could not connect to the blinky application.

interestingly I have succeeded to flush the application from a NRF51822 project that I had ,

there I was using the nRF51xxx External connection algorithm

and 0x1B000 size 0x14000 for IROM1

0x20001FF8 size 0x6018 for IRAM1

I don't understand what's going on,

would appreciate your help very much

Eran

this s the debug J link addapter info and sw device idcode :

Parents
  • Hi,

     

    this s the debug J link addapter info and sw device idcode :

    Just to confirm: The CPU core info here indicates a nRF51 device is found (Cortex M0 CPU). Is this the section from your nRF52-based project, or from your test project targeting a nRF51 device?

     

    using nrfjprog I have succesfully erased the flash :eraseall, and programmed the softdevice : s132_nrf52_6.0.0_softdevice.hex


    I have also tried to eraseall through the KEIL but was unsuccesful at that.

    ERASEALL from Keil will only erase the application part. In order to do an erase-all, nrfjprog has to be used. Keil has an in-built protection in the flashing algorithm to not try to overwrite the softdevice, but your addressing looks to be good here, unless you have manually specified a scatter file (.sct file) under "project settings -> linker" tab. Do you see this issue with other examples as well, or is this programming issue related to one example only?

     

    **JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
    Full Chip Erase Failed!
    Error: Flash Download failed - "Cortex-M4"

    This is a "generic" failure, which is normally due to bad contact, not powering the nRF, switching SWDCLK/SWDIO, or similar. Have you double-checked your connection, and that the nRF is powered with 3.3V?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    this s the debug J link addapter info and sw device idcode :

    Just to confirm: The CPU core info here indicates a nRF51 device is found (Cortex M0 CPU). Is this the section from your nRF52-based project, or from your test project targeting a nRF51 device?

     

    using nrfjprog I have succesfully erased the flash :eraseall, and programmed the softdevice : s132_nrf52_6.0.0_softdevice.hex


    I have also tried to eraseall through the KEIL but was unsuccesful at that.

    ERASEALL from Keil will only erase the application part. In order to do an erase-all, nrfjprog has to be used. Keil has an in-built protection in the flashing algorithm to not try to overwrite the softdevice, but your addressing looks to be good here, unless you have manually specified a scatter file (.sct file) under "project settings -> linker" tab. Do you see this issue with other examples as well, or is this programming issue related to one example only?

     

    **JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1.
    Full Chip Erase Failed!
    Error: Flash Download failed - "Cortex-M4"

    This is a "generic" failure, which is normally due to bad contact, not powering the nRF, switching SWDCLK/SWDIO, or similar. Have you double-checked your connection, and that the nRF is powered with 3.3V?

     

    Kind regards,

    Håkon

Children
Related