4.3.1 The CMSIS mapping of the Cortex®-M3 NVIC registersเพื่อปรับปรุงประสิทธิภาพของซอฟต์แวร์ CMSIS ช่วยลดความยุ่งยากในการนำเสนอ NVIC register ใน CMSIS เป็นดังนี้:
• The Set-enable, Clear-enable, Set-pending, Clear-pending and Active Bit registers map ถึง arrays of 32-bit
integers, ดังนั้น:
– The array ISER[0] to ISER[2] ตรงกันกับ the registers ISER0-ISER2
– The array ICER[0] to ICER[2] ตรงกันกับ the registers ICER0-ICER2
– The array ISPR[0] to ISPR[2] ตรงกันกับ to the registers ISPR0-ISPR2
– The array ICPR[0] to ICPR[2] ตรงกันกับ the registers ICPR0-ICPR2
– The array IABR[0] to IABR[2] ตรงกันกับ the registers IABR0-IABR2.
• The 8-bit fields ของ the Interrupt Priority Registers map ถึง an array of 8-bit integers, ดังนั้น the array IP[0] to
IP[67] ตรงกันกับ the registers IPR0-IPR67, และ the array entry IP[n] จะถือครอง the interrupt priority สำหรับ
interrupt n.
The CMSIS จัดให้มี thread-safe code ที่ให้การเข้าถึง the Interrupt Priority Registers เป็นแบบอตอมมิก. สำหรับข้อมูลที่มากขึ้นดูที่ the description of the NVIC_SetPriority function in NVIC programming hints on page 127. ตาราง 41 แสดงให้เห็นว่า the interrupts เหล่านี้, หรือ IRQ numbers, map ไปยัง the interrupt registers และตรงกันกับ CMSIS variables ที่มีหนึ่งบิตต่อหนึ่ง interrupt อย่างไร.

1. แต่ละ array element จะตรงกันกับ NVIC register เดียว, ตัวอย่างเช่น the element ICER[1] จะตรงกันกับ the ICER1 register.
ปล. ดูที่ตาราง interrupt เลยนะ ดูที่ position ว่าแต่ละ position เป็น interrupt อะไร แล้วมาไล่ดู register กัน