MSP432 timerA 捕获模式下输入的IO口是哪个?(TA0.1)
CClxA、CClxB、GND、VCC到底是什么意思?有什么区别。并且在芯片上找不到对应的输入IO
user5356195:
MSP432Px系列
user5356195:
回复 Susan Yang:
大神,那IO设置中,主要模块功能、辅助模块功能、三级模块功能有什么区别,为什么捕获模式中必须把IO口设置为主要模块功能
Susan Yang:
回复 user5356195:
这部分的资料很少,您需要结合源码来看
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)
Susan Yang:
回复 user5356195:
强烈建议您使用 www.ti.com/…/msp432p401r.pdf的 6.12 Input/Output Diagrams来配置IO