Skip to main content
Bill Berkan
Associate
June 5, 2018
Question

Unexpected error, can't add new hex file

  • June 5, 2018
  • 4 replies
  • 1971 views
Posted on June 05, 2018 at 21:27

I need help loading a new hex file.  I keep getting unexected error.  I am not an engineer and I am glad to pay for assistance.

    This topic has been closed for replies.

    4 replies

    Nesrine M_O
    Associate
    June 6, 2018
    Posted on June 06, 2018 at 10:27

    Hi

    bill.pbs

    ,

    1. What are you using as STM32 product?
    2. Which

      hex file

      did you looked to?
    3. '

      I keep getting unexected error' what kind of error you are facing?
    4. What is your IDE version?
    5. Could you please provide more explanation on your case, so that it will be easier to understand the issue?

    -Nesrine-

    Bill Berkan
    Associate
    June 6, 2018
    Posted on June 06, 2018 at 15:13

    Hi Nesrine

    Thank you for your reply. First,let me tell you I know very little about

    this situation. I am an old guy who owns a small business, we make

    laminating machinery, devices used for laminating maps, menus, etc. I had

    a board designed to control speed. The guy who designed it can't seem to

    figure out the problem. The hex file I am trying to load was written by

    him to address a few small issues in the original file. I have not used

    this system before but have had experience using a similar program for Pic

    chips from Microchip. I studied the ST Link stuff and hooked up the pcb as

    instructed. After a few small issues it seemed I think I was able to

    connect the pcb to the software. Each time I press erase the pcb is

    disconnect from the s/w and I get the unexpected error. When I click on

    that I get the write protected error.

    I have attached several screen shots that seem to answer some of your

    questions, including a shot of the log which seems to identify the st link

    v2, the chip, etc. The new hex file is written by the guy who wrote the

    original one, I am guessing he just changed some code in the original that

    needed modification as requested.

    Does any of this make any sense?

    Thank you

    Bill

    On Wed, Jun 6, 2018 at 2:28 AM, Nesrine M <st-microelectronics@jiveon.com>

    ________________

    Attachments :

    ER4.txt.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxXT&d=%2Fa%2F0X0000000azY%2FSVyk_s_KdG1wW.V4vJVMfdmFjZcYrI.tK8uVgVSkJOw&asPdf=false

    ER1.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxXO&d=%2Fa%2F0X0000000azX%2FdNelomALG4yrzQOctWmiaWSRvfpmIs_26uiZ53FR9Bg&asPdf=false

    ER2.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxX0&d=%2Fa%2F0X0000000azV%2Fi4X7oavWk6WgCUyxVkAmgdiG.c4EZAeyh9O2rdgiyBo&asPdf=false

    ER3 ide.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxXJ&d=%2Fa%2F0X0000000azT%2FzsDB2aADanYOeyCqwbBiR8h3pmJLHyxVAVFCqabyDI8&asPdf=false
    AvaTar
    Senior III
    June 6, 2018
    Posted on June 06, 2018 at 11:02

    I need help loading a new hex file.

    I guess that means Flashing (programming).

    Which tool ?

    I keep getting unexected error.

    The exact error message would be helpful.

    Bill Berkan
    Associate
    June 7, 2018
    Posted on June 07, 2018 at 13:19

    I guess I dont know what tool means, sorry.  The code was compiled with Atollic and the device is a st link /v2.  The first message is unexpected error at which time the target is instantly disconnected from st link.  The next message is some flash pages are write protected.  It has an OK button but it is grayed out.  Thank you

    AvaTar
    Senior III
    June 7, 2018
    Posted on June 07, 2018 at 13:32

    I guess I dont know what tool means, sorry.

    As your first image shows, the 'ST-Link Utility'.

    You can try to configure the 'option bytes', and remove the write protection for sectors marked as such.

    See the ST-Link Utility manual, as found here:

    http://www.st.com/resource/en/user_manual/cd00262073.pdf

     

    Section 3.6 covers this topic.

    Try a mass erase again, and then program.

    I haven't myself dealt with write-protection on STM32 devices.

    Vitaliy Chernobay
    Senior
    June 6, 2018
    Posted on June 06, 2018 at 11:26

    Replace the USB cable

    Bill Berkan
    Associate
    June 7, 2018
    Posted on June 07, 2018 at 13:20

    Thank you for the idea, but same results.  

    Bill

    Tesla DeLorean
    Guru
    June 6, 2018
    Posted on June 06, 2018 at 12:57

    What tool generated the error?

    What tool generated the .HEX file?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Bill Berkan
    Associate
    June 7, 2018
    Posted on June 07, 2018 at 13:22

    I am not sure about all of your terminology but the code was compiled with Atollic and the tool I am using is ST LINK /V2.  I hope these are the right answers.  Thank you, Bill