• Wow, that's great - glad you got it sorted, and thanks for your help @fanoush!

    But peek32(0x10001204).toString(16) not reporting ffffffff is extremely strange - those registers are protected by the softdevice so it's hard to see how they could have got reset...

    Or - is it possible you maybe flashed the wrong firmware to the Bangle? Like if you flashed a Puck.js/Pixl.js firmware then those might have reset the UICR to something else.

  • Or - is it possible you maybe flashed the wrong firmware to the Bangle? Like if you flashed a Puck.js/Pixl.js firmware then those might have reset the UICR to something else.

    I think that it is quite easy to make such mistake and flash different firmware and most of them have this flag enabled. Fortunately it often works and one can reflash back to correct firmware without consequences. We are lucky it is CS pin so it has probably a pull up, unlike this poor soul in nordic forum.

    In theory you could use hw_version field in bootloader to prevent firmware mismatch like this, e.g. all those IDxxx fitness trackers by IDOO Smart have separate codes for each devices. Works both for obfuscation and preventing of bad FW flashing. However it needs more effort when building DFU firmware zips so may not be worth it.

    EDIT: checked it and for legacy DFU it was different, there were two values specified at package creation --dev-type and --dev-revision and then also --application-version. IDOOSmart used different --dev-type for each device. When looking at secure DFU the nrfutil pkg generate --help now only shows --application-version INTEGER and --hw-version INTEGER so there seems to be no device type/revision now in secure DFU, only hw-version could be used for this (and Bangle have the check disabled for code size anyway).

    Maybe they removed it because of signing, one can use per device key so then such mismatch won't happen, with legacy DFU the dev-type/revision could be a bit like signing so that bootlaoder won't accept random dfu package, without correct dfu zip it is quite time consuming to guess right combination.

About

Avatar for fanoush @fanoush started