MSP432 timerA 捕获模式下输入的IO口是哪个?(TA0.1)
CClxA、CClxB、GND、VCC到底是什么意思?有什么区别。并且在芯片上找不到对应的输入IO
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.
MSP432 timerA 捕获模式下输入的IO口是哪个?(TA0.1)
CClxA、CClxB、GND、VCC到底是什么意思?有什么区别。并且在芯片上找不到对应的输入IO
以MSP432P401为例
数据手册中有相关说明 http://www.ti.com/cn/lit/ds/symlink/msp432p401r.pdf
Table 4-2. Signal Descriptions (continued)
其他引脚也可以在 4.2 Pin Attributes 找到
这部分的资料很少,您需要结合源码来看
void GPIO_setAsPeripheralModuleFunctionInputPin(uint_fast8_t selectedPort,
uint_fast16_t selectedPins, uint_fast8_t mode)
{
uint32_t baseAddress = GPIO_PORT_TO_BASE[selectedPort];
HWREG16(baseAddress + OFS_LIB_PADIR) &= ~selectedPins;
switch (mode)
{
case GPIO_PRIMARY_MODULE_FUNCTION:
HWREG16(baseAddress + OFS_LIB_PASEL0) |= selectedPins;
HWREG16(baseAddress + OFS_LIB_PASEL1) &= ~selectedPins;
break;
case GPIO_SECONDARY_MODULE_FUNCTION:
HWREG16(baseAddress + OFS_LIB_PASEL0) &= ~selectedPins;
HWREG16(baseAddress + OFS_LIB_PASEL1) |= selectedPins;
break;
case GPIO_TERTIARY_MODULE_FUNCTION:
HWREG16(baseAddress + OFS_LIB_PASEL0) |= selectedPins;
HWREG16(baseAddress + OFS_LIB_PASEL1) |= selectedPins;
break;
}
在此
primary :PASEL0 is 1 and PASEL1 is 0. (01)
secondary :PASEL0 is 0 and PASEL1 is 1. (10)
tertiary :PASEL0 and PASEL1 are both 1. (11)