Page 1 of 1

Bricking

Posted: Mon Sep 27, 2021 12:57 pm
by AndreyB
It looks like we have maybe a number of unrelated bricking problems.

Yesterday I was visiting @abricosvw and I have bricked his Frankenso. More details on that specific bricking https://github.com/rusefi/rusefi/issues/3278

Bill on slack reports that he bricks his Proteus once a week

Don with microRusEFI on RX8 I believe has just bricked his.

Most recent good news in this area are https://github.com/rusefi/rusefi/issues/3266

Problem I see: we do not have exact steps to reproduce. If anyone can contribute exact steps to reproduce the problem it would be priceless!

Re: Bricking

Posted: Mon Sep 27, 2021 3:39 pm
by andreika
I've noticed yet another way to brick my board (hellen81): if I set wrong SPI settings for the SD-card (wrong SPI number and pins), then something happens to the USB config inside the firmware (possibly somehow related to the mass-storage driver part?), and TunerStudio cannot connect to the USB-COM port anymore under Win10 :( The COM port is still listed in the Device Manager (but doesn't work), and there are no SD-card disks (which is expected). At the same time the same board with the same settings still connects under Win7 - maybe because Win7 ignores the MSD part of the driver?.. And the engine works, so the firmware is still functional, except for the connection part.
Unfortunately I didn't have much time to investigate it, so I didn't create an issue, sorry...

Re: Bricking

Posted: Mon Sep 27, 2021 6:34 pm
by Simon@FutureProof
@andreka That sounds like it is trying to load the SD card but is failing and getting stuck in a loop. What happens if you leave it and wait? Before Matt made some improvements it would do that if the physical pins were bad on the SD card socket but would then connect after a wait.

All of the bricking reports seem to imply that they were doing something with the power, cycling the power in some way, is it possible that the MCU is getting powered off mid boot and that is corrupting something?

Keith just confirmed he was cycling the ignition on and off when his bricked.
BeerMoneyMotorsports
@Keith when you bricked. You were cycling the key all the way off or no? Whenever you key off the car, it writes to your tune. So i am trying to identify if it’s related to frequent changes/writes to tune or else.

Keith
Yes I was doing some quick full key cycles

Re: Bricking

Posted: Tue Sep 28, 2021 5:31 pm
by mck1117
OrchardPerformance wrote:
Mon Sep 27, 2021 6:34 pm
@andreka That sounds like it is trying to load the SD card but is failing and getting stuck in a loop. What happens if you leave it and wait? Before Matt made some improvements it would do that if the physical pins were bad on the SD card socket but would then connect after a wait.
Yeah, there's likely still some issue there where it can get stuck if the SD config is wrong (the two cases of SD present and SD missing both work, but some intermediate case may not). Tracked by https://github.com/rusefi/rusefi/issues/2424
OrchardPerformance wrote:
Mon Sep 27, 2021 6:34 pm
All of the bricking reports seem to imply that they were doing something with the power, cycling the power in some way, is it possible that the MCU is getting powered off mid boot and that is corrupting something?

Keith just confirmed he was cycling the ignition on and off when his bricked.
BeerMoneyMotorsports
@Keith when you bricked. You were cycling the key all the way off or no? Whenever you key off the car, it writes to your tune. So i am trying to identify if it’s related to frequent changes/writes to tune or else.

Keith
Yes I was doing some quick full key cycles
If one of you gets this to happen again, can you try and take a full dump of the chip with stm32cubeprogrammer (either over DFU/USB or with an stlink)? I assume any bricking failure mode that's fixed with a reflash is some accidental flash erase/write on our part. We shouldn't be doing anything EVER (except during burn of new settings) that can corrupt the flash memory. During all normal operation it should be read only.

Re: Bricking

Posted: Tue Sep 28, 2021 11:44 pm
by Keith
mck1117 wrote:
Tue Sep 28, 2021 5:31 pm
OrchardPerformance wrote:
Mon Sep 27, 2021 6:34 pm
@andreka That sounds like it is trying to load the SD card but is failing and getting stuck in a loop. What happens if you leave it and wait? Before Matt made some improvements it would do that if the physical pins were bad on the SD card socket but would then connect after a wait.
Yeah, there's likely still some issue there where it can get stuck if the SD config is wrong (the two cases of SD present and SD missing both work, but some intermediate case may not). Tracked by https://github.com/rusefi/rusefi/issues/2424
OrchardPerformance wrote:
Mon Sep 27, 2021 6:34 pm
All of the bricking reports seem to imply that they were doing something with the power, cycling the power in some way, is it possible that the MCU is getting powered off mid boot and that is corrupting something?

Keith just confirmed he was cycling the ignition on and off when his bricked.
BeerMoneyMotorsports
@Keith when you bricked. You were cycling the key all the way off or no? Whenever you key off the car, it writes to your tune. So i am trying to identify if it’s related to frequent changes/writes to tune or else.

Keith
Yes I was doing some quick full key cycles
If one of you gets this to happen again, can you try and take a full dump of the chip with stm32cubeprogrammer (either over DFU/USB or with an stlink)? I assume any bricking failure mode that's fixed with a reflash is some accidental flash erase/write on our part. We shouldn't be doing anything EVER (except during burn of new settings) that can corrupt the flash memory. During all normal operation it should be read only.
If it happens again I'll dump it and let you know.