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.

MSP432E401Y: UART com using 32768 quartz

Part Number: MSP432E401Y


Hello,

I try to configure the Clock so I can use the 32768 Xtal from RTOSC for UART as follow:

I wrote the following code just to unit test that function but it sounds it's not working.

/* DriverLib Includes */
#include <ti/devices/msp432e4/driverlib/driverlib.h>

/* Standard Includes */
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>

/* Display Include via console */
#include "uartstdio.h"

void ConfigureUART(uint32_t systemClock)
{
/* Enable the clock to GPIO port A and UART 0 */
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

/* Configure the GPIO Port A for UART 0 */
MAP_GPIOPinConfigure(GPIO_PA0_U0RX);
MAP_GPIOPinConfigure(GPIO_PA1_U0TX);
MAP_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

/* Configure the UART for 9600 bps 8-N-1 format */
UARTStdioConfig(0, 9600, systemClock);
}

int main(void)
{

uint32_t systemClock;

/* Configure the system clock for 120 MHz */
systemClock = MAP_SysCtlClockFreqSet(SYSCTL_OSC_EXT32,32768);

/* Initialize serial console */
ConfigureUART(systemClock);

/* Print Banner */
UARTprintf("I can speak now\r\n\n");

}

  • Hello Jonathan,

    I'm trying to understand why you would possibly want to use the 32.768kHz crystal instead of just PIOSC?

    I have never before seen any use case for using the RTC crystal for the UART. I can't really comment if it would work. I could try testing when back from Labor Day holiday but I strongly recommend to just use PIOSC which is proven to work.

    Best Regards,

    Ralph Jacobi