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

serial example use UART to communication with PyACI

Hi support team,

I download mesh (nrf5_SDK_for_Mesh_v3.2.0) serial example FW to nRF52840 DK,

and connect to embedded linux gateway over USB,

I can run PyACI example normally!

Can i connect P0.06, P0.08, GND (UART0) on 52840DK to my gateway directly for UART communication without code change?

 

Eric

 

Parents
  • Yes. P0.06 and P0.08 on the DK is wired via the programming chip (the Segger Chip on the DK) which translates to USB. But the signal is also running out through the pins on the DK without modifications. 

  • Hi Edvin,

    Thanks for your quick response, After test 52840 DK can receive message from my gateway over P0.08

    I can see  netkey and appkey message in segger debug, so receive message is OK 

    But P0.06 can't transfer message out, I got nothing from this pin

    So PyACI read nothing before timeout

    What is the problem and how to fix this issue?

  • Hello,

    I suspect that this is because the serial example is using HWFC (HardWare Flow Control).

    In the serial example, this is set in serial_uart.c, in the serial_uart_init() function, on line 87:

    NRF_UART0->CONFIG  = (HWFC ? UART_CONFIG_HWFC_Enabled : UART_CONFIG_HWFC_Disabled) << UART_CONFIG_HWFC_Pos;

    HWFC is defined in pca10056.h. Try to change it to false, and see if it works then. Alternatively, try to add the wiring for the flow control (pin P0.05 and P0.07) to the RPi, and also enable flow control on the RPi's UART. 

    Best regards,

    Edvin

Reply
  • Hello,

    I suspect that this is because the serial example is using HWFC (HardWare Flow Control).

    In the serial example, this is set in serial_uart.c, in the serial_uart_init() function, on line 87:

    NRF_UART0->CONFIG  = (HWFC ? UART_CONFIG_HWFC_Enabled : UART_CONFIG_HWFC_Disabled) << UART_CONFIG_HWFC_Pos;

    HWFC is defined in pca10056.h. Try to change it to false, and see if it works then. Alternatively, try to add the wiring for the flow control (pin P0.05 and P0.07) to the RPi, and also enable flow control on the RPi's UART. 

    Best regards,

    Edvin

Children
Related