This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf9160 transmit buffer over uart

Hi Guys, 

I was able to connect a second uart to the evaluation board and receive over uart.

however I didnt find an example of how transmit a buffer over uart. 

is there such an example ? 

I did see some example in this post: 

https://devzone.nordicsemi.com/f/nordic-q-a/44788/nrf9160-dk-send-receive-data-from-uart1

however, I didnt understand what are those fifo's , and if I should initialize them ? 

Thanks,

Moshe

Parents
  • Hello, have you looked at this example?

  • I have,

    this example is only RX

  • I'm not sure if there is any example that shows explicit use of uart transmission. Have you tried just using uart_fifo_fill()?

     

    however, I didnt understand what are those fifo's , and if I should initialize them ? 

     https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics)

    In short, a FIFO is just a data buffer where data is read and written in a certain order. I don't think you need to initialize it, I believe it's handled by the kernel when the drivers are initialized.

  • I get fifo_uart_tx_data undeclared error on it.

    Am I missing something?

  • What does your .conf file look like?

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    # General config
    CONFIG_NEWLIB_LIBC=y
    CONFIG_TEST_RANDOM_GENERATOR=y
    CONFIG_ASSERT=y
    CONFIG_REBOOT=y
    #CONFIG_UART_2_NRF_UARTE=y
    CONFIG_SERIAL=y
    CONFIG_TRUSTED_EXECUTION_NONSECURE=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    #CONFIG_HAS_HW_NRF_UARTE3=y
    CONFIG_HAS_HW_NRF_UARTE1=y
    CONFIG_UART_1_NRF_UARTE=y
    CONFIG_UART_1=y
    CONFIG_AT_HOST_UART=2
    #CONFIG_UART_ASYNC_API=y
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y
    # MQTT
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reply
  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    # General config
    CONFIG_NEWLIB_LIBC=y
    CONFIG_TEST_RANDOM_GENERATOR=y
    CONFIG_ASSERT=y
    CONFIG_REBOOT=y
    #CONFIG_UART_2_NRF_UARTE=y
    CONFIG_SERIAL=y
    CONFIG_TRUSTED_EXECUTION_NONSECURE=y
    CONFIG_UART_INTERRUPT_DRIVEN=y
    #CONFIG_HAS_HW_NRF_UARTE3=y
    CONFIG_HAS_HW_NRF_UARTE1=y
    CONFIG_UART_1_NRF_UARTE=y
    CONFIG_UART_1=y
    CONFIG_AT_HOST_UART=2
    #CONFIG_UART_ASYNC_API=y
    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_SOCKETS_OFFLOAD=y
    CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y
    # MQTT
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Children