srsue,rrc_nr: fix warning and error logs in SA mode

- provide PHY config state to configure MIB values (coreset0).
- set PRACH freq_offset to valid value to please config checker.

Addresses:
2022-04-19T12:42:38.726040 [PHY-SA ] [E] [    0] prach_cfg.freq_offset=0 is not compatible with LTE
2022-04-19T12:42:38.726040 [PHY-SA ] [I] [    0] PHY:   Set TA offset: n_ta_offset: 0, ta_usec: 0.0
2022-04-19T12:42:38.726141 [RRC-NR ] [W] PHY configuration completed without a clear state.
This commit is contained in:
Andre Puschmann 2022-04-19 15:26:12 +02:00
parent 2313365a41
commit da2ac3b2c1
3 changed files with 8 additions and 0 deletions

View File

@ -201,6 +201,7 @@ private:
// Stores the state of the PHY configuration setting
enum {
PHY_CFG_STATE_NONE = 0,
PHY_CFG_STATE_SA_MIB_CFG,
PHY_CFG_STATE_SA_SIB_CFG,
PHY_CFG_STATE_SA_FULL_CFG,
PHY_CFG_STATE_NSA_APPLY_SP_CELL,

View File

@ -2225,6 +2225,9 @@ void rrc_nr::set_phy_config_complete(bool status)
case PHY_CFG_STATE_NONE:
logger.warning("PHY configuration completed without a clear state.");
break;
case PHY_CFG_STATE_SA_MIB_CFG:
logger.info("PHY configuration with MIB parameters completed.");
break;
case PHY_CFG_STATE_SA_SIB_CFG:
logger.info("PHY configuration with SIB parameters completed.");
break;

View File

@ -474,7 +474,11 @@ rrc_nr::cell_selection_proc::handle_cell_search_result(const rrc_interface_phy_n
make_phy_search_space0_cfg(&phy_cfg.pdcch.search_space[0]);
phy_cfg.pdcch.search_space_present[0] = true;
// Set dummy offset to pass PRACH config check, real value is provided in SIB1
phy_cfg.prach.freq_offset = 1;
// Update PHY configuration
rrc_handle.phy_cfg_state = PHY_CFG_STATE_SA_MIB_CFG;
if (not rrc_handle.phy->set_config(phy_cfg)) {
Error("Setting PHY configuration");
return proc_outcome_t::error;