Hi everyone!
I have a Sparkfun NRF52840 Mini Breakout Board. I am trying to use this for development of nrf82540. I am using Arduino as IDE with Adafruit_NRF52 Library.
I tried to use UICR register as internal storage for configuration. The code is as below:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
A BLE test code for App development on BLE devices
*/
#define firmwareVersion "0.1.0"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
#include <avr/dtostrf.h>
#include <bluefruit.h>
#include <Adafruit_ADS1X15.h>
#include <ArduinoJson.h>
#include <CRC32.h>
#define INTERPOLATE_F(x, xA, yA, i) (*(yA + i - 1) + (x - *(xA + i - 1)) * (*(yA + i) - *(yA + i - 1)) / (*(xA + i) - *(xA + i - 1)))
#define CUSTOM_UUID(val) \
(const uint8_t[]) { \
0x20, 0x70, 0x28, 0xEA, 0xDD, 0xF4, 0x19, 0x9B, \
0x8A, 0x44, (uint8_t)(val & 0xff), (uint8_t)(val >> 8), 0x56, 0xAC, 0xE1, 0xDF \
But after flashing the code, the board bricked. USB is not detected. even i tried to enter Bootloader by double pressing reset button. (which normally shows as a usb drive with files in it). It is not even detecting USB in windows device manager. I tried to use JLink Commander.
I dont know what to do now. Also I dont know How to check the below "Recover after an accidental UICR erase". The Power LED is the only LED that glows now. the bootloader LED is not blinking even after double pressing RESET button twice.
Recover after an accidental UICR erase
You have two options for recovering when the REG0 (VDD) voltage is 1.8 V (typically after a UICR erase):
- Either use a debug probe that adapts the logic levels to the target device (for instance a J-Link PRO). Program firmware that configures REGOUT0 for 3 V.
- Or modify the dongle so that it can be supplied by an external supply and use the nRF52840 DK to program it.
- Adapt the dongle hardware as described under External regulated source in the nRF52840 Dongle documentation.
- Connect VDD from the nRF52840 DK to VDD OUT on the nRF52840 Dongle.
Please help! Thanks.