TI中文支持网
TI专业的中文技术问题搜集分享网站

cc1310 RX 接收状态的status解析定义哪里可以获得

CC1310中定义的接收状态如何解析,其定义在哪个文件呢?

应该是如下变量RF_cmdRxHS .status   //如何解析

rfc_CMD_HS_RX_t RF_cmdRxHS =
{
.commandNo = CMD_HS_RX,
.status = 0x0000,
.pNextOp = 0x00000000,
.startTime = 0x00000000,
.startTrigger.triggerType = 0x0,
.startTrigger.bEnaCmd = 0x0,
.startTrigger.triggerNo = 0x0,
.startTrigger.pastTrig = 0x0,
.condition.rule = 0x1,
.condition.nSkip = 0x0,
.pktConf.bFsOff = 0,
.pktConf.bUseCrc = 1,
.pktConf.bVarLen = 1,
.pktConf.bRepeatOk = 0,
.pktConf.bRepeatNok = 0,
.pktConf.addressMode = 0,
.rxConf.bAutoFlushCrcErr = 0,
.rxConf.bIncludeLen = 1,
.rxConf.bIncludeCrc = 0,
.rxConf.bAppendStatus = 0,
.rxConf.bAppendTimestamp = 0,
.maxPktLen = 0,
.address0 = 0,
.address1 = 0,
.__dummy0 = 0,
.endTrigger.triggerType = 1,
.endTrigger.bEnaCmd = 0,
.endTrigger.triggerNo = 0,
.endTrigger.pastTrig = 0,
.endTime = 0,
.pQueue = 0,
.pOutput = 0,
};

谢谢!

Kevin Qiu1:

在 rf_hs_cmd.h中

#define CMD_HS_RX0x3842
//! High-Speed Receive Command
struct __RFC_STRUCT rfc_CMD_HS_RX_s {uint16_t commandNo;//!<The command ID number 0x3842uint16_t status;//!< \brief An integer telling the status of the command. This value is//!<updated by the radio CPU during operation and may be read by the//!<system CPU at any time.rfc_radioOp_t *pNextOp;//!<Pointer to the next operation to run after this operation is doneratmr_t startTime;//!<Absolute or relative start time (depending on the value of <code>startTrigger</code>)

Viki Shi:

你说的是这个结构吧

struct __RFC_STRUCT rfc_CMD_HS_RX_s {uint16_t commandNo;//!<The command ID number 0x3842uint16_t status;//!< \brief An integer telling the status of the command. This value is//!<updated by the radio CPU during operation and may be read by the//!<system CPU at any time.rfc_radioOp_t *pNextOp;//!<Pointer to the next operation to run after this operation is doneratmr_t startTime;//!<Absolute or relative start time (depending on the value of <code>startTrigger</code>)struct {uint8_t triggerType:4;//!<The type of triggeruint8_t bEnaCmd:1;//!< \brief 0: No alternative trigger command<br>//!<1: CMD_TRIGGER can be used as an alternative triggeruint8_t triggerNo:2;//!<The trigger number of the CMD_TRIGGER command that triggers this actionuint8_t pastTrig:1;//!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>//!<1: A trigger in the past is triggered as soon as possible} startTrigger;//!<Identification of the trigger that starts the operationstruct {uint8_t rule:4;//!<Condition for running next command: Rule for how to proceeduint8_t nSkip:4;//!<Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...} condition;struct {uint8_t bFsOff:1;//!< \brief 0: Keep frequency synth on after command<br>//!<1: Turn frequency synth off after commanduint8_t bUseCrc:1;//!< \brief 0: Do not receive or check CRC<br>//!<1: Receive and check CRCuint8_t bVarLen:1;//!< \brief 0: Fixed length<br>//!<1: Receive length as first byteuint8_t bRepeatOk:1;//!< \brief 0: End operation after receiving a packet correctly<br>//!<1: Go back to sync search after receiving a packet correctlyuint8_t bRepeatNok:1;//!< \brief 0: End operation after receiving a packet with CRC error<br>//!<1: Go back to sync search after receiving a packet with CRC erroruint8_t addressMode:2;//!< \brief 0: No address check<br>//!<1: Accept <code>address0</code> and <code>address1</code><br>//!<2: Accept <code>address0</code>, <code>address1</code>, and 0x0000<br>//!<3: Accept <code>address0</code>, <code>address1</code>, 0x0000, and 0xFFFF} pktConf;struct {uint8_t bAutoFlushCrcErr:1;//!<If 1, automatically remove packets with CRC error from Rx queueuint8_t bIncludeLen:1;//!<If 1, include the received length field in the stored packet; otherwise discard ituint8_t bIncludeCrc:1;//!<If 1, include the received CRC field in the stored packet; otherwise 3scard ituint8_t bAppendStatus:1;//!<If 1, append a status word to the packet in the Rx queueuint8_t bAppendTimestamp:1;//!<If 1, append a timestamp to the packet in the Rx queue} rxConf;uint16_t maxPktLen;//!<Packet length for fixed length; maximum packet length for variable lengthuint16_t address0;//!<Addressuint16_t address1;//!<Address (set equal to <code>address0</code> to accept only one address)uint8_t __dummy0;struct {uint8_t triggerType:4;//!<The type of triggeruint8_t bEnaCmd:1;//!< \brief 0: No alternative trigger command<br>//!<1: CMD_TRIGGER can be used as an alternative triggeruint8_t triggerNo:2;//!<The trigger number of the CMD_TRIGGER command that triggers this actionuint8_t pastTrig:1;//!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>//!<1: A trigger in the past is triggered as soon as possible} endTrigger;//!<Trigger classifier for ending the operationratmr_t endTime;//!<Time used together with <code>endTrigger</code> for ending the operationdataQueue_t* pQueue;//!<Pointer to receive queuerfc_hsRxOutput_t *pOutput;//!<Pointer to output structure
} __RFC_STRUCT_ATTR;

lin jqi:

回复 Viki Shi:

感谢回复!
类型定义是有看到,那不同status的值代表什么含义有无定义呢?
比如CRC错之类

Kevin Qiu1:

回复 lin jqi:

后面注释中有An integer telling the status of the command. This value is updated by the radio CPU during operation and may be read by the system CPU at any time.

lin jqi:

回复 Kevin Qiu1:

是的,不同值代表什么意思呢?
是下面这组定义吗?
#define PROP_DONE_OK0x3400///< Operation ended normally
#define PROP_DONE_RXTIMEOUT0x3401///< Operation stopped after end trigger while waiting for sync
#define PROP_DONE_BREAK0x3402///< Rx stopped due to timeout in the middle of a packet
#define PROP_DONE_ENDED0x3403///< Operation stopped after end trigger during reception
#define PROP_DONE_STOPPED0x3404///< Operation stopped after stop command
#define PROP_DONE_ABORT0x3405///< Operation aborted by abort command
#define PROP_DONE_RXERR0x3406///< Operation ended after receiving packet with CRC error
#define PROP_DONE_IDLE0x3407///< Carrier sense operation ended because of idle channel
#define PROP_DONE_BUSY0x3408///< Carrier sense operation ended because of busy channel
#define PROP_DONE_IDLETIMEOUT0x3409///< Carrier sense operation ended because of timeout with csConf.timeoutRes = 1
#define PROP_DONE_BUSYTIMEOUT0x340A///< Carrier sense operation ended because of timeout with csConf.timeoutRes = 0

///@}
/// \name Operation finished with error
///@{
#define PROP_ERROR_PAR0x3800///< Illegal parameter
#define PROP_ERROR_RXBUF0x3801///< No available Rx buffer at the start of a packet
#define PROP_ERROR_RXFULL0x3802///< Out of Rx buffer during reception in a partial read buffer
#define PROP_ERROR_NO_SETUP0x3803///< Radio was not set up in proprietary mode
#define PROP_ERROR_NO_FS0x3804///< Synth was not programmed when running Rx or Tx
#define PROP_ERROR_RXOVF0x3805///< Rx overflow observed during operation
#define PROP_ERROR_TXUNF0x3806///< Tx underflow observed during operation

Viki Shi:

/// \name Radio operation status
///@{
/// \name Operation finished normally
///@{
#define HS_DONE_OK0x3440///< Operation ended normally
#define HS_DONE_RXTIMEOUT0x3441///< Operation stopped after end trigger while waiting for sync
#define HS_DONE_RXERR0x3442///< Operation ended after CRC error
#define HS_DONE_TXBUF0x3443///< Tx queue was empty at start of operation
#define HS_DONE_ENDED0x3444///< Operation stopped after end trigger during reception
#define HS_DONE_STOPPED0x3445///< Operation stopped after stop command
#define HS_DONE_ABORT0x3446///< Operation aborted by abort command
///@}
/// \name Operation finished with error
///@{
#define HS_ERROR_PAR0x3840///< Illegal parameter
#define HS_ERROR_RXBUF0x3841///< No available Rx buffer at the start of a packet
#define HS_ERROR_NO_SETUP0x3842///< Radio was not set up in a compatible mode
#define HS_ERROR_NO_FS0x3843///< Synth was not programmed when running Rx or Tx
#define HS_ERROR_RXOVF0x3844///< Rx overflow observed during operation
#define HS_ERROR_TXUNF0x3845///< Tx underflow observed during operation
///@}
///@}

lin jqi:

回复 Viki Shi:

感谢!
如果是超时判断是不是要自己写,没有在status里判断?

Viki Shi:

回复 lin jqi:

有RX超时——HS_DONE_RXTIMEOUT,如果你有其他超时判断需求,那要自己加了

lin jqi:

回复 Viki Shi:

是在哪里配置了超时时间的长短呢?还是有默认值,是多少呢?

赞(0)
未经允许不得转载:TI中文支持网 » cc1310 RX 接收状态的status解析定义哪里可以获得
分享到: 更多 (0)