I am working on a project with 2 nrf52840 devices. One is the nrf52840 dk, while the other is a custom board with the nrf52840 module. I want to perform a dfu over uart to the custom board, however, the com port has no direct connection to the pc. I am currently connecting it to the nrf52840 DK via UART TX and RX pins. I would prefer to do the dfu without flow control, thus why I have not connected these pins. I have set the baud rate to 9600 and followed the answer given here. I was given the following error:
I have no idea as to why this is happening. The COM port is correct and I can program the bootloader on to both devices. This only occurs if I want to perform a dfu over UART. Any advice on where I should go from here, would be greatly appreciated!
Hi Amarin, I would suggest to test the setup with some simple UART example code before you test with DFU. I would suggest to try testing with the UART loop back example in the SDK. Have you made sure you connect ground on 2 boards nRF52 DK and the custom board ?
The info from the log telling that it couldn't open COM port 3, you may want to double check if it's the actual COM port of the DK.
I did not connect ground to both devices and thus why I got the error. However I am now getting the following error:
I had done the previous serial examples on my SDK, and they work just fine. However, when I am trying to do a dfu over the uart with the custom board, and it still does not work.
Hi, Have you tried to connect the DK to PC and the custom board to the DK and then can use UART on the custom board to communicate with PC ?
Please make sure you erase any application on the DK. Don't flash the bootloader on the DK.
The error telling that the custom board doesn't response to the ping command from the PC. Have you flashed the bootloader on the custom board and configured the GPIO pins for UART correctly on the bootloader firmware ?
The custom board does not have a connection that can directly connect to the PC. The only way it can be programmed is through the debugger or through it's UART pins. I have tried connecting it directly to the DK and having the DK connect to the PC which results in the error above.
I have configured the bootloader to the custom board and was able to flash the bootloader on to the custom board via the debugger.
Please answer this question:
Hung Bui said:Have you tried to connect the DK to PC and the custom board to the DK and then can use UART on the custom board to communicate with PC ?
Please test flashing a simple code that use UART on the custom board to test if it can communicate with PC (with the DK in the middle)