Flash MicroPython on watch

Posted on
  • Hello,

    I'm trying to get MicroPython(there is a port for nRF52832) in my banglejs but I can't make it work.

    After flashing through DFU a signed package the watch reboot and shows:
    WATCHDOG
    DFU ZYOS

    BOOTING . . .

    then it reboots and shows
    LOCKUP
    DFU ZYOS

    BOOTING . . .

    and reboot again and again showing lookup message.

    After that I'm able to enter DFU mode and flash Espruino again and the watch boots normally, all apps are still there, like nothing happened.

    Could someone help me debug this?

  • DFU ZYOS is actually DFU 2v05, and LOCKUP means the app you uploaded (MicroPython) locked up without running (or at least kicking the Watchdog timer).

    It could be:

    • Not kicking the watchdog
    • Trying to use 32kHz oscillator or the switching power supply circuit (I can't actually remember if Bangle.js has these)
    • Maybe something else?

    Honestly, for something like this I think you'll need to break the watch open and attach to the SWD pins behind the LCD. Once you've done that you could then actually debug the code properly, and if MicroPython is hanging or causing a hardfault you'll be able to see exactly where.

    It's a bit of a pain initially, but it'll save you weeks of work when done :)

  • Is it mandatory to use a Nordic nRF52832 DK to connect?

  • micropython does not support 3.0 version of softdevice that matches SDK12 that espruino uses. nRF52832 DK is not needed, any SWD debugger device would work including raspberry pi or pico or $2 blue pill board or stlink usb dongle from aliexpress. And BTW there is already micropython based firmware for nrf52832 watches called waspos https://github.com/daniel-thompson/wasp-os that might be good starting point.

  • Thanks! I'll try with wasp-os

  • I've opened the watch but I'm not sure how to connect the SWD pins. I see 4 golden circles in the back of the board but I haven't found which one is GND, SWDIO and SWCLK. Could you help me with this?

  • Here you go... I'll also update https://www.espruino.com/Bangle.js+Technical with this:

    You only need GND, SWDIO, SWDCLK. VDD is not required for programming


    1 Attachment

    • Screenshot at 2021-06-21 09-11-09.png
  • Wondering what MicroPython has over Javascript for Bangle JS ?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Flash MicroPython on watch

Posted by Avatar for alej0 @alej0

Actions