目录
- API (机翻)
- SFR管理中断的函数
- SFR 管理RST/NMI引脚控制的函数
- 参数
平台:Code Composer Studio 10.3.1
MSP430F5529 LaunchPad™ Development Kit
(MSP‑EXP430F5529LP)
API (机翻)
特殊函数寄存器API提供了一组用于使用MSP430Ware SFR模块的函数。提供了启用和禁用中断和控制~ RST/NMI引脚的功能。
SFR模块可以使设备的其他外设产生中断。
SFR APl被分成两组:
SFR管理中断的函数
SFR 管理RST/NMI引脚控制的函数
SFR管理中断的函数
SFR_enableInterrupt(uint8_t interruptMask)
//启用选定的SFR中断源
SFR_disableInterrupt(uint8_t interruptMask)
//禁用选定的SFR中断源
SFR_getInterruptStatus(uint8_t interruptFlagMask)
//返回所选SFR中断标志的状态
SFR_clearInterrupt(uint8_t interruptFlagMask)
//清除选定的SFR中断标志
SFR 管理RST/NMI引脚控制的函数
SFR_setResetPinPullResistor(uint16_t pullResistorSetup)
//设置∼RST/NMI引脚上的上/下拉电阻
SFR_setNMIEdge(uint16_t edgeDirection)
//设置边缘方向,如果NMI功能是激活的,将断言一个NMI从∼RST/NMI引脚上的信号。
SFR_setResetNMIPinFunction(uint8_t resetPinFunction)
//设置~RST/NMI引脚的功能
参数
interruptMask
/*is the bit mask of interrupts that will be disabled. Mask value is the logical OR
of any of the following:*/
SFR_JTAG_OUTBOX_INTERRUPT /*- JTAG outbox interrupt enable*/
SFR_JTAG_INBOX_INTERRUPT /*- JTAG inbox interrupt enable*/
SFR_NMI_PIN_INTERRUPT /*- NMI pin interrupt enable, if NMI function is chosen*/
SFR_VACANT_MEMORY_ACCESS_INTERRUPT /*- Vacant memory access interrupt enable*/
SFR_OSCILLATOR_FAULT_INTERRUPT /*- Oscillator fault interrupt enable*/
SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT /*- Watchdog interval timer interrupt enable*/
SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT /*- *Flash controller access violation interrupt enable*/
interruptFlagMask
/*is the bit mask of interrupt flags that should be cleared Mask value is the
logical OR of any of the following:*/
SFR_JTAG_OUTBOX_INTERRUPT /*- JTAG outbox interrupt enable*/
SFR_JTAG_INBOX_INTERRUPT /*- JTAG inbox interrupt enable*/
SFR_NMI_PIN_INTERRUPT /*- NMI pin interrupt enable, if NMI function is chosen*/
SFR_VACANT_MEMORY_ACCESS_INTERRUPT /*- Vacant memory access interrupt enable*/
SFR_OSCILLATOR_FAULT_INTERRUPT /*- Oscillator fault interrupt enable*/
SFR_WATCHDOG_INTERVAL_TIMER_INTERRUPT /*- Watchdog interval timer interrupt enable*/
SFR_FLASH_CONTROLLER_ACCESS_VIOLATION_INTERRUPT /*- Flash controller access violation interrupt enable*/
pullResistorSetup
/*is the selection of how the pull-up/down resistor on the ∼RST/NMI pin
should be setup or disabled. Valid values are:*/
SFR_RESISTORDISABLE
SFR_RESISTORENABLE_PULLUP /*[Default]*/
SFR_RESISTORENABLE_PULLDOWN
/*Modified bits are SYSRSTUP of SFRRPCR register.*/
edgeDirection
/*is the direction that the signal on the ∼RST/NMI pin should go to signal an
interrupt, if enabled. Valid values are:*/
SFR_NMI_RISINGEDGE /*[Default]*/
SFR_NMI_FALLINGEDGE
/*Modified bits are SYSNMIIES of SFRRPCR register.*/
resetPinFunction
/*is the function that the ∼RST/NMI pin should take on. Valid values are:*/
SFR_RESETPINFUNC_RESET /*[Default]*/
SFR_RESETPINFUNC_NMI
/*Modified bits are SYSNMI of SFRRPCR register.*/