- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
01-10-2016 12:40 PM
I have several custom happy gecko boards that I am trying to flash and debug in Simplicity Studio. I am using a Giant Gecko STK with debug mode set to out, and I have the debug interface connected via the 20 pin header to the happy gecko boards. I have verified that the programming signals have good continuity from the 20 pin header to the happy gecko pins, and I have measured a valid Vcc.
In Simplicity Studio, I am able to detect the happy gecko parts using the "Detect" button under "Select Target Part...". When detected, in "Kit Manager" I see all the correct remote MCU information: Name, flash size, unique ID, etc...However, when I try to start a debugger in the IDE, I get:
"Failed to program flash
Error Text: Flash loader: Unknown
Error code: 131073"
and another error box that states: "Connection with device lost. This is likely due to a loss of power or unplugged debug adapter."
Another interesting note is that when I am trying to detect the device, I get another pop-up message box stating: "Second debugger connection to the same J-Link detected. J-Link currently uses target interface SWD while current debugger tries to select target interface C2. Should interface be changed?" in which I have tried multiple iterations of yes and no. I have tried forcing the J-link speed to a high, medium, and low freq, and tried switching the STK from serial addressing mode to USB addressing mode.
I did try updating the STK firmware as well, but no luck.
Any tips on how to get the program loaded?
Solved! Go to Solution.
01-10-2016 09:01 PM
Hi rossboss ,
Which pin are you referring to by VCC, if you could provide a picture of your setup, that would be helpful in determining the issue.
Is this issue 100% happen and you never succeed to debug or flash the target MCU. Do you have a try on another GG STK and HG?
I think the message to suggest switch to C2 is ok because now the J-LINK support both C2 and SWD.
We have a knowledge base article that details how to debug an external target with an EFM32 STK. See the link below:
01-11-2016 12:59 PM
hello delu, thanks for the response.
I called it "VCC" out of habit, but that really means all the power pins into the happy gecko device. I have attached an image of my setup (everything power and programming related).
It is happening 100% of the time. I have tried several different happy gecko target boards but they all act identical. I don't have another Giant Gecko STK, but wouldn't the fact that it is able to detect the part number and chip ID indicate that the communication is fine? If you want you can donate another one to me , I will try it!
The C2 message seems like a strange bug, because if I click yes, I then get a message asking me to switch back to SWD, and then C2, and then SWD, and so on.
I took a look at your link, but ever since I updated the firmware on my STK, I am no longer able to get the legacy energyAware Commander to detect and connect to my Giant Gecko STK. Using the Simplicity Studio "Kit Manager", I am able to set the Giant Gecko STK to Debug OUT mode (as indicated by the STK's LED).
01-11-2016 02:26 PM
but wouldn't the fact that it is able to detect the part number and chip ID indicate that the communication is fine?
yes, BUT, after that the power consumption goes up (erase). So, is your power supply able to support the increased power and is the chip decoupled right (no more than 5 mm traces to decoupling caps
01-11-2016 04:36 PM
I've powered with a bench top power supply capable of 2 amps, and yes the coupling capacitors are placed within 5 mm of the chip.
Is the fact that the C2/SWD J-Link error message is popping up every 5 seconds an indication of what is wrong? I select one and it tells me to select the other, in an infinite loop? Surely this isn't normal behavior...
01-12-2016 04:05 AM
Maybe you should try to disable auto-detection of the target. I seem to remember there was an option for that. But I don't remember exactly how and where. I suggest to search the forum for this.
01-12-2016 05:43 AM
Though my wild guess is that the device is not correctly detected with C2 and SWD interface and that is the reason you see it try retry the detection again and again.
But I think you could have a try as vanmierlo suggested.
You could disable the auto detection with below:
1 press the drop down arrow on the right side of "refresh detected hardware".
2. you see "configure device scanning"
3. choose device manager-->TCF Device Discovery.
4. try to choose 'never'.
My views are my own and do not necessarily represent the views of Silicon Labs
01-13-2016 08:28 PM
Success! After changing the settings to "never" as you suggested, I am now able to program and debug the happy geckos! Even stepping through code.
Although I still had a little bit of trouble. Basically, if I clicked "detect" on device discovery, I could never get it to work, but if I go in and set the part number and interface manually, it would work. Weird
01-19-2016 02:16 PM
I can confirm this problem too, along with the solution.
I also can add that I did not had this problem while trying to debug a small (blinker) test program (probably everything happens in less than 5s device detection interval).
05-20-2016 05:22 PM
I'm trying to program a EFM32PGB100 (on a custom board) using the SWD link from a EDM32WG-STK3800 dev board but keep getting the same error messages. I've disabled "auto refresh menus" and I've set the refresh interval for all devices to "never". However I'm still getting the same error when trying to detect the mcu. To keep the debug connector as small as possible I'm only using the GND, VREF, SWCLK, SWDIO lines (no reset line connected since it was stated that it's optional).
Can you please point me in the right direction to debug the problem?
11-21-2016 08:30 PM
I see you create a separate post. If sometimes the programming success sometimes it failed. I guess that is a different issue.