请教TI工程师:
MSP432处理器在 进行Flash时需要关闭中断 那有没有相MSP430那样禁止全局中断的指令啊~ 我没有找到相关指令,麻烦请教
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
请教TI工程师:
MSP432处理器在 进行Flash时需要关闭中断 那有没有相MSP430那样禁止全局中断的指令啊~ 我没有找到相关指令,麻烦请教
可以的,代码定义在msp_compatibility.h中,如下所示
#define __sleep() __wfi() #define __deep_sleep() { (*((volatile uint32_t *)(0xE000ED10))) |= 0x00000004; __wfi(); (*((volatile uint32_t *)(0xE000ED10))) and= ~0x00000004; } #define __low_power_mode_off_on_exit() { (*((volatile uint32_t *)(0xE000ED10))) &= ~0x00000002; } #define __get_SP_register() __get_MSP() #define __set_SP_register(x) __set_MSP(x) #define __get_interrupt_state() __get_PRIMASK() #define __set_interrupt_state(x) __set_PRIMASK(x) #define __enable_interrupt() __asm(" cpsie i") #define __enable_interrupts() __asm(" cpsie i") #define __disable_interrupt() __asm(" cpsid i") #define __disable_interrupts() __asm(" cpsid i") #define __no_operation() __asm(" nop")
__disable_interrupt() 就是关闭所有中断了。