Tool/software: Code Composer Studio
Hi I am trying to use UART on msp430f6435 but I am not getting proper clock configuration.
I have used ti resource UART reference code but it is not working the way it is assumed to be.
Ti resource website
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.
Tool/software: Code Composer Studio
Hi I am trying to use UART on msp430f6435 but I am not getting proper clock configuration.
I have used ti resource UART reference code but it is not working the way it is assumed to be.
Ti resource website
Part Number: msp430f6435
Tool/software: Code Composer Studio
MSP430f6435 uart configuration
P2.4 ==>Tx
P2.5==>Rx
7 6 5 4 3 2 1 0 (Port 2 bits)
0 0 1 1 0 0 0 0 ==>0x30
P2SEL |= 0x30; // Assign P2.4 to UCA0TXD and...
P2DIR |= 0x30; // P2.5 to UCA0RXD
is it the correct way to assign port2 as uart for Tx & Rx ???
void Port_Mapping(void) { // Disable Interrupts before altering Port Mapping registers __disable_interrupt(); // Enable Write-access to modify port mapping registers PMAPPWD = 0x02D52; #ifdef PORT_MAP_RECFG // Allow reconfiguration during runtime PMAPCTL = PMAPRECFG; #endif P2MAP4 = PM_UCA0TXD; P2MAP5 = PM_UCA0RXD; // Disable Write-Access to modify port mapping registers PMAPPWD = 0; #ifdef PORT_MAP_EINT __enable_interrupt(); // Re-enable all interrupts #endif }
This will set up the secondary functions port mapping.
Call Port_Mapping() before your P2SEL line.
**Attention** This is a public forum