Commit 77491ec5 authored by Florian Kaltenberger (Italie)'s avatar Florian Kaltenberger (Italie) Committed by Florian Kaltenberger

adding 46.08MHz sampling to USRP B210 (to use e.g. with 40MHz 5G-NR)

parent 1ce0700e
...@@ -1076,10 +1076,18 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { ...@@ -1076,10 +1076,18 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
cfg->rx_bw = 40e6; cfg->rx_bw = 40e6;
} }
} else if(N_RB == 106) { } else if(N_RB == 106) {
if (fp->threequarter_fs) {
cfg->sample_rate=46.08e6;
cfg->samples_per_frame = 460800;
cfg->tx_bw = 20e6;
cfg->rx_bw = 20e6;
}
else {
cfg->sample_rate=61.44e6; cfg->sample_rate=61.44e6;
cfg->samples_per_frame = 614400; cfg->samples_per_frame = 614400;
cfg->tx_bw = 20e6; cfg->tx_bw = 20e6;
cfg->rx_bw = 20e6; cfg->rx_bw = 20e6;
}
} else { } else {
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu); AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
} }
......
...@@ -870,7 +870,7 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_ ...@@ -870,7 +870,7 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_
default: default:
LOG_E(PHY,"unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate); LOG_E(PHY,"unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate);
exit(-1); //exit(-1);
break; break;
} }
} }
...@@ -1210,6 +1210,14 @@ extern "C" { ...@@ -1210,6 +1210,14 @@ extern "C" {
} }
switch ((int)openair0_cfg[0].sample_rate) { switch ((int)openair0_cfg[0].sample_rate) {
case 46080000:
s->usrp->set_master_clock_rate(46.08e6);
//openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 115;
openair0_cfg[0].tx_bw = 40e6;
openair0_cfg[0].rx_bw = 40e6;
break;
case 30720000: case 30720000:
s->usrp->set_master_clock_rate(30.72e6); s->usrp->set_master_clock_rate(30.72e6);
//openair0_cfg[0].samples_per_packet = 1024; //openair0_cfg[0].samples_per_packet = 1024;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment