Section: 5.5.6.2 Initiation
Content: The UE shall: 1> if and only if upper layers indicate to start performing location measurements towards E-UTRA or NR or start subframe and slot timing detection towards E-UTRA, and the UE requires measurement gaps for these operations while measurement gaps are either not configured or not sufficient: 2> if preconfigured measurement gaps for positioning and posMG-Request are configured and the UE considers that at least one of the preconfigured measurement gaps for positioning is sufficient for the location measurement when activated: 3> trigger the lower layers to initiate the measurement gap activation request using UL MAC CE as specified in TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [3]; 2> else: 3> initiate the procedure to indicate start as specified in clause 5.5.6.3; NOTE 1: The UE verifies the measurement gap situation only upon receiving the indication from upper layers. If at this point in time sufficient gaps are available, the UE does not initiate the procedure. Unless it receives a new indication from upper layers, the UE is only allowed to further repeat the procedure in the same PCell once per frequency of the target RAT if the provided measurement gaps are insufficient. NOTE 1a: When indication is received from upper layers for performing location measurement and there is pre-configured measurement gap configured (not preconfigured measurement gap for positioning), the UE considers this preconfigured measurement gap to be not sufficient if the measurement gap is not considered to be always activated according to clause 9.1.7.2 of TS 38.133[ NR; Requirements for support of radio resource management ]  [14]. 1> if and only if upper layers indicate to stop performing location measurements towards E-UTRA or NR or stop subframe and slot timing detection towards E-UTRA: 2> if there is no activated preconfigured measurement gap for positioning: 3> if there is previously triggered UL MAC CE transmission for the measurement gap activation for positioning: 4> indicate to the lower layers to cancel the triggered UL MAC CE transmission for the measurement gap activation as specified in TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [3]; 2> else if there is activated preconfigured measurement gap for positioning: 3> trigger the lower layers to deactivate all the activated measurement gap(s) for positioning as specified in TS 38.321[ NR; Medium Access Control (MAC) protocol specification ]  [3]. 2> if there is configured measurement gap used for positioning and the measurement gap is not the activated preconfigured measurement gap for positioning: 3> initiate the procedure to indicate stop as specified in 5.5.6.3. NOTE 2: The UE may initiate the procedure to indicate stop even if it did not previously initiate the procedure to indicate start.