CC1312可以实现中断发送数据吗?为什么我进了按键中断后发送数据失败,在中断里出不来了。
Kevin Qiu1:
中断可以看下例程C:\ti\simplelink_cc13x2_26x2_sdk_4_30_00_54\examples\rtos\CC1312R1_LAUNCHXL\drivers\pinInterrupt
可以先测试下
user6461198:
回复 Kevin Qiu1:
好的 谢谢
user6461198:
回复 Kevin Qiu1:
主要是我想在中断里完成数据的发送,现在只能在中断中完成初始化,发送不了数据,并且一直停留在中断里
Kevin Qiu1:
回复 user6461198:
单步运行看下具体卡在什么地方
user6461198:
回复 Kevin Qiu1:
卡在EasyLink_transmit(&txPacket);语句处,发送不出去
user6461198:
回复 Kevin Qiu1:
是不能在中断里发送吗
Kevin Qiu1:
回复 user6461198:
\brief Sends a Packet with blocking call. //! //! This function is a blocking call to send a packet. If the Tx is //! successfully scheduled then the function will block until the Tx is //! complete. //! //! \param txPacket The descriptor for the packet to be Tx'ed. //! //! \return ::EasyLink_Status // //***************************************************************************** extern EasyLink_Status EasyLink_transmit(EasyLink_TxPacket *txPacket);看下说明,应该是和中断冲突了,造成了阻塞
user6461198:
回复 Kevin Qiu1:
那我可以用无阻塞发送解决这个问题吗
user6461198:
回复 Kevin Qiu1:
或者有其他方法吗
Kevin Qiu1:
回复 user6461198:
可以先用EasyLink_Status EasyLink_transmitAsync试试,RTOS中使用中断影响比较大
//***************************************************************************** // //! \brief Sends a Packet with non blocking call. //! //! This function is a non blocking call to send a packet. If the Tx is //! successfully scheduled then the callback will be call once the Tx is //! complete. //! //! \param txPacket The descriptor for the packet to be Tx'ed. //! \param cbThe tx done function pointer. //! //! \return ::EasyLink_Status // //***************************************************************************** extern EasyLink_Status EasyLink_transmitAsync(EasyLink_TxPacket *txPacket,EasyLink_TxDoneCb cb);