Tool/software: TI-RTOS
Hello,
for my project i have to run UART ant high frequency, say 8 MHz.. if not possible at least 8 MHz,
I did modify a NORTOS UART echo example, it runs at 8 MHz with following modifications
const eUSCI_UART_Config uartConfig =
{
EUSCI_A_UART_CLOCKSOURCE_SMCLK, // SMCLK Clock Source
3, // BRDIV
0, // UCxBRF
0, // UCxBRS
EUSCI_A_UART_NO_PARITY, // No Parity
EUSCI_A_UART_LSB_FIRST, // LSB First
EUSCI_A_UART_ONE_STOP_BIT, // One stop bit
EUSCI_A_UART_MODE, // UART mode
0//EUSCI_A_UART_OVERSAMPLING_BAUDRATE_GENERATION // Oversampling
};
int main ()
{
...
CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_24);
...
}
So, far. all is ok. ... SMLK 24MHZ divider is 3. I see on osciloscope propr frequency.
The problem is that I cannot run UART with 8 mhz in TIRTOS.
What I did..
1. I changed and recompiled TIRTOS with changes in PowerMSP432.c
PowerMSP432_PerfLevel PowerMSP432_perfLevels[NUMPERFLEVELS] = {
...
{ .activeState = AM_DCDC_VCORE1,
.VCORE = 1,
.clockSource = CS_DCOCLK_SELECT,
.DCORESEL = CS_DCO_FREQUENCY_48,
.DIVM = CS_CLOCK_DIVIDER_1,
.DIVHS = CS_CLOCK_DIVIDER_2,
.DIVS = CS_CLOCK_DIVIDER_2,
.flashWaitStates = 2,
.enableFlashBuffer = true,
.MCLK = 48000000,
.HSMCLK = 24000000,
.SMCLK = 24000000,
.ACLK = 32768
},
I changed related array const UARTMSP432_BaudrateConfig uartMSP432Baudrates[] properly..
{8000000, 24000000, 3, 0, 0, 0},
I can init, but cannot run UART.
on second UART_write the UCTXIFG = 0, (UCAxIFG register)
then exit().
Questions
1 Why this register field is 0? I see on osciloscope that the sending was on the uart line. all is ok.?
2 Can I simply write 1 to the UCTXIFG? if yes how I can in TIRTOS do that?
Thanks