This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BL654 UART question

Looking for advice on reading data from the BL654 UART RX pin which is getting a text data stream from an STM32 micro. 

I tried the "peripheral_uart" sample app in Segger Studio but it crashes a lot and sometimes I see UART events but have not seen any actual data yet.

Should I use UART IRQ API?  Or UART FIFO API? Should I be using the Nordic UART system CONFIG_BT_NUS like the peripheral_uart example?

I have verified data is working using a terminal to read the serial port.  I have verified the pin assignments and baud rate for the zephyr board DTS file.

Thanks.

Parents
  • Hi,

    Could you share logs of what happens when it crashes?

    What type of custom board is it ? Are you sure that you have correct overlay/board file?

    Regards,
    Jonathan

  • *** Booting Zephyr OS build v2.6.0-rc1-ncs1  ***
    [00:00:02.292,755] <inf> peripheral_uart: UART_RX_BUF_REQUEST
    [00:00:02.298,583] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:02.298,583] <inf> fs_nvs: alloc wra: 7, f90
    [00:00:02.298,583] <inf> fs_nvs: data wra: 7, d8
    [00:00:02.298,706] <inf> sdc_hci_driver: SoftDevice Controller build revision: 
                                             58 5d 8b 31 54 67 00 e9  b8 4a a7 df a9 9c e4 1c |X].1Tg.. .J......
                                             b3 0b ce 74                                      |...t             
    [00:00:02.302,459] <inf> bt_hci_core: No ID address. App must call settings_load()
    [00:00:02.302,459] <inf> peripheral_uart: Bluetooth initialized
    [00:00:02.314,849] <inf> peripheral_uart: Starting Nordic UART service example
    
    [00:00:02.314,880] <inf> peripheral_uart: ble_write_thread after ble_init_ok
    [00:00:18.957,458] <inf> peripheral_uart: UART_RX_BUF_RELEASED
    [00:00:18.957,458] <inf> peripheral_uart: UART_RX_BUF_REQUEST

    Above is the log.  It crashes with at "z_arm_usage_fault".  

    The custom board is a BL654 and STM32 reading data from temperature and gyroscope sensors.

    Just prototype stage.  I copied the "bl654_dvk" board DTS file and modified for our custom board.

    Some of the DTS fiie:

    chosen {
    zephyr,console = &uart0;
    zephyr,shell-uart = &uart0;
    zephyr,uart-mcumgr = &uart0;
    zephyr,bt-mon-uart = &uart0;
    zephyr,bt-c2h-uart = &uart0;
    zephyr,sram = &sram0;
    zephyr,flash = &flash0;
    zephyr,code-partition = &slot0_partition;
    };

    &uart0 {
    compatible = "nordic,nrf-uarte";
    current-speed = <115200>;
    status = "okay";
    tx-pin = <6>;
    rx-pin = <8>;
    rts-pin = <5>;
    cts-pin = <7>;
    };
  • Hi,

    peripheral_uart example should suffice, and it looks correct to my understanding of how you have set it up. So i am curious how the STM32 micro is configured, does it have flow controlled? how is it connected? Do you have schematics of how they interface?

    I don's see anything of concern in the setup so it leads me to think that there is something with the interface to the STM32 or how it is configured. 

    Regards,
    Jonathan

Reply
  • Hi,

    peripheral_uart example should suffice, and it looks correct to my understanding of how you have set it up. So i am curious how the STM32 micro is configured, does it have flow controlled? how is it connected? Do you have schematics of how they interface?

    I don's see anything of concern in the setup so it leads me to think that there is something with the interface to the STM32 or how it is configured. 

    Regards,
    Jonathan

Children
Related