Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service


Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept



search inside this forum
search inside all forums
STM32L0F6 indicates successful program but nothing was programmed
Ryan P. Jan 31, 2018 at 04:53 PM (16:53 hours)
Staff: Takao Y.

  • I generate a HEX file and use srec_cat to fill with 0xff and calculate a CRC. The hex file programs without issue with the STMlink.

    I then create a SAP file from the image creation tool (6.68.00.00) with
    CM .....\ST_STM32L031F6_1x32x8k.arp
    EM Erase module
    PM Program module
    RE Reset

    And copy to the Cyclone ACP. After selecting the image and clicking Start, the unit reports success after a couple seconds. When I check the controller, the firmware on it was not changed.

    What could be the issue? I tried different Communication settings.

    Ideally, I want to Erase the entire device, verify the erase, then program. When attempting to do that, verify always fails. I tried erasing the option bytes and eeprom with the respective algorithm and I get similar results.




    Comments

  • Greetings,

    Looking at your list of commands in the image creation tool, you did not select your Hex file. So when you execute the PM command, it is not programming anything.


    Takao Yamada

  • Thankfully, I'm not that stupid.

    This is the cfg file that loads the script.

    Note that any attempt to verify fails and the programming succeeds without actually flashing the chip.
    STLink works fine with the same image.

    Any help is appreciated. I may provide my phone number offline. I am programming 1000's of controllers and was hoping that this was a viable short-term solution.

    ; Automatically generated configuration file
    ; Silicon Manufacturer is NXP
    ; Silicon Architecture is ARM devices
    ;
    ;
    ; RESET_DELAY 0
    ;
    ; PCI_DELAY 31
    ;
    :DEVICE ST_STM32L0_STM32L031F6
    :USESWD 1
    :SAPGUIVERSION 362E3638
    :USEPRORELAY
    :DEVICEPOWER 2
    :POWERDOWNDELAY 250
    :POWERUPDELAY 250
    :POWEROFFONEXIT 1
    :NEWIMAGE
    :DESCRIBEIMAGE Switch_117A117L_1/31/2018 2:34pm
    CM C:\PEMicro\cyclone\supportfiles\supportFiles_ARM\ST\STM32L0\ST_STM32L031F6_1x32x8k.arp
    EM ;Erase Module
    SS C:\GDrive\Projects\M_TEL\Arduino\DH_STM32L031\STM32L031\MDK-ARM\STM32L031\STM32L031_CRC_117A_117L_.hex
    PM ;Program Module
    RE ;Reset

  • Greetings,

    Could you download this utility and see if you convert your HEX file if you are able to program:
    http://www.pemicro.com/downloads/download_file.cfm?download_id=107

    What happens if you use the PROGACMP software found in your cyclone software package to debug this issue? Are you able to program? Use the Show Module command to see if any data was actually written into flash.


    Takao Yamada

  • I use progacmp_cyclone.exe and select the device STM32L031F6, default shift frequency (3). All defaults. 
    Provide power to target, 3V. The power jumper is set to 321 shorted (Internal Pwr to Target Pwr).

    I hear a relay click and I select ST_STM32L031F6_1x32x8k.arp.
    I specify the object file (I tried both the original hex and then a converted .s19).

    I click Program Module and it cycles thru some addresses and programs. It states "Programmed."

    I click Verify Module and it starts at the first address and states Byte in module $00 and should be $38, etc...

  • Greetings,

    What happens if you use the "Show Module" command within PROG? Are you able to confirm that the memory has not been programmed? Because maybe it is not the programming but the verification that is going wrong instead.

    I think what you are doing is all correct. The only thing I can think of that may cause this issue is either a problem with the algorithm, problem with the cyclone, or an issue with communication between the cyclone and the target device.

    If you have an oscilloscope, try monitoring the TDI and TDO pins and see if you are getting activity, and that you are not seeing any odd behavior like slow rise times or RC-like behavior in each toggle of the pins.

    Are you using any kind of adapter, custom ribbon cable, or other unique hardware setup that has not been detailed yet?


    Takao Yamada

  • Takao,

    I am using an adapter but the exact adapter that works with the ST-Link. It basically crosses over to a Tag connect 6-pin swd connection.

    Note that my program locks down read protection on boot up, so maybe that was making this difficult.
    I finally got it to work, by using the following script

    :DEVICE ST_STM32L0_STM32L031F6
    :USESWD 1
    :SAPGUIVERSION 362E3638
    :USEPRORELAY
    :DEVICEPOWER 2
    :POWERDOWNDELAY 250
    :POWERUPDELAY 250
    :POWEROFFONEXIT 1
    :NEWIMAGE
    :DESCRIBEIMAGE 116116_1/6/2018 10:12:52 AM
    CM C:\PEMicro\cyclone\supportfiles\supportFiles_ARM\ST\STM32L0\ST_STM32L031F6_1x32x8_OptionBytes.arp
    RU ;READ/WRITE UNPROT.
    EN ;Erase if not Blank
    RU ;READ/WRITE UNPROT.
    CM C:\PEMicro\cyclone\supportfiles\supportFiles_ARM\ST\STM32L0\ST_STM32L031F6_1x32x8k.arp
    SS C:\GDrive\DH_STM32L031\STM32L031\MDK-ARM\STM32L031\STM32L031_CRC_1.1.6_1.1.6_IntKey.hex
    EN ;Erase if not Blank
    PM ;Program Module
    VM ;Verify Module
    RE ;Reset
    GO ;Run

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement