Reply
Posts: 7
Registered: ‎05-30-2017
Accepted Solution

How to unbrick EFM8 ?

Hello,

 

I'm using the SLSTK2010A dev card.

Everything was working perfect until I flash the EFM8 with a program that put the MCU in sleep mode at startup (register PMU0CF )

Since then, it's now impossible to flash the EFM8, I always get a JLINK error : ''EFM (C2): Connect failed and connected J-Link (S/N 440046811) does not support fallback method (firmware too old)"

 

I did the same thing on an other External MCU and it produced the same consequences.

 

How can i unbricked the MCU ?

 

Fabien

 

Posts: 8,172
Registered: ‎08-13-2003

Re: How to unbrick EFM8 ?

use the flash utility (not the ide) select total erase ignore the "cant connect'

erik
Posts: 7
Registered: ‎05-30-2017

Re: How to unbrick EFM8 ?

Are you talking about this app ?

 

Sans titre.png

 

My Starter kit should be detected as a "USB debug adapter" ?

 

Thanks

Posts: 8,172
Registered: ‎08-13-2003

Re: How to unbrick EFM8 ?

[ Edited ]

I was; however that does not support EFM8, BUT supposedly the "flash programmer" in SS supposedly is the same, including recent devices. (home/flash programmer)

 

again. click erase, ignore "can't connect.

erik
Posts: 7
Registered: ‎05-30-2017

Re: How to unbrick EFM8 ?

 

Okay, so i used the Flash Programmer in SS, clicked on erase, did it several time (got error message)

It still does not  solve the problem. I cannot reflash the MCUs

 

msg1.png

 

Can you reproduce the problem by putting the following line of code  in the begining of the main() function 

 

 PMU0CF = 0x8C;

 

And see if you can solve the problem this way ?

 

 

 

 

 

 

Posts: 8,172
Registered: ‎08-13-2003

Re: How to unbrick EFM8 ?

[ Edited ]

Can you reproduce the problem by putting the following line of code  in the begining of the main() function 

 

Since then, it's now impossible to flash the EFM8,

 

I doubt he can

erik
Posts: 8,172
Registered: ‎08-13-2003

Re: How to unbrick EFM8 ?

I see the beginning of something in red, resolve that and try again

erik
Posts: 7
Registered: ‎05-30-2017

Re: How to unbrick EFM8 ?

The red part is the filepath for flashing. So normally not needed for erasing. 

 

Anyway, it does not solve the problem

 

Sans titre2.png

Posts: 3,147
Registered: ‎02-07-2002

Re: How to unbrick EFM8 ?

If possible, try again with a SiLabs USB Debug Adapter instead of an STK. The STK's are known to be too slow to perform the unbricking.

Posts: 8,172
Registered: ‎08-13-2003

Re: How to unbrick EFM8 ?

If possible, try again with a SiLabs USB Debug Adapter instead of an STK. The STK's are known to be too slow to perform the unbricking.

 

good info, I have, for various reasons, been - just a bit - wary of using STKs as programmers

erik
Posts: 7
Registered: ‎05-30-2017

Re: How to unbrick EFM8 ?

Ok so i bought an USB debug Adapter

I can connect to Several EFM8 with it

But i still cannot erase/or connect the two EFM8  bricked bu the sleep mode...

 

Sans titre.png

Posts: 8,172
Registered: ‎08-13-2003

Re: How to unbrick EFM8 ?

I'd write a ticket on that

 

if it is possible, by legal means, to code a chp in such a way it 'bricks' there is something dramatically wrong

erik
<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,185
Registered: ‎04-27-2004

Re: How to unbrick EFM8 ?

[ Edited ]

But i still cannot erase/or connect the two EFM8  bricked bu the sleep mode...

 

 

Can you add a small series R to the Vcc, and connect a storage scope, and then try erase.

 

This is my undertanding of the race condition numbers...

 

Data Sheet says 

RST Low Time to Generate Reset tRSTL > 15μs

Reset Delay from non-POR source tRST Time between release of reset source and code execution  typ 50 μs

 

C2D appnote says 

 

The PI must be initialized with the following sequence:
 1. Drive C2CK low.
 2. Wait at least 20 µs.
 3. Drive C2CK high.
 4. Wait at least 2 µs.
 5. Perform an Address Write instruction targeting the FPCTL register (0x02).
 6. Perform a Data Write instruction sending a value of 0x02.
 7. Perform a Data Write instruction sending a value of 0x04 to halt the core. (new?)
 8. Perform a Data Write instruction sending a value of 0x01.
 9. Wait at least 20 ms.

 

Seems you need to get to the halt the core, sometime before the 50us delay allows the user code to sleep (which then must sleep the C2D)

 

My notes have those C2D instructions needing 1.5~1.85us each line on a 24.5MHz SiLabs MCU, so it should complete inside the 50us window ? (but if it does not, I think you have the brick problem)

 

If there is a choice for C2D clock speed, try increase of that ?

Check you have the latest Debug firmware ?

 

AN117 mentions this 

9. Stand-Alone Functions :  The following stand-alone functions are available for use in the Interface Utilities DLL. These functions do not require the use of the “Connect” or “Disconnect” functions and do not interact with any other functions.
FLASHErase() - Erase the Flash program memory using a Serial Adapter.
FLASHEraseUSB() - Erase the Flash program memory using a USB Debug Adapter.

 

Also try the simplest possible interface, like this 

and use the erase pathway like 

FLASHUtilCL flasheraseusb "" 0

 

Highlighted
Posts: 72
Registered: ‎09-15-2015

Re: How to unbrick EFM8 ?

I have had this problem (very recently — just a couple weeks ago), and spent more than two hours trying different debuggers and software solutions to no avail.

 

I cut my losses and spent 30 seconds unsoldering the bricked chip and soldering a new one.

 

And I learned my lesson to never put a chip asleep if you don't have a way of waking it up. Also, it's good practice to always add a while() loop before you enter sleep that checks a pin state, so you can always tie an I/O line low and reset the MCU to get it to stay awake.

Posts: 7
Registered: ‎05-30-2017

Re: How to unbrick EFM8 ?

Thanks for your help.

 

Indeed, it looks there is no way but replace the MCU...

 

I opened a ticket , and the official response is the same : 

 

 

Is their a notice about this problem written somewhere ?

Yes, in  the reference manual:

7.6.1 Configuring Wakeup Sources

Before placing the device in a low power mode, firmware should enable one or more wakeup sources so that the device does not remain in the low power mode indefinitely.

This implies that wake-up sources must be configured and running in order for them to request wake-up.  You cannot enable the RTC alarm wake-up, and expect it to do anything if the RTC is not already configured to trigger an alarm.

So no existing way to unbrick it ?

Probably not.  As the text in the previous section of the reference manual states:

"In addition, any falling edge on RSTb (due to a pin reset or a noise glitch) will cause the device to exit Sleep In order for the MCU to respond to the pin reset event, software must not place the device back into Sleep for a period of 15 μs."
It is likely that the USB debugger will not be able to establish a connection and halt the processor because the reset it attempts to initiate is not processed if you go into sleep mode too soon after pin reset without having a wake-up source enabled.
Posts: 5
Registered: ‎07-15-2017

Re: How to unbrick EFM8 ?

I think this note should be emphasized more in the sample code and documentation. I just had to order a replacement MCU and spend some time with a hot-air gun.

Posts: 5
Registered: ‎07-15-2017

Re: How to unbrick EFM8 ?

Has anyone tried unbricking the device using the bootloader? According to AN945 if P2.7 is held low for longer than 50 µs on either power-on reset (POR) or pin resets, this should start the bootloader, if present. It didn't work for me, as rev. A of EFM8SB2 doesn't have the bootloader installed.

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,185
Registered: ‎04-27-2004

Re: How to unbrick EFM8 ?


rastik wrote:

Has anyone tried unbricking the device using the bootloader? According to AN945 if P2.7 is held low for longer than 50 µs on either power-on reset (POR) or pin resets, this should start the bootloader, if present. It didn't work for me, as rev. A of EFM8SB2 doesn't have the bootloader installed.


That is a very good idea, and 'using the bootloader' may be as simple as pulling the Loader pin low.

 

Once that is done, the RESET steers the MCU from your code, to the Bootloader Wait-Char.

ie you probably do not need to actually use the Bootloader download, just the Enable Pin.