ronoth / LoStik

LoRaWAN compatible USB test device
MIT License
132 stars 39 forks source link

how to recover bricked RN2903 with ICSP? #29

Closed haimiko closed 2 years ago

haimiko commented 2 years ago

Midway into the firmware update my device lost connection. The module is now bricked. How can I leverage the ICSP terminals to recover it like with an Arduino as ISP?

lolsborn commented 2 years ago

It is a PIC microcontroller and you need a programmer for it. You can get knock-offs cheap https://www.amazon.com/NOYITO-Microcontrollers-PICkit2-Debugger-Programmer/dp/B07GMH732N/ref=sr_1_6?keywords=pickit2&qid=1638996760&sr=8-6

Microchip provides two separate hex files one is "combined" which includes the bootloader. If you are flashing via USB you want the other one, but over ICSP you want to use the file which includes bootloader.


From: Haim Lichaa @.> Sent: Wednesday, December 8, 2021 12:51 PM To: ronoth/LoStik @.> Cc: Subscribed @.***> Subject: [ronoth/LoStik] how to recover bricked RN2903 with ICSP? (Issue #29)

Midway into the firmware update my device lost connection. The module is now bricked. How can I leverage the ICSP terminals to recover it like with an Arduino as ISP?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ronoth/LoStik/issues/29, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAAOZBGOALHUZ4LVGFL72CLUP7AO3ANCNFSM5JUYB7RQ.

lolsborn commented 2 years ago

I guess I should mention you'll want to download MPLab IDE for this.


From: Steven Osborn @.> Sent: Wednesday, December 8, 2021 12:54 PM To: ronoth/LoStik @.>; ronoth/LoStik @.> Cc: Subscribed @.> Subject: Re: [ronoth/LoStik] how to recover bricked RN2903 with ICSP? (Issue #29)

It is a PIC microcontroller and you need a programmer for it. You can get knock-offs cheap https://www.amazon.com/NOYITO-Microcontrollers-PICkit2-Debugger-Programmer/dp/B07GMH732N/ref=sr_1_6?keywords=pickit2&qid=1638996760&sr=8-6

Microchip provides two separate hex files one is "combined" which includes the bootloader. If you are flashing via USB you want the other one, but over ICSP you want to use the file which includes bootloader.


From: Haim Lichaa @.> Sent: Wednesday, December 8, 2021 12:51 PM To: ronoth/LoStik @.> Cc: Subscribed @.***> Subject: [ronoth/LoStik] how to recover bricked RN2903 with ICSP? (Issue #29)

Midway into the firmware update my device lost connection. The module is now bricked. How can I leverage the ICSP terminals to recover it like with an Arduino as ISP?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ronoth/LoStik/issues/29, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAAOZBGOALHUZ4LVGFL72CLUP7AO3ANCNFSM5JUYB7RQ.

haimiko commented 2 years ago

@lolsborn figured it out without the programmer. Since I bricked it using the USB (bootloader) method the bootloader was still intact. I found an alternate solution using the Microchip Suite --> Module --> Boot Loader Recover, then loaded the hex file successfully.

Your method would definitely come in handy should I corrupt the bootloader too. Thank you.