-
-
-
@Gordon, for clarity, why do we need to restart the "softdevice" to be able to use the poke32 functions?
-
-
-
Thankyou @Gordon, that works... I've put in the extra semi-colons...
NRF.disconnect();setTimeout(function() { NRF.restart(function(){ LED.set(); poke32(0x4001e504,1);while(!peek32(0x4001e400)); // enable flash writing poke32(0x1000120c,0xfffffffe);while(!peek32(0x4001e400)); // NFC pins as GPIO poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing });}, 1000);
-
-
Thanks @fanoush, Am I missing something as my MDBT42Q has no USB connector?
-
-
@Gordon, I am really stuck here. We've got PCBs made and it was in hindsight a bad idea to use the NFC pins for straight GPIO work....
-
Tried that @fanoush. its not calling the code inside the restart function it appears
-
-
Thanks for the prompt replies. I've got the zip file downloaded and selected it using the "flash from file" button. I select the correct board in the FIRMWARE UPDATE dialog, press next and then there is no prompt to put into bootloader mode...nothing else happens.
Got round that using the URL approach. firmware is in (IDE confirms that) but still can't set the register? Power cycled it as well... Tried the done var watch as suggested by @fanoush and its set still to zero so something is not workingfunction READNFC() { console.log(peek32(0x1000120c).toString(16)); return (0); } function SETNFC() { NRF.disconnect();NRF.restart(function(){ poke32(0x4001e504,1);while(!peek32(0x4001e400)); // enable flash writing poke32(0x1000120c,0xfffffffe);while(!peek32(0x4001e400)); // NFC pins as GPIO poke32(0x4001e504, 0);while(!peek32(0x4001e400)); // disable flash writing }); }
-
@Gordon, apologies for not replying initially. It all worked before and tried the above code as well and it changes the registers as intended.
This then means that the NFC pins that had stopped working as GPIO now work again which is what I was trying to prove all along.....