Commit a675f5d8 authored by Thomas Schlichter's avatar Thomas Schlichter

fix message 1 frame number calculation on NR UE

UE initiates the RA procedure with sending message 1 via PRACH 150 frames after synchronizing with the gNB.
As the frame numbers wrap at 1024, we have to calculate the frame number for message 1 using modulo calculation.
parent 9d90eab6
...@@ -2077,7 +2077,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t ...@@ -2077,7 +2077,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_IN);
if (!prach_resources->init_msg1 && (frame_tx > ue->prach_resources[gNB_id]->sync_frame + 150)){ if (!prach_resources->init_msg1 && (frame_tx == (ue->prach_resources[gNB_id]->sync_frame + 150) % MAX_FRAME_NUMBER)){
ue->prach_cnt = 0; ue->prach_cnt = 0;
prach_resources->init_msg1 = 1; prach_resources->init_msg1 = 1;
} }
......
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