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 Reply Children
  • # 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
    CONFIG_MQTT_SOCKET_LIB=y
    CONFIG_MQTT_LIB_TLS=y
    CONFIG_MQTT_MAX_PACKET_LENGTH=2048
    CONFIG_NRF_CLOUD_HOST_NAME="aigjres9rg3vv-ats.iot.eu-west-1.amazonaws.com"
    CONFIG_NRF_CLOUD_SEC_TAG=3314
    
    # LTE link control
    CONFIG_POWER_OPTIMIZATION_ENABLE=y
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    
    # Modem info
    CONFIG_MODEM_INFO=y
    
    # BSD library
    CONFIG_BSD_LIBRARY=y
    
    # nRF Cloud
    CONFIG_NRF_CLOUD=y
    
    # Sensors
    CONFIG_GPS_USE_SIM=y
    CONFIG_ACCEL_USE_SIM=y
    
    # Library for buttons and LEDs
    CONFIG_DK_LIBRARY=y
    CONFIG_DK_LIBRARY_INVERT_LEDS=n
    
    # Console
    CONFIG_CONSOLE_SUBSYS=y
    CONFIG_CONSOLE_HANDLER=y
    CONFIG_CONSOLE_GETCHAR=y
    
    # Main thread
    CONFIG_MAIN_THREAD_PRIORITY=7
    
    # Heap and stacks
    CONFIG_HEAP_MEM_POOL_SIZE=16384
    CONFIG_MAIN_STACK_SIZE=8192
    CONFIG_GPS_SIM_THREAD_STACK_SIZE=1024
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1500
    CONFIG_HW_STACK_PROTECTION=y
    
    

  • Have you tried calling uart_fifo_fill() from the uart example I showed you? I tried it and at least it does compile.

  • Hi,

    I am stuck in the same problem. I looked into the post here: https://devzone.nordicsemi.com/f/nordic-q-a/44788/nrf9160-dk-send-receive-data-from-uart1

    I get the same error when I try to combine the code there i.e: fifo_uart_tx_data undeclared error. I could not find it in the uart.h library and wanted to know how is it declared ?

    Regards,

    Adeel.

Related