For a reason that I can't understand so far, I must erase the nRF52840 to be able to use UART1, TX RX on pins 0 1 (connector P14) to communicate with an external module.When nRF82840 is loaded with the default 9160 Board Controller FW, those pins are allocated to VCOM2.
This behavior is not in line with the datasheet statement : 5.7.1 nRF9160 DK board control
VCOM2 mapping is the optional config and must not be activated with the default nRF9160 Board Controller FW loaded in nRF52840.I tried again, erasing everything + reloading and all chars sent to UART1, TX pin, are displayed on my console VCOM2 rather than on my pin 1 connector P14.
Can someone explain why I have this behavior ?
The different options that you can change in the board controller can be seen in the Kconfig file to the nrf52840_pca10090.
So we need to build and flash a new application on the nrf52840 to route the pins.
If you want to route the UART0 from VCOM0 (default) to the external pins (P0.26 - P0.29) we need to reflash the Board Controller (nrf52840) so it routes the pins differently.
This can be done by just adding the following:
in the prj.conf file in for example the hello_world sample and build it for the nrf52840_pca10090 board.
The same goes for when you want to route UART1 to the external pins (P0.01, P0.00, P0.15 and P0.14)
Add the following:
in the prj.conf file.
Adding a precompiled board controller application for routing out UART1 to the external pins:
board_controller_uart1.hexFlash with command line: nrfjprog --program boardcontroller_uart1.hex -f nrf52 --sectorerase -r --verify
When flashing the nrf52840 remember to have the SW5 to nrf52.
Example with interfacing with UART0:
Here you can see how I connected the TTL-232RG-VIP-WE with the nrf91DK with UART0:
So here I am running at_client sample on the nrf91 and use the UART from the TTL to send/receive AT-Commands:
Thanks for that very detailled answer. Let me check that...
In the meantime, can you comment on nRF9160 spec, chapter "5.7.1 nRF9160 DK board control" which states that default config should be PIN header, while it appears to be the opposite ?
Hi Nico,Sorry, I forgot to address that question in your original post.
You are totally correct in your findings, it should be opposite.
It has been reported internally so it will be fixed in the next revision.Thank you again for the feedback!
You're welcome !
At least I'm not crazy, I almost smashed my head on the wall while understanding what I was doing wrong.
How to map the nrf9160 UART0 to VCOM0 and UART1 to VCOM2 at the same time?
According to the DK user gudie, it stated pin 28&29 was connected to VCOM0 and pin 0&1 was connected to VCOM2 in default, but I cannot access UART1 via VCOM2 for CONFIG_SLM_CONNECT_UART in serial_lte_modem sample.