看了函数库说明,IntRegister提示注意
The use of this function (directly or indirectly via a peripheral driver interrupt register function) moves the interrupt vector table from ?ash to SRAM. Therefore, care must be taken when linking the application to ensure that the SRAM vector table is located at the beginning of SRAM; otherwise NVIC will not look in the correct portion of memory for the vector table (it requires the vector table be on a 1 kB memory alignment). Normally, the SRAM vector table is so placed via the use of linker scripts; some tool chains, such as the evaluation version of RV-MDK, do not support linker scripts and therefore will not produce a valid executable.
但是还是搞不清楚准则,什么时候需要将中断映射表,从flash中移至sram中。而且看过前人的贴子,好像效率上也比不上在flash中,用起来又复杂。建议还是放至到中断向量表里面。