Develop fw 708 2sfk50 40msTS - #444
Conversation
changtengfei
left a comment
There was a problem hiding this comment.
I left comments in the PR, please revise them.
|
|
||
| port_INLINE void activity_ti2(void) { | ||
|
|
||
| debugpins_frame_toggle(); |
There was a problem hiding this comment.
shouldn't toggle this pin here.
| ieee154e_vars.radioOnThisSlot=TRUE; | ||
| // change state | ||
| changeState(S_TXDATAREADY); | ||
| debugpins_frame_toggle(); |
| // 5,6,12,7,15,4,14,11,8,0,1,2,13,3,9,10 | ||
| //}; | ||
|
|
||
| static const uint8_t chTemplate_default[] = { |
There was a problem hiding this comment.
This channelhopping sequence should move to radio_24ghz/radio_subghz.c file
| #define NUM_CHANNELS 16 // 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 NUM_CHANNELS 3 // number of channels to channel hop on |
There was a problem hiding this comment.
num of channels should move to radio part as well
| #define DEFAULT_CH_SPACING 1200 // default channel spacing for subghz | ||
| #define DEFAULT_FREQUENCY_CENTER 863625 // defualt freque | ||
| #define NUM_CHANNELS 3 // number of channels to channel hop on | ||
| #define DEFAULT_CH_SPACING 200 // default channel spacing for subghz |
There was a problem hiding this comment.
this variable could be change if using different phy layers for subghz
| wdAckDuration = 80, // 2400us (measured 1000us) | ||
| #else | ||
| wdAckDuration = 98, // 3000us (measured 1000us) | ||
| wdAckDuration = 260, // 5400us using 50 kbps |
There was a problem hiding this comment.
This timing variable and above are related to the PHY layer used. So they are no longer belong to IEEE802.15.4E.h file. Define those variables in radio.h files, those variables will be set according which PHY layers are used.
By fixing the length of packet to transmit:
- For wdDataDuration wdAckDuration, delayTx, delayRx timing variables, they are related to the sending rate of each PHY layer.
- For other timing but slotDuration, they are related the speed to access radio chip
- For slotduration, it's determined both sending rate and the speed to access radio chip. So decide it at last.
| The superframe reappears over time and can be arbitrarily long. | ||
| */ | ||
| #define SLOTFRAME_LENGTH 101 //should be 101 | ||
| #define SLOTFRAME_LENGTH 31 //should be 101 |
| @@ -9,9 +9,9 @@ | |||
| <debug>1</debug> | |||
| <settings> | |||
| <name>C-STAT</name> | |||
| <archiveVersion>260</archiveVersion> | |||
| <archiveVersion>261</archiveVersion> | |||
There was a problem hiding this comment.
ewt file is not needed to be committed, please delete it from repository.
| // } | ||
|
|
||
| msg->l2_radioType = 0; | ||
| msg->l2_radioType = 1; |
There was a problem hiding this comment.
This is a hack for debugging purpose, you can do this for now., It's better to think what the right way to determine which radioType to use.
| #endif | ||
| #define PORT_delayRx 0 // 0us (can not measure) | ||
| // radio watchdog | ||
| #else // 40 ms |
There was a problem hiding this comment.
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.
radiotype defines PHYs whereas modem either sub-ghz or 2.4 ghz.
changtengfei
left a comment
There was a problem hiding this comment.
Please don't add new changes after the review. I left some comments, please just fix them, no more new changes added.
| #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.
The delayTx , delayRx are defined in radio_2d4ghz / radio_subghz files
| MODEM_2D4GHZ = 0, | ||
| MODEM_SUBGHZ = 1, | ||
| FREQBAND_ANY = 2 | ||
| } modem_t; |
There was a problem hiding this comment.
why create a modem type here? what the difference betwen this and the radioType
| 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.
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
| //=========================== public ========================================== | ||
| static void radio_subghz_read_isr(void); | ||
| static void radio_subghz_clear_isr(void); | ||
| void config_ofdm_1_800_subGHz(void); |
There was a problem hiding this comment.
function should start with name radio_subghz_
|
|
||
| radio_subghz_vars_t radio_subghz_vars; | ||
|
|
||
| phy_tsch_config_t phy_tsch_config_2fsk_50_subGHz; |
There was a problem hiding this comment.
are those variables used in this PR?
| phy_tsch_config_ofdm_1_800_subGHz.num_channels = 5; | ||
|
|
||
| } | ||
|
|
There was a problem hiding this comment.
Here is initialize the variables, when are they being used?
| static const registerSetting_t basic_settings_fsk_option1 []={ | ||
|
|
||
|
|
||
| static const registerSetting_t basic_settings_fsk_option1_subghz []={ |
| <option> | ||
| <name>OCLastSavedByProductVersion</name> | ||
| <state>8.11.1.13270</state> | ||
| <state>8.20.1.14181</state> |
There was a problem hiding this comment.
the project file changes shouldn't commit
| <option> | ||
| <name>OGLastSavedByProductVersion</name> | ||
| <state>8.11.1.13270</state> | ||
| <state>8.20.1.14181</state> |
There was a problem hiding this comment.
the project file changes like version shouldn't commit.
Creates the addr_16b_t and addr_64b_t, containing the addresses and the radioType item.
# Conflicts: # bsp/boards/openmote-b/board_info.h
Same device with X radios is seen as X neighbors.
use a different radioType for consecutive EBs. If radioType is 0 (2.4ghz), make sure it is used radioType 1 (OFDM).
Consider the radioType when updating the rank in the neighbor table.
AT86RF215 goes to TXPREP after receiving a frame. After receiving a frame, putting the radio back to listen.
radio keeps listening despite the RXFE ISR. No need to reload the RXFS and RXFE callbacks.
|
Can one of the admins verify this patch? |
this provides the timeslot timing constants for the 2-FSK 50 kbps PHY.
TS is 40 ms long.