Part Number: MSPM0L1306
Hello MSPM0 Team,
I'm trying to print to the CCS console using a MSPM0L1306. I'm currently following this E2E for a guideline, but I can't get this to work. I'm not seeing any output in the consoles.
Here's the code I currently have:
#include "stdio.h"
#include "ti/drivers/UART.h"
#include "string.h"
volatile int TXChar = -1;
char TXData[64];
void StartSerialTX(char *str) {
while (TXChar != -1) {
// wait for previous tx to finish
delay_cycles(10000);
}
strcpy(TXData, str);
TXChar = 0;
DL_UART_Main_transmitData(UART_0_INST, TXData[TXChar++]);
}
void UART_0_INST_IRQHandler(void) {
switch (DL_UART_Main_getPendingInterrupt(UART_0_INST)) {
case DL_UART_MAIN_IIDX_RX:
//RXdata = DL_UART_Main_receiveData(UART_0_INST);
// DL_UART_Main_transmitData(UART_0_INST, RXdata);
break;
case DL_UART_MAIN_IIDX_TX:
if (TXData[TXChar] != '\0') {
DL_UART_Main_transmitData(UART_0_INST, TXData[TXChar++]);
} else {
TXChar = -1;
}
break;
default:
break;
}
}
int main(void)
{
char *buf = "Hello!\n";
StartSerialTX(buf);
//Other code function have been removed for brevity
}
Is there anything I'm currently doing incorrectly here?
Thanks for working on this!
Best Regards,
Ethan Galloway