-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop fw 708 2sfk50 40msTS #444
base: develop_FW-708
Are you sure you want to change the base?
Changes from all commits
fab04fd
40c3b58
27c95f2
624449b
79336db
ad8f24c
904fd34
edf69f9
8cfe8eb
51571fb
108e7f6
2568331
48a0581
9313be0
d4973c1
d28132a
074bf13
55795d4
d2f68d3
98ed0f0
f6466bd
db8a1cc
abb9737
d70cef5
58969b9
15cc4cb
bb2ef57
bca732e
685a029
d4837af
3ea9a0c
407c2eb
504d4eb
2706919
5fb0705
ee08839
1259f7b
459b811
ceb53fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,36 +59,40 @@ | |
|
||
//===== IEEE802154E timing | ||
|
||
//#define SLOTDURATION_10MS // by default, we use 10ms time slot | ||
// #define SLOTDURATION_10MS // by default, we use 10ms time slot | ||
|
||
#ifdef SLOTDURATION_10MS | ||
// time-slot related | ||
#define PORT_TsSlotDuration 328 // counter counts one extra count, see datasheet | ||
// execution speed related | ||
#define PORT_maxTxDataPrepare 10 // 305us (measured 82us) | ||
#define PORT_maxRxAckPrepare 10 // 305us (measured 83us) | ||
#define PORT_maxRxDataPrepare 4 // 122us (measured 22us) | ||
#define PORT_maxTxAckPrepare 10 // 122us (measured 94us) | ||
// radio speed related | ||
#ifdef L2_SECURITY_ACTIVE | ||
#define PORT_delayTx 14 // 366us (measured xxxus) | ||
#else | ||
#define PORT_delayTx 12 // 366us (measured xxxus) | ||
#endif | ||
#define PORT_delayRx 0 // 0us (can not measure) | ||
// radio watchdog | ||
#else | ||
// time-slot related | ||
#define PORT_TsSlotDuration 492 // counter counts one extra count, see datasheet | ||
// execution speed related | ||
#define PORT_maxTxDataPrepare 66 // 2014us (measured 746us) | ||
#define PORT_maxRxAckPrepare 30 // 305us (measured 83us) | ||
#define PORT_maxRxDataPrepare 33 // 1007us (measured 84us) | ||
#define PORT_maxTxAckPrepare 32 // 305us (measured 219us) | ||
// radio speed related | ||
#define PORT_delayTx 42 // 214us (measured 219us) | ||
#define PORT_delayRx 0 // 0us (can not measure) | ||
// radio watchdog | ||
// time-slot related | ||
#define PORT_TsSlotDuration 328 // counter counts one extra count, see datasheet | ||
// execution speed related | ||
#define PORT_maxTxDataPrepare 10 // 305us (measured 82us) | ||
#define PORT_maxRxAckPrepare 10 // 305us (measured 83us) | ||
#define PORT_maxRxDataPrepare 4 // 122us (measured 22us) | ||
#define PORT_maxTxAckPrepare 10 // 122us (measured 94us) | ||
// radio speed related | ||
#ifdef L2_SECURITY_ACTIVE | ||
#define PORT_delayTx 14 // 366us (measured xxxus) | ||
#else | ||
#define PORT_delayTx 12 // 366us (measured xxxus) | ||
#endif | ||
#define PORT_delayRx 0 // 0us (can not measure) | ||
// radio watchdog | ||
#else // 40 ms | ||
// time-slot related | ||
#define PORT_TsSlotDuration 1310 // counter counts one extra count, see datasheet | ||
// execution speed related | ||
#define PORT_maxTxDataPrepare 60 // 2014us (measured 746us) 40 | ||
#define PORT_maxRxAckPrepare 30 // 305us (measured 83us) | ||
#define PORT_maxRxDataPrepare 30 // 1007us (measured 84us) | ||
#define PORT_maxTxAckPrepare 40 // 305us (measured 219us) | ||
// radio speed related | ||
#define delayTx_2FSK_50 67 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The delayTx , delayRx are defined in radio_2d4ghz / radio_subghz files |
||
#define delayTx_OFDM1 40 | ||
|
||
#define PORT_wdAckDuration 260 | ||
#define PORT_wdRadioTx 140 // for 2FSK 50 kbps 140 | ||
#define PORT_wdDataDuration 754 // for 2FSK 50 kbps | ||
// radio watchdog | ||
#endif | ||
|
||
//===== adaptive_sync accuracy | ||
|
@@ -106,17 +110,25 @@ | |
|
||
|
||
// number of radios in this board. | ||
#define MAX_NUM_RADIOS 2 | ||
|
||
#define MAX_NUM_MODEM 2 // sub-GHz and 2.4 GHz interfaces or modem | ||
#define MAX_NUM_RADIOS 3 // amount of active PHYs. 3 | ||
//#define DAGROOT | ||
|
||
|
||
//#define wdAckDuration 260 // 5400us using 50 kbps | ||
#define NUM_CHANNELS 3 // number of channels to channel hop on | ||
#define DEFAULT_CH_SPACING 1200 // default channel spacing for subghz | ||
#define DEFAULT_FREQUENCY_CENTER 863625 // defualt freque | ||
#define delayTx_SUBGHZ delayTx_OFDM1 //delayTx_2FSK_50 // | ||
#define delayRx_SUBGHZ 0 | ||
#define NUM_CHANNELS_SUBGHZ 3 | ||
|
||
//=========================== typedef ======================================== | ||
|
||
typedef enum { | ||
RADIOTPYE_2D4GHZ = 0, | ||
RADIOTPYE_SUBGHZ = 1, | ||
RADIOTPYE_ANY = 2 | ||
} radioType_t; | ||
MODEM_2D4GHZ = 0, | ||
MODEM_SUBGHZ = 1 | ||
} modem_t; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why create a modem type here? what the difference betwen this and the radioType |
||
|
||
//=========================== variables ======================================= | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,8 +70,7 @@ void radio_2d4ghz_setFunctions(radio_functions_t* funcs){ | |
funcs->radio_rfOn_cb = radio_2d4ghz_rfOn; | ||
funcs->radio_rfOff_cb = radio_2d4ghz_rfOff; | ||
funcs->radio_setFrequency_cb = radio_2d4ghz_setFrequency; | ||
funcs->radio_change_modulation_cb = radio_2d4ghz_change_modulation; | ||
funcs->radio_change_size_cb = radio_2d4ghz_change_size; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if this callback function is not used, you need remove it from the openradio.h file as well. Also the radio_2d4ghz_change_size function should be removed |
||
funcs->radio_load_phy_cb = radio_2d4ghz_load_phy; | ||
// reset | ||
funcs->radio_reset_cb = radio_2d4ghz_reset; | ||
// TX | ||
|
@@ -89,6 +88,11 @@ void radio_2d4ghz_setFunctions(radio_functions_t* funcs){ | |
funcs->radio_calculateFrequency_cb = radio_2d4ghz_calculateFrequency; | ||
funcs->radio_getDelayTx_cb = radio_2d4ghz_getDelayTx; | ||
funcs->radio_getDelayRx_cb = radio_2d4ghz_getDelayRx; | ||
funcs->radio_getChInitOffset_cb = radio_2d4ghz_getChInitOffset; | ||
funcs->radio_getCh_spacing_cb = radio_2d4ghz_getCh_spacing_cb; | ||
funcs->radio_getNumOfChannels_cb = radio_2d4ghz_getNumOfChannels_cb; | ||
funcs->radio_getCenterFreq_cb = radio_2d4ghz_getCenterFreq_cb; | ||
funcs->radio_getRadioStatus_cb = radio_2d4ghz_getRadioStatus_cb; | ||
} | ||
|
||
void radio_2d4ghz_init() { | ||
|
@@ -591,8 +595,14 @@ uint8_t radio_2d4ghz_calculateFrequency(uint8_t channelOffset, uint8_t asnOffset | |
|
||
// not used by 2.4ghz radio | ||
void radio_2d4ghz_powerOn(void){} | ||
void radio_2d4ghz_change_modulation(registerSetting_t * mod){} | ||
//void radio_2d4ghz_load_phy(registerSetting_t * mod, uint8_t size){} | ||
void radio_2d4ghz_load_phy(uint8_t phy_index){} | ||
void radio_2d4ghz_change_size(uint16_t* size){} | ||
void radio_2d4ghz_loadPacket_prepare(uint8_t* packet, uint8_t len){} | ||
void radio_2d4ghz_rxPacket_prepare(void){} | ||
void radio_2d4ghz_rxEnable_scum(void){} | ||
uint8_t radio_2d4ghz_getChInitOffset(void){} | ||
uint16_t radio_2d4ghz_getNumOfChannels_cb(void){} | ||
uint16_t radio_2d4ghz_getCh_spacing_cb(void){} | ||
uint32_t radio_2d4ghz_getCenterFreq_cb(void){} | ||
uint8_t radio_2d4ghz_getRadioStatus_cb(void){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timing below depends on which radio is used by openmote-b, those timing should be moved to radio.h files can call dynamically.
I recommend to use a fixed timing for FSK modulation, and use the timing variable for 2.4GHz and OQPSK 800kb/s as well. Only delayTx timing need to be adjust to each three PHY layers. With this, the timing part would be much easier.