Center-aligned mode (up/down counting)ใน center-aligned mode, the counter นับจาก 0 ไปยัง the auto-reload value (ที่อยู่ภายในของ the TIMx_ARR register) – 1, สร้าง a counter overflow event, จากนั้นนับจาก the autoreload value ลงไปยัง 1 และสร้าง a counter underflow event. จากนั้นมันเริ่มใหม่การนับจาก 0.
Center-aligned mode ถูกทำให้ทำงานเมื่อ the CMS bits ใน TIMx_CR1 register ไม่เท่ากับ '00'. The Output compare interrupt flag ของ channels ที่กำหนดค่าใน output ถูกเซ็ตเมื่อ : the counter นับลง (Center aligned mode 1, CMS = "01"), the counter นับขึ้น (Center aligned mode 2, CMS = "10") the counter นับขึ้นและลง (Center aligned mode 3, CMS = "11").
ในโหมดนี้, the direction bit (DIR จาก TIMx_CR1 register) ไม่สามารถถูกเขียน. มันถูกอัปเดตโดย hardware และให้ทิศทางปัจจุบันของ the counter
The update event สามารถถูกสร้างที่แต่ละ counter overflow และที่แต่ละ counter underflow หรือโดยการเซ็ต the UG bit ใน the TIMx_EGR register (โดย software หรือโดยการใช้ the slave mode controller) ก็สร้าง an update event ได้อีกด้วย. ในกรณีนี้, the counter เริ่มใหม่การนับจาก 0, เช่นเดียวกันกับ the counter ของ the prescaler.
The UEV event สามารถถูกปิดการใช้งานโดย software โดยการเซ็ต the UDIS bit ใน TIMx_CR1 register. นี้เพื่อหลีกเลี่ยงการอัปเดต the shadow registers ขณะที่เขียนค่าใหม่ใน the preload registers. จากน้้นไม่มีการอัปเดต event เกิดขึนจนกระทั่ง the UDIS bit ถูกเขียนให้เป็น 0 แล้ว. อย่างไรก็ตาม, the counter ยังคง counting up และ down, ตาม the current auto-reload
value.
นอกจากนี้, หาก the URS bit (update request selection) ใน TIMx_CR1 register ถูกเซ็ต, การเซ็ต the UG bit จะสร้าง an update event UEV แต่ปราศจากการเซ็ต the UIF flag (ดังนั้นไม่มี interrupt หรือ DMA request ถูกส่ง). นี้เพื่อหลีกเลี่ยงการสร้างทั้ง update และ capture interrupts เมื่อมีการเคลียร์ the counter บน the capture event.
เมื่อ an update event เกิดขึ้น, ทุก the registers ถูกอัปเดตและ the update flag (UIF bit ใน TIMx_SR register) ถูกเซ็ต (ขึ้นอยู่กับ the URS bit):
• The repetition counter ถูกโหลดซ้ำใหม่ด้วย the content ของ TIMx_RCR register.
• The buffer ของ the prescaler ถูกโหลดซ้ำใหม่ด้วย the preload value (ที่อยู่ภายในของ the TIMx_PSC register)
• The auto-reload active register ถูกอัปเดตด้วย the preload value (ที่อยู่ภายในของ the TIMx_ARR register) บันทึกไว้ว่า
ถ้า the update source คือ a counter overflow, the auto-reload ถูกอัปเดตก่อน the counter ถูกโหลดซ้ำใหม่, ดังนั้น the
next period คือสิ่งที่คาดหวัง(the expected one) (the counter ถูกโหลดด้วย the new value).
รูปดังต่อไปนี้แสดงบางตัวอย่างของ the counter behavior สำหรับ different clock frequencies


