Using Adafruit’s Bluefruit nRF52 Feather bootloader on a cheap chinese board.

I have one of these E73-TBB Test Board for an nRF52832 module. The board is only U$S10 and Ebay was handing out U$S5 off coupons, so it ended costing me the same as the bare bluetooth module. The board comes with a USB-to-serial converter, a couple of leds and a couple of switches, nothing too fancy. I don’t have a programmer for this board but I bought it anyways thinking that it could be possible to use with the Arduino environment.

E73 TBB Board with main components highlighted

The module itself is a E73-2G4M04S1B (for which there is a manual available) but there isn’t much information about the board. As a first step I had to figure it out how everything is connected, from that I got this schematic:

E73-TBB Test Board For nRF52832 schematic

The layout is quite similar to other boards like SparkFun’s nRF52832 Breakout or Adafruit’s Bluefruit nRF52 Feather. There is even a board whit the same module with the leds, switches and UART wired as a Bluefruit nRF52, this allows them to use Adafruit’s bootloader without any modifications. What I’m lacking is a switch on the reset line but that is not such a big isuue.

I started with Sparkfun bootloader whitout much luck, not sure what the problem was, and then with Adafruit’s bootloader. Thankfully the people at Adafruit have make it really easy to use it and modify it with a superb documentation.

E73 board coneected to a J-Link EDU through an adapter board we made at work.

The only files I had to modify is the Makefile (just to correct path to some tools) and the board.h file for the nrf52832 feather. In this last file you’ll find the definition of the pins used for the leds, switches and UART. So, It was just a matter of changing the values to match the wiring on my board.

Original and modified

Now, I can’t say the rest of the process went smoothly. I could flash the bootloader in the board (using a J-Link from work 😉 ) but the Arduino software didn’t recognize it whenever I tried to flash something on it.

I was trying different things until I found a sequence of events that make it work. You have the possibility to update the bootloader in Adafruit’s board in Arduino using a J-Link.

I tried that and worked great , but now I had the wrong bootloader in the board. I immediately flash the modified bootloader directly with the J-link

And that somehow made the trick. Not sure why this is, if somebody have any idea please comment.

Blinkyyy!!!!

Now I have a board “Bluefruit nRF52 Feather compatible”. To enter bootloader mode I’m currentely shorting the RST pin to GND with a cable while holding the DFU button. There are a couple of modifications that I migth make in the future to make things easier:

  • I’m using one of the buttons as DFU and the other one as FRST. This last one isn’t used that much, you don’t even have a dedicated button in the Bluefruit nRF52 Feather, so I might modify the PCB in order to use it as a RST button.
  • The Bluefruit nRF52 Feather also has the DTR line from the USB-to-serial converter wired thorugh a capacitor to the RST line, this way you can normally enter bootloader mode and flash new firmware whit out haveing to press buttons.

UPDATE 1

As massimiliano mentioned on the messages section there is a mistake in the image showing both board.h files, it should be 13 and 14 instead of 28 and 29 in the switch pins definitions.

UPDATE 2

I lost the files and repo so I repeated the process again. This time (as I mentioned to Norbert on the messages section) I used nRF Connect Programmer. Here is the updated bootloader, I interchanged the definitions for the pins, now SW1 is DFU, press it while connecting RST to ground and the device will enter bootloader mode (LED 1 with a slow “breath” pattern)