Section: 5.5a.3.2 Initiation
Content: While T330 is running and SDT procedure is not ongoing, the UE shall: 1> if measurement logging is suspended: 2> if during the last logging interval the IDC problems detected by the UE is resolved, resume measurement logging; 1> if not suspended, perform the logging in accordance with the following: 2> if the reportType is set to periodical in the VarLogMeasConfig: 3> if the UE is in any cell selection state (as specified in TS 38.304[ NR; User Equipment (UE) procedures in Idle mode and in RRC Inactive state ]  [20]): 4> perform the logging at regular time intervals, as defined by the loggingInterval in the VarLogMeasConfig; 3> if the UE is in camped normally state on an NR cell and if the RPLMN is included in plmn-IdentityList stored in VarLogMeasReport; or 3> if the UE is in camped normally state on an NR cell and if the registered SNPN is included in snpn-ConfigIDList stored in VarLogMeasReport: 4> if areaConfiguration is not included in VarLogMeasConfig; or 4> if the serving cell is part of the area indicated by areaConfig in areaConfiguration in VarLogMeasConfig; or 4> if the serving cell is part of the area indicated by cag-ConfigList in areaConfiguration in VarLogMeasConfig; or 4> if the serving cell is part of the area indicated by snpn-ConfigList in areaConfiguration in VarLogMeasConfig: 5> perform the logging at regular time intervals, as defined by the loggingInterval in the VarLogMeasConfig; 2> else if the reportType is set to eventTriggered, and eventType is set to outOfCoverage: 3> perform the logging at regular time intervals as defined by the loggingInterval in VarLogMeasConfig only when the UE is in any cell selection state; 3> upon transition from any cell selection state to camped normally state in NR: 4> if the RPLMN is included in plmn-IdentityList stored in VarLogMeasReport, or if the registered SNPN is included in snpn-ConfigIDList stored in VarLogMeasReport; and 4> if areaConfiguration is not included in VarLogMeasConfig or if the current camping cell is part of the area indicated by areaConfig of areaConfiguration in VarLogMeasConfig, or if the current camping cell is part of the area indicated by cag-ConfigList of areaConfiguration in VarLogMeasConfig, or if the current camping cell is part of the area indicated by snpn-ConfigList of areaConfiguration in VarLogMeasConfig: 5> perform the logging; 2> else if the reportType is set to eventTriggered and eventType is set to eventL1: 3> if the UE is in camped normally state on an NR cell and if the RPLMN is included in plmn-IdentityList stored in VarLogMeasReport; or 3> if the UE is in camped normally state on an NR cell and if the registered SNPN is included in snpn-ConfigIDList stored in VarLogMeasReport: 4> if areaConfiguration is not included in VarLogMeasConfig; or 4> if the serving cell is part of the area indicated by areaConfig in areaConfiguration in VarLogMeasConfig; or 4> if the current serving cell is part of the area indicated by cag-ConfigList of areaConfiguration in VarLogMeasConfig, or if the current camping cell is part of the area indicated by snpn-ConfigList of areaConfiguration in VarLogMeasConfig; 5> perform the logging at regular time intervals as defined by the loggingInterval in VarLogMeasConfig only when the conditions indicated by the eventL1 are met; 2> when performing the logging: 3> if InterFreqTargetInfo is configured and if the UE detected IDC problems on at least one of the frequencies included in InterFreqTargetInfo or any inter-RAT frequency during the last logging interval, or 3> if InterFreqTargetInfo is not configured and if the UE detected IDC problems during the last logging interval: 4> if measResultServingCell in the VarLogMeasReport is not empty: 5> include inDeviceCoexDetected; 5> suspend measurement logging from the next logging interval; 4> else: 5> suspend measurement logging; 3> set the relativeTimeStamp to indicate the elapsed time since the moment at which the logged measurement configuration was received; 3> if location information became available during the last logging interval, set the content of the locationInfo as in 5.3.3.7: 3> if the UE is in any cell selection state (as specified in TS 38.304[ NR; User Equipment (UE) procedures in Idle mode and in RRC Inactive state ]  [20]): 4> set anyCellSelectionDetected to indicate the detection of no suitable or no acceptable cell found; 4> if the reportType is set to eventTriggered in the VarLogMeasConfig; and 4> if the RPLMN at the time of entering the any cell selection state is included in plmn-IdentityList stored in VarLogMeasReport; and 4> if areaConfiguration is not included in VarLogMeasConfig or if the last suitable cell that the UE was camping on is part of the area indicated by areaConfig of areaConfiguration in VarLogMeasConfig, or if last suitable cell that the UE was camping on is part of the area indicated by cag-ConfigList of areaConfiguration in VarLogMeasConfig, or if last suitable cell that the UE was camping on is part of the area indicated by snpn-ConfigList of areaConfiguration in VarLogMeasConfig: 5> set the servCellIdentity to indicate global cell identity of the last suitable cell that the UE was camping on; 5> set the measResultServingCell to include the quantities of the last suitable cell the UE was camping on; 4> else if the reportType is set to periodical in the VarLogMeasConfig: 5> set the servCellIdentity to indicate global cell identity of the last logged cell that the UE was camping on; 5> set the measResultServingCell to include the quantities of the last logged cell the UE was camping on; 3> else: 4> set the servCellIdentity to indicate global cell identity of the cell the UE is camping on; Editor´s note: Including list of equivalent SNPN IDs in MDT report is FFS. 4> set the measResultServingCell to include the quantities of the cell the UE is camping on; 3> if available, set the measResultNeighCells, in order of decreasing ranking-criterion as used for cell re-selection, to include measurements of neighbouring cell that became available during the last logging interval and according to the following: 4> include measurement results for at most 6 neighbouring cells on the NR serving frequency and for at most 3 cells per NR neighbouring frequency and for the NR neighbouring frequencies in accordance with the following: 5> if interFreqTargetInfo is included in VarLogMeasConfig: 6> if earlyMeasIndication is included in VarLogMeasConfig; 7> include measurement results for NR neighbouring frequencies that are included in both interFreqTargetInfo and either in measIdleCarrierListNR (within the VarMeasIdleConfig) or SIB4; 6> else: 7> include measurement results for NR neighbouring frequencies that are included in both interFreqTargetInfo and SIB4; 5> else: 6> if earlyMeasIndication is included in VarLogMeasConfig; 7> include measurement results for NR neighbouring frequencies that are included in either measIdleCarrierListNR (within the VarMeasIdleConfig) or SIB4; 6> else: 7> include measurement results for NR neighbouring frequencies that are included in SIB4; 4> include measurement results for at most 3 neighbours per inter-RAT frequency in accordance with the following: 5> if earlyMeasIndication is included in VarLogMeasConfig: 6> include measurement results for inter-RAT neighbouring frequencies that are included in either measIdleCarrierListEUTRA (within the VarMeasIdleConfig) or SIB5; 5> else: 6> include measurement results for inter-RAT frequencies that are included in SIB5; 4> for each neighbour cell included, include the optional fields that are available; NOTE 1: The UE includes the latest results of the available measurements as used for cell reselection evaluation in RRC_IDLE or RRC_INACTIVE, which are performed in accordance with the performance requirements as specified in TS 38.133[ NR; Requirements for support of radio resource management ]  [14]. NOTE 2: For logging the measurements on frequencies (indicated in measIdleCarrierListNR/ measIdleCarrierListEUTRA) in the logged measurement, the qualityThreshold in measIdleConfig should not be applied, and how the UE logs the measurements on the frequencies is left to the UE implementation. 2> when the memory reserved for the logged measurement information becomes full, stop timer T330 and perform the same actions as performed upon expiry of T330, as specified in 5.5a.1.4.