[SOLVED] Can't Program Binary into the micro-controller

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

  • [SOLVED] Can't Program Binary into the micro-controller

    Hello Everyone
    I am working on a project using micro-controller MKE15Z and using J-Link Plus.
    Today when I tried to program the binaries using J-Flash, I get some programming error, I recently updated to version 7.58b and 7.58c of the J-Link tool. (Earlier everything was working fine, I don't know why it is not working maybe due to version change, I am not sure)
    My project is divided into two parts, configuration and firmware and both are the part of micro-controller's flash, with IAR I am not able to program the configuration (it's starting address is different).
    But when I used J-Flash two flash both binaries, I get the following error message.

    Source Code

    1. - Connecting ...
    2. - Connected successfully
    3. - Checking if selected data fits into selected flash sectors.
    4. - Start of preparing flash programming
    5. - End of preparing flash programming
    6. - Start of determining dirty areas in flash cache
    7. - End of determining dirty areas
    8. - CPU speed could not be measured.
    9. - Start of erasing sectors
    10. - Blank checking 0x00000000 - 0x0001FFFF
    11. - Erasing range 0x00000000 - 0x0001FFFF ( 64 Sectors, 128 KB)
    12. - Blank checking 0x00020000 - 0x000367FF
    13. - Erasing range 0x00020000 - 0x000367FF ( 45 Sectors, 90 KB)
    14. - End of erasing sectors
    15. - Start of flash programming
    16. - Programming range 0x00000000 - 0x00007FFF ( 16 Sectors, 32 KB)
    17. - ERROR: Programming failed @ address 0x00000000 (Algo91: Illegal command)
    18. - End of flash programming
    19. - ERROR: Program failed
    20. - Start of restoring
    21. - ERROR: Timeout while restoring target, RAMCode did not respond in time. (PC = 0xC5C4390C, CPSR = 0xCBD0A908, LR = 0x21000000)!
    22. - ERROR: Failed to restore target. RAMCode never stops
    23. - End of restoring
    24. - ERROR: Failed to auto program target
    25. Disconnecting ...
    26. - Disconnected
    Display All

    As per the above logs I can't even program anything.
    I read on internet and found some links where the steps on unlock the micro is given, and I tried that also.
    Below are the unlocking logs from J-Link Commander.

    Source Code

    1. Connecting to target via SWD
    2. InitTarget() start
    3. InitTarget()
    4. InitTarget() end
    5. Found SW-DP with ID 0x0BC11477
    6. DPIDR: 0x0BC11477
    7. CoreSight SoC-400 or earlier
    8. Scanning AP map to find all available APs
    9. AP[2]: Stopped AP scan as end of AP map has been reached
    10. AP[0]: AHB-AP (IDR: 0x04770031)
    11. AP[1]: JTAG-AP (IDR: 0x001C0020)
    12. Iterating through AP map to find AHB-AP to use
    13. AP[0]: Core found
    14. AP[0]: AHB-AP ROM base: 0xF0002000
    15. CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
    16. Found Cortex-M0 r0p1, Little endian.
    17. FPUnit: 2 code (BP) slots and 0 literal slots
    18. CoreSight components:
    19. ROMTbl[0] @ F0002000
    20. [0][0]: F0000000 CID B105900D PID 001BB932 MTB-M0+
    21. [0][1]: F0001000 CID B105900D PID 0008E000 MTBDWT
    22. [0][2]: E00FF000 CID B105100D PID 000BB4C0 ROM Table
    23. ROMTbl[1] @ E00FF000
    24. [1][0]: E000E000 CID B105E00D PID 000BB008 SCS
    25. [1][1]: E0001000 CID B105E00D PID 000BB00A DWT
    26. [1][2]: E0002000 CID B105E00D PID 000BB00B FPB
    27. Cortex-M0 identified.
    28. J-Link>unlock Kinetis
    29. Found SWD-DP with ID 0x0BC11477
    30. Unlocking device...O.K.
    31. J-Link>
    Display All
    Even after this nothing works.
    Then I used another laptop with some older version of J-Flash software and it works well, and then I tried on the same computer and it doesn't work.
    Can someone please try to help me, what can be the issue?

    Edited:
    Another update from my side, I just downgraded the version number of J-Flash software on the same laptop and it works fine. I don't know what exactly gone wrong with the newer version of J-Flash software or there is something else.

    The post was edited 1 time, last by arun.sh: Some Updates ().

  • Hi,
    Thank you for your inquiry.


    Could you please send us a J-Link log file? How to enable:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File
    Could you please tell us which is the last version this is working with?

    Best regards
    Fabian
    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.
  • Hi,
    Thanks for your reply, but since this is a very old topic, I don't have much information because the problem is no more reproducible on my laptop.
    Last time I fixed the issue with version 6.86f, and at the moment I am using v7.60b and I don't have any issues.
    If in future I faced the same issue again, I will take the logs as mentioned by you in the post. thanks
  • Hi,
    Good to hear that you are up and running again.

    BR
    Fabian
    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.