Hi,
I’m using DWM3000 with stm32f401ret6, I tried to add STS to my configuration and add the basic sts validation:
int goodSts = 0; /* Used for checking STS quality in received signal */
int16_t stsQual; /* This will contain STS quality index */
uint16_t stsStatus; /* Used to check for good STS status (no errors). */
int err = 0;
goodSts = dwt_readstsquality(&stsQual);
err = dwt_readstsstatus(&stsStatus, 0);
if(!(goodSts >= 0) && !(dwt_readstsstatus(&stsStatus, 0) == DWT_SUCCESS)){
dwt_setrxtimeout(0);
dwt_rxenable(DWT_START_RX_IMMEDIATE); //re-enable receiver again - no timeout
return;
}
My situation is that goodSts is returning almost always -76 and dwt_readstsstatus returning -1.
stsStatus have these values
68 - 1000100
76 - 1001100
64 - 1000000
Documentation
What can I do to improve the sts quality? I feel kind of lost.
Thanks in advance.
PS. im using the default keys on both devices.
static dwt_sts_cp_key_t cp_key = { 0x14EB220F, 0xF86050A8, 0xD1D336AA, 0x14148674 };
static dwt_sts_cp_iv_t cp_iv = { 0x1F9A3DE4, 0xD37EC3CA, 0xC44FA8FB, 0x362EEB34 };