Hi,
There is a discussion on UART, 1294 LaunchPad:
https://e2e.ti.com/support/embedded/tirtos/f/355/t/405596
It said:
The TI-RTOS UART driver internally uses a Hwi to manage the UART interrupt so you're right, that interrupt number is already used. Why do you have need to create your own ISR? If you're using the TI-RTOS driver, you can't do this. An option will be to use the TI-RTOS UART driver in callback mode. In callback mode, you provide your own call back function that would be called after any UART read or write call. The other option will be not to use the TI-RTOS UART driver and use TivaWare's UART driver and manually create and manage your Hwi.
I am interested in using TivaWare's UART driver and manually create and manage HWI now. First I create a simple RTOS project. Here is the .cfg GUI:
On this picture, UART Monitor is not checked. I can say that RTOS doesn't use UART driver?
Then I copy most of UART dma echo initial code:
Int main() { /* Call board init functions */ Board_initGeneral(); uart_tiveware(NULL, NULL); ........ Void uart_tiveware(UArg arg0, UArg arg1) { static uint32_t ui32PrevSeconds; static uint32_t ui32PrevXferCount; static uint32_t ui32PrevUARTCount = 0; uint32_t ui32XfersCompleted; uint32_t ui32BytesTransferred; // // Set the clocking to run directly from the crystal at 120MHz. // g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000); // // Enable peripherals to operate when CPU is in sleep. // ROM_SysCtlPeripheralClockGating(true); // // Enable the GPIO port that is used for the on-board LED. // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION); // // Enable the GPIO pins for the LED (PN0). // ROM_GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_0); // // Initialize the UART. // ConfigureUART(); UARTprintf("\033[2J\033[H"); UARTprintf("uDMA Example\n");
On computer uart console, there are erroneous characters displayed. here it is:
What have not done yet?
I find that the frequency set line is suspicious. But if I remove it, I don't know what frequency is for this RTOS project. Where can I get that information because UART needs the CPU system clock, then set the desired Baud rate etc.
Thanks,