This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-CC2652RB: Debug 时,重新运行出现错误 Error_policyMin()

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: CC2652RB

Hi Ti,


我的代码是基于 simplelink_cc13x2_26x2_sdk_4_30_00_54 的 spimaster_CC2652RB_LAUNCHXL_tirtos_ccs 例程修改而来;

MCU 是 CC2652RB

我点 RUN->Debug 后,等编译下载完成后点 Resume 程序可以正常运行;

但是当我点 Suspend --> Restart --> Resume 后,程序总是卡在下图中的循环中。(我试了很多遍)



  • 这是内核引起的错误,参考这里提到的方法进行检查

  • 你好


    UART2_readTimeout(uartHandle, tmpBuf, RSBUS_PACK_MAX_LENGTH, &recvCnt, UART_READ_TIMEOUT);

    我已经试过很多遍了,只要加上这句,restart 后就会进入 Error_policyMin() ,注释掉就可以正常 restart。

    我的 UART2 配置如下:


    请问这里有可能有什么问题吗?(波特率我也试了 115200,结果也会进入Error_policyMin()


  • 但从这一句看没什么问题,可能和其他产生冲突了,你使用上面链接提到的ROV看一下

    § UART2_readTimeout()
    int_fast16_t UART2_readTimeout	(	UART2_Handle 	handle,
    void * 	buffer,
    size_t 	size,
    size_t * 	bytesRead,
    uint32_t 	timeout 
    Function that reads data from a UART, with a specified timeout for blocking mode.
    UART2_readTimeout() reads data from a UART controller. The destination is specified by buffer and the number of bytes to read is given by size.
    In UART2_Mode_BLOCKING with UART2_ReadReturnMode_FULL, UART2_readTimeout() blocks task execution until all the data in buffer has been read, or the specified timeout has elapsed. In UART2_Mode_BLOCKING with UART2_ReadReturnMode_PARTIAL, UART2_readTimeout() returns before all the data has been read, if some data has been received, but reception has been inactive sufficiently long for a hardware read timeout to occur (e.g., for a 32-bit period). UART2_readTimeout() will also return if the specified timeout parameter has elapsed. Note that the timeout parameter is different from the hardware read timeout.
    In UART2_Mode_CALLBACK, UART2_readTimeout() does not block task execution. Instead, a callback function specified by UART2_Params::readCallback is called when the transfer is finished (UART2_ReadReturnMode_FULL), or reception has become inactive (UART2_ReadReturnMode_PARTIAL). The callback function can occur in the caller's context or in HWI context, depending on the device-specific implementation. An unfinished asynchronous read operation must always be cancelled using UART2_readCancel() before calling UART2_close(). In UART2_Mode_CALLBACK, the timeout parameter passed to UART2_readTimeout(), is ignored.
    In UART2_Mode_NONBLOCKING, UART2_readTimeout() will return the minimum of size and the number of data in the RX circular buffer. In this mode, the application should check the number of bytes read in the bytesRead parameter. A status of success will be returned if one or more bytes is available, unless an error occured. In UART2_Mode_NONBLOCKING, the timeout parameter passed to UART2_readTimeout(), is ignored.
    It is ok to call UART2_readTimeout() from its own callback function when in UART2_Mode_CALLBACK.
    [in]	handle	A UART2_Handle returned by UART2_open()
    [in]	buffer	A pointer to an empty buffer to which received data should be read
    [in]	size	The number of bytes to be read into buffer
    [out]	bytesRead	If non-NULL, the location to store the number of bytes actually read into the buffer. If NULL, this parameter will be ignored. In callback mode, NULL could be passed in for this parameter, since the callback function will be passed the number of bytes read. Similarly, in blocking mode with infinite timeout, NULL can be passed. However, status should be checked in case the number of bytes requested was not received due to errors. In non-blocking mode, it is not recommended to pass NULL for this parameter, as it would be impossible to determine the number of bytes actually read.
    [in]	timeout	The number of system clock ticks to wait until all data is received. If not all requested data was received within the timeout period, an error of UART2_STATUS_ETIMEOUT will be returned. This parameter is only applicable to UART2_Mode_BLOCKING.
    Returns a status indicating success or failure of the read.
    Return values
    UART2_STATUS_SUCCESS	The call was successful.
    UART2_STATUS_EINUSE	Another read from the UART is currently ongoing.
    UART2_STATUS_EAGAIN	In UART2_Mode_NONBLOCKING, no data is currently available.
    UART2_STATUS_ECANCELLED	In UART2_Mode_BLOCKING, the read was canceled by a call to UART2_readCancel() before any data could be received.
    UART2_STATUS_ETIMEOUT	The read operation timed out.