We are doing some rapid prototyping using PCA10040 boards. I have a bench-top setup with a PCA10040, and some sensors. We want to place our sensors on an Arduino shield, enclose a PCA10040 and the shield in a box, and send several devices out into the field.
The problem is that my current software sometimes requires that we press the IF BOOT/RESET button. This is a legacy of an intermittent problem that I've had over the past two years. The USB-UART sometimes would not transmit from my desktop computer to the PCA10040 peripheral. The problem may have something to do with different versions of the SEGGER firmware. It may have something to do with a bug in the Linux serial port drivers. The problem was never fully diagnosed. It may no longer exist.
The program I wrote for the peripheral worked around this problem by simply starting to transmit data without waiting for a prompt from the desktop PC. This works some of the time, but usually not on the first try. If I push the IF BOOT/RESET button after the desktop PC program to receive the data is running, that usually initiates a proper connection. I don't know exactly how this works.
I may not have time to correct my software before sending devices out into the field, and actually, I don't know whether I will still have issues. Therefore I wanted to break out the IF BOOT/RESET button functionality to a panel-mount button.
I have looked over the nRF52-DK schematics. The IF BOOT/RESET button is SW5. SW5 connects to a net named BOOT, which runs directly to the ATSAM3U2E microcontroller. The BOOT net is not exposed on the Arduino pins. It looks like the ATSAM3U2E can reset the nRF52, through SB27 connecting nRF_RESET to P0.21. But pushing SW5 may also do other things.
The Arduino RESET line is apparently floating unless I short SB17, at which point RESET would be connected to P0.21. I am not sure how to connect to P0.21 directly, even if I do short SB17. Do I need a pullup resistor, debouncing switches, etc.? The Arduino convention for using the RESET line is to simply connect it to GND through a momentary SPST switch.
What is happening when I push IF BOOT/RESET on an nRF52-DK in its default configuration?
What are the chances that the USB-UART issue I described would require rebooting the whole board, and not just the nRF52? If I had to reboot everything, is there a way to do that that doesn't involve wiring a switch in parallel to SW5?
Thanks for your advice and assistance.
Hi, the IF BOOT/RESET button just asserts the P0.21 button. So you should be fine just pulling P0.21 to GND using an external button.
P0.21 has an internal pull-up so the only thing you need to do in order to reset the nRF52 is to pull this line to GND momentarily.
P0.21 is already wired out through the P6 header so you can just use this header instead of shorting SB17.
May I ask whether or not you are using HWFC on the nRF52 chip?
Thanks for your reply, Stian. We are using hardware flow control on the nRF52, consistent with all of Nordic's example UART code that I have seen. I have not investigated the possibility that software flow control would correct the UART problems I have had in the past.
And thanks for pointing me at the breakout for P0.21 on P6, it's out of numerical order and I was looking all over for it. I don't necessarily need to follow the Arduino pin conventions.