diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2012-10-19 23:07:39 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2012-11-14 20:18:22 +0100 |
commit | 08bc45147bb58700236c4d455080cdeea9cc27a8 (patch) | |
tree | a36d1bcf740e924528e6b57d1184641f9d3beb84 /src/target/firmware/layer1/prim_rach.c | |
parent | ee18c7b84241b67827c52f166d62cb187532a268 (diff) |
target: Add support for IQ swap when required
Operation in GSM850 band requires IQ swap because of the offset PLL
used in the TRF causing spectrum reversal.
Thanks to Dieter Spaar for noticing the issue and the original patch
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/target/firmware/layer1/prim_rach.c')
-rw-r--r-- | src/target/firmware/layer1/prim_rach.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/target/firmware/layer1/prim_rach.c b/src/target/firmware/layer1/prim_rach.c index 27e89abb..08353efb 100644 --- a/src/target/firmware/layer1/prim_rach.c +++ b/src/target/firmware/layer1/prim_rach.c @@ -60,6 +60,7 @@ static int l1s_tx_rach_cmd(__unused uint8_t p1, __unused uint8_t p2, __unused ui { int i; uint16_t *info_ptr; + uint16_t arfcn; uint8_t data[2]; putchart('T'); @@ -72,9 +73,11 @@ static int l1s_tx_rach_cmd(__unused uint8_t p1, __unused uint8_t p2, __unused ui info_ptr = &dsp_api.ndb->d_rach; info_ptr[0] = ((uint16_t)(data[0])) | ((uint16_t)(data[1])<<8); - dsp_api.db_w->d_task_ra = RACH_DSP_TASK; + arfcn = l1s.serving_cell.arfcn; - l1s_tx_win_ctrl(l1s.serving_cell.arfcn | ARFCN_UPLINK, L1_TXWIN_AB, 0, 3); + dsp_api.db_w->d_task_ra = dsp_task_iq_swap(RACH_DSP_TASK, arfcn, 1); + + l1s_tx_win_ctrl(arfcn | ARFCN_UPLINK, L1_TXWIN_AB, 0, 3); return 0; } |