Other Parts Discussed in Thread: CC1310
Hi,
I am trying to obtain precise timing for when radio transmission starts. The TRM for the cc1310 says in Section 23.3.2.8: "The signal RATGPO0 goes high when transmission of a packet is initiated and low when transmission is done".
First, I use the DBELL:SYSGPOCTL register to output RATGPO0 on RFC_GPO1
HWREG(RFC_DBELL_BASE + RFC_DBELL_O_SYSGPOCTL) &= ~(0xF << 4);
HWREG(RFC_DBELL_BASE + RFC_DBELL_O_SYSGPOCTL) |= RFC_DBELL_SYSGPOCTL_GPOCTL1_RATGPO0;
Then I call the start_rat_capture
function to capture a rising edge on "RfcGpi1".
static volatile uint32_t rat_timestamp;
static bool start_rat_capture() {
RF_RatConfigCapture config = {
.callback = +[](RF_Handle h, RF_RatHandle rh, RF_EventMask e, uint32_t compare_capture_time) {
rat_timestamp = compare_capture_time;
},
.channel = RF_RatChannelAny,
.source = RF_RatCaptureSourceRfcGpi1,
.captureMode = RF_RatCaptureModeRising,
.repeat = RF_RatCaptureRepeat,
};
RF_RatHandle rat_handle = RF_ratCapture(rf_handle, &config, NULL);
return rat_handle != RF_ALLOC_ERROR;
}
The RF_ratCapture
function returns 0, which I believe means it successfully configured it on RAT channel 0.
Is this all that is necessary? The callback never fires even though messages are transmitted and I'm unsure what else I need to configure.
Would appreciate any insight on why this is not working.
Thanks,
Alex