[ABANDONED] JLinkExe problem on OSX fails flashing Nordic nrf51822 with "possibly skipped erasure of half-way erased sector"

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] JLinkExe problem on OSX fails flashing Nordic nrf51822 with "possibly skipped erasure of half-way erased sector"

    Hi,

    After several months of successful use of my JLink apdater to program custom Nordic nrf51822 based boards, I started experiencing problems where using JLinkExe under OSX would fail to flash software with the error:

    Source Code

    1. J-Link>loadfile s110_nrf51_8.0.0_softdevice.hex
    2. Downloading file [s110_nrf51_8.0.0_softdevice.hex]...Info: J-Link: Flash download: Restarting flash programming due to program error (possibly skipped erasure of half-way erased sector).
    3. Info: J-Link: Flash download: Skip optimizations disabled for second try.
    4. Error while programming flash: Programming failed.
    5. J-Link>


    This is despite erasing the flash using writes to the nrf51822 NVMC controller (with w4 JLinkExe commands) and confirming the flash memory erase using JLinkExe mem32 commands.

    This seems to correlate with updating to the 5.x version of the JLink software and/or my upgrade to the latest version of OSX (both of which I did around the same time).

    My workaround is that under Windows 10 I can use Nordic's nRFGo Studio GUI software to erase the device and then I'm able to use JLinkExe on OSX to successfully flash it. Since the nRFGo Studio GUI is not doing anything special to erase the device, I'm thinking it might be the older JLinkDLL software shipped with the nRFGo Studio and it's JLink firmware that "fix" the problem.

    Tons of detail and logs are here in my post on Nordic's forum:

    devzone.nordicsemi.com/questio…f-half-way-erased-sector/

    It was suggested to me that this sounds like it might be a similar bug with the JLinkExe software as detailed here segger.com/j-link-release-notes.html for Infineon CPUs:

    Version 4.98d
    DLL: If a flash sector was only half-way erased but read as empty by the CPU, programming errors could occur during flash download (Mainly seen on Infineon XMC series CPUs). Fixed.


    Maybe that's a red herring but any advice would be appreciated. It's painful to have to boot into Windows 10 in my development iteration cycle!

    Thanks you for the great product!

    Jeremy
  • Hi,


    we are currently not aware of an issue regarding nrf51822 devices.

    Could you provide us with a full J-Log file? (like the one you posted at nordic, but complete?)
    Furthermore, can you provide us with a .hex for reproduction purposes?

    My workaround is that under Windows 10 I can use Nordic's nRFGo Studio GUI software to erase the device and then I'm able to use JLinkExe on OSX to successfully flash it. Since the nRFGo Studio GUI is not doing anything special to erase the device, I'm thinking it might be the older JLinkDLL software shipped with the nRFGo Studio and it's JLink firmware that "fix" the problem.

    If you wish to do so, you can verify this by updating the DLL used by nRFGo Studio. If you face this issue afterwards under Win10 too, it would be possible to do downgrade the DLL if needed. segger.com/j-link-older-versions.html

    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.