Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Maintenance operation of our GitLab server is scheduled for Wednesday, April 16, 2025, at 1PM.
Show more breadcrumbs
Worker.N
openairinterface5G
Commits
02148c79
Commit
02148c79
authored
8 years ago
by
knopp
Browse files
Options
Downloads
Patches
Plain Diff
refit for USRP (control of DSP cordic), no more trx_stop during synchronization
parent
afb60b85
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+40
-3
40 additions, 3 deletions
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/RT/USER/lte-ue.c
+1
-1
1 addition, 1 deletion
targets/RT/USER/lte-ue.c
with
41 additions
and
4 deletions
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+
40
−
3
View file @
02148c79
...
...
@@ -88,6 +88,12 @@ typedef struct
//! Sampling rate
double
sample_rate
;
//! rx RF frequency
double
rx_RFfreq
;
//! tx RF frequency
double
tx_RFfreq
;
//! time offset between transmiter timestamp and receiver timestamp;
double
tdiff
;
...
...
@@ -390,14 +396,45 @@ int trx_usrp_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
pthread_t
f_thread
;
printf
(
"Setting USRP TX Freq %f, RX Freq %f
\n
"
,
openair0_cfg
[
0
].
tx_freq
[
0
],
openair0_cfg
[
0
].
rx_freq
[
0
]);
double
rx_off
,
tx_off
;
if
(
fabs
(
s
->
rx_RFfreq
-
openair0_cfg
[
0
].
rx_freq
[
0
])
<
1e6
)
{
// induce use of digital tuning
rx_off
=
s
->
rx_RFfreq
-
openair0_cfg
[
0
].
rx_freq
[
0
];
}
else
{
// allow UHD to select the frequnecy
rx_off
=
0
;
s
->
rx_RFfreq
=
openair0_cfg
[
0
].
rx_freq
[
0
];
}
if
(
fabs
(
s
->
tx_RFfreq
-
openair0_cfg
[
0
].
tx_freq
[
0
])
<
1e6
)
{
// induce use of digital tuning
tx_off
=
s
->
tx_RFfreq
-
openair0_cfg
[
0
].
tx_freq
[
0
];
}
else
{
// allow UHD to select the frequnecy
tx_off
=
0
;
s
->
tx_RFfreq
=
openair0_cfg
[
0
].
tx_freq
[
0
];
}
printf
(
"Setting USRP TX Freq %f (%f), RX Freq %f (%f)
\n
"
,
s
->
tx_RFfreq
,
tx_off
,
s
->
rx_RFfreq
,
rx_off
);
// spawn a thread to handle the frequency change to not block the calling thread
if
(
dont_block
==
1
)
pthread_create
(
&
f_thread
,
NULL
,
freq_thread
,(
void
*
)
device
);
else
{
s
->
usrp
->
set_tx_freq
(
device
->
openair0_cfg
[
0
].
tx_freq
[
0
]);
s
->
usrp
->
set_rx_freq
(
device
->
openair0_cfg
[
0
].
rx_freq
[
0
]);
uhd
::
tune_request_t
treq_rx
(
s
->
rx_RFfreq
+
rx_off
);
treq_rx
.
rf_freq_policy
=
uhd
::
tune_request_t
::
POLICY_MANUAL
;
treq_rx
.
rf_freq
=
s
->
rx_RFfreq
;
s
->
usrp
->
set_rx_freq
(
treq_rx
);
uhd
::
tune_request_t
treq_tx
(
s
->
tx_RFfreq
+
tx_off
);
treq_tx
.
rf_freq_policy
=
uhd
::
tune_request_t
::
POLICY_MANUAL
;
treq_tx
.
rf_freq
=
s
->
tx_RFfreq
;
s
->
usrp
->
set_tx_freq
(
treq_tx
);
}
return
(
0
);
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
+
1
−
1
View file @
02148c79
...
...
@@ -489,7 +489,7 @@ static void *UE_thread_synch(void *arg)
//UE->rfdevice.trx_stop_func(&UE->rfdevice);
// sleep(1);
//
init_frame_parms(&UE->frame_parms,1);
init_frame_parms
(
&
UE
->
frame_parms
,
1
);
// if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) {
// LOG_E(HW,"Could not start the device\n");
// oai_exit=1;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment