Other Parts Discussed in Thread: CC2640R2F
将串口写设置成写回调模式,回调函数不进行任何操作。连续使用两个UART_write() ,只有1个被打印,系统貌似已经崩溃。
设置为阻塞模式,可以实现连续2个串口写操作。
查看uart.h,串口写是可以设置成回调模式的。难道连续两个UART_write() ,间隔时间太短,系统反应不过来。
In #UART_MODE_CALLBACK, %UART_write() does not block task execution.
* Instead, a callback function specified by UART_Params::writeCallback is
* called when the transfer is finished. The buffer passed to UART_write()
* in #UART_MODE_CALLBACK is not copied. The buffer must remain coherent
* until all the characters have been sent (ie until the tx callback has
* been called with a byte count equal to that passed to UART_write()).
* The callback function can occur in the caller's task context or in a HWI or
* SWI context, depending on the device implementation.
但是相同的程序是可以在cc2640r2f上实现。cc2640r2f的sdk是simplelink_cc2640r2_sdk_1_40_00_45;CC2642R的SDK是simplelink_cc13x2_26x2_sdk_4_30_00_54