uart implementation using pca10059 dongle

i have a code base which is originally run on nrf52832 dk and i want to port it to the pca10059 dongle
i run in gcc env and successfully modified the definitions and includes to run on nrf52840.
with one exception/problem:
something with the uart handling routine seems to be broken.
it bootloops when the first char is printed,so i added  NRF_LOG_USES_RTT=1 define and now it handles a printf in the code

but the printf not show on the correct gpio pin but if i run app_uart_put it outputs a pulse train continuously and the program halts

i defined all uart pins besides the tx pin to be UART_PIN_DISCONNECTED.

in the makefile i change:
CFLAGS += -DBOARD_PCA10040
CFLAGS += -DNRF52832_XXAA
CFLAGS += -DNRF52
to:
CFLAGS += -DBOARD_PCA10059
CFLAGS += -DNRF52840_XXAA
CFLAGS += -DNRF_LOG_USES_RTT=1
and
SRC_FILES +=$(SDK_ROOT)/components/toolchain/gcc/gcc_startup_nrf52.S
SRC_FILES +=$(SDK_ROOT)/components/toolchain/system_nrf52.c
to:
SRC_FILES +=$(SDK_ROOT)/components/toolchain/gcc/gcc_startup_nrf52840.S
SRC_FILES +=$(SDK_ROOT)/components/toolchain/system_nrf52840.c
appropriately
it runs fine using the ble and toggling leds on both the pca10040 and pca10059, but if i use printf it only works fine on the nrf52832 dk

Parents
  • Hi,

    Have you modified the dongle with a debugger and connected the UART line(s) to something external? The Dongle does not come with a debug chip like the DKs, so it will not output UART over the USB port. You can also use USB CDC ACM to send UART data over the USB port of the dongle.

    Please post a diagram of the dongle and how you program it and interface with the UART.

    For more details, please see the nRF52840 Dongle Programming Tutorial.

    Best regards,
    Jørgen

  • i have not connected a debugger, i want to connect the gpio pins to TTL-232R to interface uart-usb
    i also verified with an oscilloscope to see if the tx is working.

    i did try to add cdc acm functionality but couldnt get it to work with the existing codebase so i decided it would be simpler to just use external uart interface.

    i program it using the bootloader programming method(using nrf connect programmer program).

Reply
  • i have not connected a debugger, i want to connect the gpio pins to TTL-232R to interface uart-usb
    i also verified with an oscilloscope to see if the tx is working.

    i did try to add cdc acm functionality but couldnt get it to work with the existing codebase so i decided it would be simpler to just use external uart interface.

    i program it using the bootloader programming method(using nrf connect programmer program).

Children
No Data
Related