Dear Experts
If I call MAT_UART_prinft twice without delay, I only got "Hello!!!!!!" output (the second command is ingored).
MAT_UART_printf(1,"\r\n Hello!!!!!!!!!!!!",20);
MAT_UART_printf(1,"\r\n How are you!!!!!!!!!!!!!!!!",30);
If I add a delay between two MAT_UART_prinft, I can get both "Hello!!!!!!" and "How are you!!!!!!" output.
MAT_UART_printf(1,"\r\n Hello!!!!!!!!!!!!",20);
_delay_cycles(115200);
MAT_UART_printf(1,"\r\n How are you!!!!!!!!!!!!!!!!",30);
_delay_cycles(115200);
Why the second command is ingored without delay?
Thanks for your comment.
/*
* ======== main.c ========
*/
#include <xdc/std.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include "MAT_Driver.h"
/*
* ======== taskFxn ========
*/
Void taskFxn(UArg a0, UArg a1)
{
//System_printf("enter taskFxn()\n");
//Task_sleep(10);
//System_printf("exit taskFxn()\n");
//System_flush(); /* force SysMin output to console */
MAT_flsh_init();
while(1)
{
MAT_UART_printf(1,"\r\n Hello!!!!!!!!!!!!",20);
_delay_cycles(115200);
MAT_UART_printf(1,"\r\n How are you!!!!!!!!!!!!!!!!",30);
_delay_cycles(115200);
//GPIO_write(GPIO_BLUE,0); // led on
//MAT_flsh_Test();
//GPIO_write(GPIO_BLUE,1); // led off
//GPIO_toggle(GPIO_BLUE);
//MAT_StringPrintf("\r\n**");
Task_sleep(1);//250);
}
}
/*
* ======== main ========
*/
Int main()
{
Task_Handle task;
Error_Block eb;
System_printf("enter main()\n");
Error_init(&eb);
task = Task_create(taskFxn, NULL, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}
MAT_GPIO_config_init();
MAT_UART_set_init();
MAT_UART_config_init();
MAT_SPI_config_init();
MAT_SPI_set_init();
BIOS_start(); /* does not return */
return(0);
}