GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_P1, GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION );
此函数的第三个形参,有3个选项:主要,第二个,第三个。
请问,如何判断是选择哪个呢?
作为串口使用 Txd,Rxd应该如何设置呢?
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.
GPIO_setAsPeripheralModuleFunctionInputPin( GPIO_PORT_P1, GPIO_PIN2 | GPIO_PIN3, GPIO_PRIMARY_MODULE_FUNCTION );
此函数的第三个形参,有3个选项:主要,第二个,第三个。
请问,如何判断是选择哪个呢?
作为串口使用 Txd,Rxd应该如何设置呢?
作为串口使用 Txd,Rxd应该如何设置呢?
* Select Port 2d
* Set Pin 0, 1 to input Secondary Module Function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
*/
GPIO_setAsPeripheralModuleFunctionInputPin(
GPIO_PORT_P2,
GPIO_PIN0 + GPIO_PIN1,
GPIO_SECONDARY_MODULE_FUNCTION
);
您可以参考例程:
MSP430Ware_3_80_13_03\driverlib\examples\MSP430FR5xx_6xx\eusci_a_uart