Hi,
在这种需求方的项目,应用_uart_init( ) and app_flowconontrol_init( ) were called in app_sps_init( ). After power on DA14583, these 2 API were initialized immediately. At the same time, another MCU sent data to DA14583 via UART_SPS. I observed that 3 seconds later after power on DA14583, uart_rx_callback was invoked and data transmitted from device A could be received. Before those 3 seconds, nothing could be received. I wondered why uart_rx_callback wasn't invoked before those 3 seconds, UART_SPS should be initialized within a short period of time after power on. Hardware flow control was defined. Was SPS UART ready after 3 seconds when power up? Please kindly advise.
Device:


嗨jackiechau,
I would strongly suggest to move into the latest SDK of the DSPS application which is SDK 5. Regarding your post, i dont quite undertstand what the problem is or the use case that you are testing. Anyway i will just comment the fact that the uart_rx_callback is invoked after a 3 seconds amount of time. The uart_sps_read() function is initializing the callback uart_rx_callback in order for the device to read available data in the UART as soon as they are available, i dont see any time limitation in this even at the older SDK. If you are not able to see the uart_rx_callback triggered as soon as you hIt the keyboard then i suppose that something is wrong with h/w flow control configuration, and not related with the initialization of the UART. So please check the connection on your h/w and make sure that the terminal that you are using in order to send data to the 580's UART has the proper h/w flow control settings (CTS/RTS enabled), if the flow contron is not properly set on your terminal the device is going to sample data over the UART almost randomly, and i suppose that this is what you see.
Thanks MT_dialog