Section: 5.2 Maintenance of Uplink Time Alignment
Content: The MAC entity has a configurable timer timeAlignmentTimer per TAG. The timeAlignmentTimer is used to control how long the MAC entity considers the Serving Cells belonging to the associated TAG to be uplink time aligned, as specified in TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [8]. The MAC entity shall: - when a Timing Advance Command MAC control element is received and if a NTA has been stored or maintained with the indicated TAG: - except when the received Timing Advance Command MAC control element is addressed with a PUR-RNTI: - apply the Timing Advance Command for the indicated TAG; - start or restart the timeAlignmentTimer associated with the indicated TAG. - when a Timing Advance Command is received in a Random Access Response message for a serving cell belonging to a TAG: - if the UE is configured with pur-Config (see TS 36.331[ Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Resource Control (RRC); Protocol specification ]  [8]) and if a NTA has been stored or maintained and no temporary NTA has been stored: - store current NTA as temporary NTA (see clause 5.4.7.2). - if the Random Access Preamble was not selected by the MAC entity: - apply the Timing Advance Command for this TAG; - start or restart the timeAlignmentTimer associated with this TAG. - else, if the timeAlignmentTimer associated with this TAG is not running: - apply the Timing Advance Command for this TAG; - start the timeAlignmentTimer associated with this TAG; - when the contention resolution is considered not successful as described in clause 5.1.5, stop timeAlignmentTimer associated with this TAG. - else: - ignore the received Timing Advance Command. - when the MAC entity is configured with rach-Skip or rach-SkipSCG: - apply timing advance value indicated by targetTA in rach-Skip or rach-SkipSCG for the pTAG; - start the timeAlignmentTimer associated with this TAG. - when a timeAlignmentTimer expires: - if the timeAlignmentTimer is associated with the pTAG: - flush all HARQ buffers for all serving cells; - notify RRC to release PUCCH/SPUCCH for all serving cells; - notify RRC to release SRS for all serving cells; - for NB-IoT, notify RRC to release all dedicated resources for SR; - clear any configured downlink assignments and uplink grants; - consider all running timeAlignmentTimers as expired; - else if the timeAlignmentTimer is associated with an sTAG, then for all Serving Cells belonging to this TAG: - flush all HARQ buffers; - notify RRC to release SRS; - notify RRC to release PUCCH/SPUCCH, if configured; - clear any configured downlink assignments and uplink grants. - upon indication from upper layers to start timeAlignmentTimer, if a NTA has been stored or maintained with the indicated TAG: - start or restart the timeAlignmentTimer associated with the indicated TAG. When the MAC entity stops uplink transmissions for an SCell due to the fact that the maximum uplink transmission timing difference (as described in clause 7.9.2 of TS 36.133[ Evolved Universal Terrestrial Radio Access (E-UTRA); Requirements for support of radio resource management ]  [9]) or the maximum uplink transmission timing difference the UE can handle between TAGs of any MAC entity of the UE is exceeded, the MAC entity considers the timeAlignmentTimer associated with the SCell as expired. The MAC entity shall not perform any uplink transmission on a Serving Cell, except the Random Access Preamble transmission and transmissions corresponding to a PUR-RNTI, when the timeAlignmentTimer associated with the TAG to which this Serving Cell belongs is not running. Furthermore, when the timeAlignmentTimer associated with the pTAG is not running, the MAC entity shall not perform any uplink transmission on any Serving Cell except the Random Access Preamble transmission on the SpCell. The MAC entity shall not perform any sidelink transmission which is performed based on UL timing of the corresponding serving cell and any associated SCI transmissions when the corresponding timeAlignmentTimer is not running. NOTE: A MAC entity stores or maintains NTA upon expiry of associated timeAlignmentTimer, where NTA is defined in TS 36.211[ Evolved Universal Terrestrial Radio Access (E-UTRA); Physical channels and modulation ]  [7]. The MAC entity applies a received Timing Advance Command MAC control element and starts associated timeAlignmentTimer also when the timeAlignmentTimer is not running.