Bangle1 connecting SWD - VDD voltage

Posted on
  • So i disconnected the battery and i want to program a bangle 1.

    Just want to make sure what voltage is the VDD line for swd connection. Is it 3.3v or 5v

  • It's just 3.3v you need - but when the display is on it can draw about 60mA or so, so you need to ensure whatever programmer you're using can supply that.

    It's also possible to keep the battery connected and to just connect GND, SWD, SWCLK and not worry about VCC at all.

  • In general there is no reason to disconnect the battery (as long as you use just GND,DIO,CLK), it is even better too keep it connected as the device may check battery voltage and shut down when it is 'low'. Also when you don't mess with power you can attach and detach SWD without affecting the device at all. If you need to reset the device it can be done over SWD without disconnecting the power.

    BTW at least with openocd when you end the session it keeps the nrf5x debugging bits powered on so battery will drain fast. With CMSIS-DAP debugger it is possible to detach it in more sensible way via nrf52.dap dpreg 4 0 ; shutdown, this will power off debug interface before detaching so power draw is back to normal. Maybe J-Link does it automatically, I don't know.

  • So i wasn't even able to program it without the battery using my raspberry pi pico board. Don't know why? pico should be able to produce up to 300mA?

    But it doesn't really matter anyway because when reattached the battery and try and program it i get "Device has AP lock engaged". So i'll have to use a real segger programmer anyway and completely erase the chip.

    Will i be able to recharge the battery if i attach VDD?

  • Device has AP lock engaged". So i'll have to use a real segger programmer anyway

    No need for segger for that, Pico with CMSIS-DAP and OpenOCD could do it too, newer OpenOCD versions even print helpful message how to do that.

    nRF52 device has AP lock engaged (see UICR APPROTECT register).
    Debug access is denied.
    Use 'nrf52_recover' to erase and unlock the device.
    

    So just use 'nrf52_recover' command.

    And BTW you could also unlock it from the device via software by erasing and rewriting UICR from javascript.

  • Will i be able to recharge the battery if i attach VDD?

    you mean 3.3V? no, the battery is 3.7-4.2V but you can attach 5V like it was meant to be used when the device is closed. You could even do it with Pico - take 5V feeding the Pico and connect it to 5V charger input pins on the watch. Just ignore the 3.3V

  • That work great!

    Steps to reset NR52 Device

    • grab software here
    • The apps built in Rust so you'll need that plus Rust package manager cargo
    • also need "sudo apt-get install libusb-1.0-0-dev librust-pkg-config-dev"
    • Then run nrf-recover

    Error i saw

    Error No supported probe was found - unplugged programmer device or not configured correctly

    Error Didn't receive any answer during batch processing: - most likely you have your i2c lines mixed up

  • So I'm connected to Vbus and ground on the power input. Also connected to the programmer pins connected to my pi Pico


    1 Attachment

    • 20240421_122026.jpg
  • Steps to reset NR52 Device

    grab software here
    The apps built in Rust so you'll need that plus Rust package manager cargo
    also need "sudo apt-get install libusb-1.0-0-dev librust-pkg-config-dev"
    Then run nrf-recover

    Well what I meant is nrf_recover command/script defined inside OpenOCD nrf52 target https://github.com/openocd-org/openocd/bĀ­lob/master/tcl/target/nrf52.cfg#L73 which can be typed in openocd command line as instructed by that message.

    But it is great you are not satisfied with doing stuff in easy ways. The https://github.com/probe-rs/probe-rs used by that code looks like nice rust library for using those debug probes.

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

Bangle1 connecting SWD - VDD voltage

Posted by Avatar for user156811 @user156811

Actions