Re: Sparkfun Pro nRF52840 Mini support?

Lawrence King

Hi Rodrigo


The parts you talked about are the easy parts and I have no problem with these changes. (LDO/DC-DC, crystals, gpio aliases, dts, etc.). I think I already have these set up.


The “challenge” with the Sparkfun board is the debugger, and the FLASH space. The Sparkfun board does NOT have an external chip of some kind to do debugging, instead they preload the nRF52840 with a bootloader which presents itself on the native USB interface as a serial port (CDC) and a mass storage device. This way the “usual” tools will work (pyocd) exactly as expected. However the bootloader is “somewhere” in the internal FLASH and it is necessary to change the memory definition in dts to not overwrite the bootloader (and brick the board), also the serial console needs to call the bootloader to output messages on the virtual serial port.


Has anyone looked into these portions of the problem for some other chipset? This is the portion of the problem I am not quite sure how to fix.


Of course my fallback plan is to use an external debugger (J-Link of some kind? Black Majic?). Is there a recommended external debugger I should use for nRF52840?


Lawrence King

Principal Developer



From: Rodrigo Peixoto <rodrigopex@...>
Sent: Thursday, April 18, 2019 12:49 PM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] Sparkfun Pro nRF52840 Mini support?


Hi Lawrence,


I am not aware if anyone is bringing up this board, but I can suggest you bring it up yourself. It is not a big deal. The process is copying, pasting, and changing some portion of the files. 


How experienced are you on Zephyr?



1 - Is the Bluetooth module using dc-dc or LDO? 

    YES: Do nothing just copy the board files and rename them;

     NO: You must to disable DCDC by setting the BOARD_ENABLE_DCDC to "default n" at the Kconfig file. 

2 - Is the low-frequency oscillator is present on the Bluetooth module?

    YES: Do nothing

    NO: You have to add the CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the "board_name_defconfig" file. 


The last step is to change the DTS to adjust the pins used by your board. 


If you need further help let us know.



Best regards,

Rodrigo Peixoto

Co-founder and Technical advisor


+55 (82) 98144-8585 | Skype: rodrigopex




Em qui, 18 de abr de 2019 às 11:09, Lawrence King <lawrence.king@...> escreveu:

I just received some Sparkfun nRF52840 boards and I was hoping to bring up Zephyr on the boards.


There is a Sparkfun nRF52832 board listed in the supported boards, but this board needs an external debugger. Now that Sparkfun has two different nRF52 boards I think that the existing board in the tree nrf52_sparkfun needs to be renamed to nrf52832_sparkfun, and the new board should be added as nrf52840_sparkfun.


The nrf52840_sparkfun board has an onboard bootloader which presents as a tty and a usb drive when I plug it in so I expect that pyOCD should work for loading code and debugging, however I think that the ROM layout may need to be changed to not overwrite the bootlopader.


Is anyone working on bringing up this board?



Lawrence King

Principal Developer

Connected Transport Market Unit



1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7


CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.




Join to automatically receive all group messages.