Hi Oliever,

Which MCUs have you been playing with?

This is a common 'problem' that can occur when you indeed enable LPM (or
other things like disable debug pins etc). Therefore, most MCUs have
certain procedures to keep the MCU halted after a reset, before any code is
executed and the MCU gets unreachable. IIRC, ARM Cortex provides a
vector-catch operation to halt the MCU after reset. Some IDEs (like
Simplicity Studio for EFM32 MCUs) have a special unlock operation.

Your solution isn't new, but works great to solve/work-around the problem
;-)

Kind regards
Bas Stottelaar



Op wo 19 dec. 2018 om 08:08 schreef Olivier Fauchon <[email protected]
>:

>
> Hi,
>
> I recently bricked a couple of MCUs playing with low power modes.
> I'm still not sure what happened, but enabling LPM on my board makes JTAG
> inoperant.
>
> I spent a lot of time trying to save these dead MCUs.
>
> To avoid this situation, I added some kind of recovery mode at boot :
>
>
> board.c
>
> void board_init(void)
> ...
>
>     // Safeguard: Infinite loop if board started with buttons pushed
>     gpio_init(BTN0_PIN, GPIO_IN_PU);
>     gpio_init(BTN1_PIN, GPIO_IN_PU);
>     if (!gpio_read(BTN0_PIN) ||  !gpio_read(BTN1_PIN) ) {
>         gpio_set(LED0_PIN);
>         gpio_set(LED1_PIN);
>         while(1){}
>     }
>
> Did I reinvent the wheel ?
> Do Riot have already mecanisms to delay boot , or other way to protect
> from bad images ?
>
> Thanks
> Olivier Fauchon
>
>
>
>
>
>
> _______________________________________________
> users mailing list
> [email protected]
> https://lists.riot-os.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/users

Reply via email to