Part Number: MSP432E401Y
Other Parts Discussed in Thread: MAX232
We are configuring UART6 to establish communication with GPS module. We tried to cross check the functionality by connecting to USB to TTL converter and monitor the data sent by UART6 on termite serial monitor. However the UART is sending some junk data (image attached). Baud rate is also matched in the UART code and termite serial monitor.
Here is the code used to configure the UART6:
void UARTSend(const uint8_t *pui8Buffer, uint32_t ui32Count)
{
while(ui32Count--)
{
UARTCharPut(UART6_BASE, *pui8Buffer);
pui8Buffer++;
}
}
void main()
{
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP);
MAP_IntMasterEnable();
GPIOPinConfigure(GPIO_PP0_U6RX);
GPIOPinConfigure(GPIO_PP1_U6TX);
MAP_GPIOPinTypeUART(GPIO_PORTP_BASE, GPIO_PIN_0 | GPIO_PIN_1);
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART6);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_UART6))
{
}
g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
UARTConfigSetExpClk(UART6_BASE, g_ui32SysClock, 115200, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |UART_CONFIG_PAR_NONE));
uint8_t text[] = {"Hello word"};
UARTSend(text, sizeof(text));
}
The same code works fine if we modify GPIO pins and UART number for UART0,
Please let us know whats going wrong.
Thanks and Regards
Raj Johri
