DK-S128 Code not executing on power up

Hello, question is regarding the DK-S128 development kit,

It seems my code executes no problem when i debug through J-link using e2 studio.

However if i press the reset button on the kit OR power cycle the board, the green led in the "User I/O" section turns off and the code i just uploaded never executes.

My code is only executing when I am linked to the debugger.

I am using the bsp for the board and have only just started writing my application (i have done nothing that i know of to reallocate where my code is in the ram). Not sure where to start looking to solve this problem so any tips are appreciated.

 

Thank you,

Esteban

  • Hi,
    if you power cycle and your code was downloaded to the SRAM - well it's gone!
    Try downloading into the flash memory and you should be fine.
    RT
  • In reply to mcu-bob:

    Esteban,

    You should be aware that if you are using semi-hosting (for printf output to the debug console) this will prevent your program from running stand-alone. Please refer to the Knowledge base articles on semi-hosting.

    -Gary
  • In reply to garyj:

    Hi,
    I'm dealing with the S128 MCU and I see a symptom similar to Esteban. However, mine is on a custom board. It happen randomly and worst on some boards but none on some others.
    Symptom: some of my custom design using S128 MCU, the code won't execute on power up. Sometimes recycle the power 1 time but sometimes multiple times to get the board to work.

    I do not use semi-hosting in my code.

    Please share your advice.
    Thanks.
  • In reply to Copper:

    Hi Copper-
    This sounds like it might be a power supply or noise issue on your board. Have you checked that robust power is applied prior to reset? Do you have a delay from power up to MCU reset to make sure the MCU is ready to respond to the reset? Are you testing only with the debugger or have to tried a version without the debugger?

    Any additional information you can provide would be helpful..

    Warren
  • In reply to Copper:

    Hello Cooper,

    Does your board design follow recommendations from S128 Hardware Manual section 17.4 (Handling of Unused Pins) and table 46.2 (Recommended operating conditions)? The most important part is to pull/tie P2_1 to Vcc. Low state on P2_1 when reset pin is toggled will cause device to enter serial programming mode.

    Regards
  • In reply to Renesas Karol:

    Thanks Warren/Karol.