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.

c6678 sysbios下串口的使用

由于项目时间要求比较急,刚基础DSP 3天,需要操作串口,但是串口代码以前有人写好了,调用并没有任何效果。我们是基于sys/bios,以前写串口驱动的人,也没有真是测试过这个串口操作代码。能否提供一个基于sys/bios的c6678串口驱动的例程?

以前人写的串口驱动我放到附件中,欢迎各位行家指导下,这个问题应该不难!

在main函数中去初始化串口

UART_init(); //串口初始化
UART_Interrupts_Init(13, 35); /*串口中断配置13*/

然后新建一个线程去循环发送数据

Task_Params_init(&taskParams_state);
taskParams_state.priority = 8;
taskParams_state.stackSize = 0x2000;
Task_Handle tsk7 = Task_create (tdc_state_task_func, &taskParams_state, NULL );

BIOS_start();

然后在任务中就循环发送数据

void tdc_state_task_func(){
while(1){
//read uart whether read tdc state request
//make the tdc state frame
//Task_sleep(2);
//write uart tdc state response
UART_write_string("hello world!\n");
UART_write("abc",3);
}
}

谢谢!4722.c6678串口使用.rar