[SOLVED]RE-CONNECTION PROBLEMS W/FLASHER STM8

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

  • [SOLVED]RE-CONNECTION PROBLEMS W/FLASHER STM8

    Hi

    I'm having trouble with most of the software versions of JFLASH , because after I program a Uc it programmed right the first time

    but to program the next one, it always appears an error. So I have to select the option "program" twice to program the Uc.

    The Software should not show this error each time that I try to program a new UC, right?
  • RE: RE-CONNECTION PROBLEMS W/FLASHER STM8

    Hi URoman,

    URoman wrote:

    but to program the next one, it always appears an error.

    Regarding your last post I think you are using a STM8S903K3, right ?

    Can you give us some more detail about what error is occuring by a screenshot of the error or by an error message that is output in the log window ?

    Does this problem occur only when you try to program different chips or is it happening when you reconnect to the same chip again after disconnecting it ?

    Best regards,
    Oliver
    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.
  • The MCU that im using is the STM8S207K6, and this issue it's only happening when I try to program different chips and not when I try to reconnect the same chip.

    The error appears as a screen shot as a log window error as apear below.

    Log Window:

    Application log started
    - Flasher STM8 V1.09 (Flasher STM8 Software compiled Sep 8 2011 09:42:26)
    - JLinkSTM8.dll V1.09 (DLL compiled Sep 8 2011 09:42:24)
    Reading flash device list [C:\Program Files\SEGGER\FlasherSTM8_V109\ETC\FlasherSTM8\Flash.csv] ...
    - List of flash devices read successfully (118 Devices)
    Reading MCU device list [C:\Program Files\SEGGER\FlasherSTM8_V109\ETC\FlasherSTM8\MCU.csv] ...
    - List of MCU devices read successfully (118 Devices)
    Opening project file [D:\DB Programming\PRJ\STM8207K6.jflash] ...
    - Project opened successfully
    Opening data file [D:\DB Programming\FRW\443529102981_STM8SF207K6_022811_Rev_1_2.hex] ...
    - Data file opened successfully (33800 bytes, 9 ranges, CRC = 0x94223AB3)
    Programming target (33800 bytes, 9 ranges) ...
    - Connecting ...
    - Connecting via USB to Emulator device 0
    - Initializing CPU core (Init sequence) ...
    - Initialized successfully
    - Connected successfully
    - Target programmed successfully - Completed after 3.213 sec
    Programming target (33800 bytes, 9 ranges) ...
    - ERROR: Programming failed @ addr 0x004000
    - ERROR: Failed to program target
    Disconnecting ...
    - Disconnected
    Programming target (33800 bytes, 9 ranges) ...
    - Connecting ...
    - Connecting via USB to Emulator device 0
    - Initializing CPU core (Init sequence) ...
    - Initialized successfully
    - Connected successfully
    - Target programmed successfully - Completed after 3.211 sec
    Programming target (33800 bytes, 9 ranges) ...
    - ERROR: Programming failed @ addr 0x004000
    - ERROR: Failed to program target
    Disconnecting ...
    - Disconnected


    screenshot:

    Programming failed @ addr 0x004000
    Failed to program target


    So as its has shown in the log window, that it appears an error between each successful programed chip .

    Any other datail or information you need please let me know.

    Regards,

    URoman
  • Hi,

    from your log I do not see a disconnect happen between the programming attempt that is successful and the one that fails.
    Therefor I have some further questions:

    - Is your target powered externally or powered via Flasher ?
    - Are you dealing with Read Out Protection (byte @0x4800) when programming ?
    - Has the target been disconnected or changed during the several programming attempts ? Do you try to program the same device twice ?

    Best regards,
    Oliver
    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, Oliver

    Answering your cuestions:

    Q:Is your target powered externally or powered via Flasher ?
    A: The target it's powered by a 5V DC external source .

    Q: Are you dealing with Read Out Protection (byte @0x4800) when programming ?
    A: I'm not reading, I'm just programming Target. Either way the chips are blank so they aren't protected.

    Q: Has the target been disconnected or changed during the several programming attempts ?
    A: I have several STMS207K6 targets, that I have to program with the same code, that way i use the same setup or configuration the only thing that change is the target for another STMS207K6. Each time I Program successfully a target, I connect the next one with the same setup but fail the firs time I try to Program the target, the second time I try to program it using just the same setup as the first attempt but this time it happend a successful operation. So when the target is programmed successfully i changed for another target and happend the same way.

    Q: Do you try to program the same device twice ?
    A: Always have to select the option "Program" twice because on the first attemp it always fail to program the target. So Always have to program the same device twice to have a successful operation.

    regards,

    URoman

    The post was edited 1 time, last by URoman ().

  • Hi URoman,

    I think the problem is that after you have programmed one device you do not disconnect from the target.
    The Flasher will automatically disconnect only if a power change of the target is detected.

    As with the socket board I have been testing this the Flasher does not recognize a plain MCU change. Therefor
    expecting the device already being unlocked and prepared for programming from the previous attempt.

    Does it help to do a clean disconnect before trying to program the next target ?

    To group together multiple steps like programming and disconnecting you could use our command line interface as well.
    This is described in the Flasher STM8 Software User Guide in the chapter "Command line interface".


    Best regards,
    Oliver
    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.