AIRCR:配置寄存器分组与自动复位控制
控制中断分组的是第8第9第10位。
如果要改变这三个位,要对16到31位写入0x05FA。#define AIRCR_VECTKEY_MASK 0x05FA0000就是这个意思了,
0x05fa对与AIRCR来说就是一个“入口钥匙”,只有对高16位写对了,才能对低16位写入。所以
AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup;
AIRCR = 0x05FA0000 | NVIC_PriorityGroup;
#define NVIC_PriorityGroup_2 ((uint32_t)0x500)
AIRCR = 0x05FA0000 | 0x500;
Access key; 0x05FA must be
written to this field to write to this
register, otherwise the write will
be ignored; the read-back value
of the upper half-word is 0xFA05
Indicates endianness for data: 1
for big endian (BE8) and 0 for little
endian; this can only change after
a reset
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>