Hi,
I'm trying to use UART0 and UART1 for my application using DM6437.
1st I tried using it just as the example included in DVSDK files (uart_bios_dm6437_drv_lib.pjt) , and it works just fine. I followed it as a reference including it in my own project and it does not work, it all works ok up to the point to where I use "GPIO_write( )" to send characters to UART0.. and right afterwards a verification of this operation is done:
memcpy(TestStringStart,"UART Demo Starts \r\nEnter 32 characters for read write test :\r\n",SIZEOF_UART_STRING_START);
memcpy(TestStringStop,"\r\nUART Demo End ",SIZEOF_UART_STRING_STOP);
/*
* Input buffer
*/
buf.addr = TestStringStart;
/*
* Time out value
*/
buf.timeout = SYS_FOREVER;
/*
* Length of data
*/
len = SIZEOF_UART_STRING_START;
status = GIO_write(hUart_OUT, &buf, &len);
/*
* Error status detection
*/
if(!((status == IOM_COMPLETED)||(status == IOM_PENDING))){
LOG_printf(&trace, "\r\nError: 0: Error from GIO_write for UART Tests Start string\n");
}
In my project, the status is neither COMPLETED or PENDING.. I don't know why.
I included all necessary libraries as indicated in the example ( edma3 libs and Uart lib), initialized UART0 with the init function using DSPBIOS, created the UART0 user defined device within DSPBIOS, configured the UART through the devparams in interrupt mode, and left everything according to example..
In my proyect code runs exactly as example up to the point where the 1st GIO_write is executed.... then the status returned is an error,.. and the characters I see in the serial port console ( in my pc) are incomplete.
What could be wrong ?? I even tried including the whole sample code in my proyect and running it exactly as the example, still, the same problem. In the example I see the "interrupt" mode is configured.. however I don't see within the example's DSPBIOS configuration any hardware interrupt or event within ECM, configured to be used with the UART0.. so, how is it that works ? ( in the example I mean), shouldn't a hardware interrupt be configured somewhere as well ?
What i want in final terms... (after solving this problem ) is to use UART0 and UART1 in EDMA mode, so I don't have to create an ISR to be attended each time I receive or send 'n' characters, I would like to use the DMA so it interrupts my program flow each 'n' bytes( let's say 256, a personal serial protocol frame size for a command) and then process the frame, leaving hard work to DMA.
How can I implement this, or what literature should I consult to know how to use the UART0 in DMA mode ? ( All necessary steps, including DSPBIOS special configurations, DMA channels and how to create them, connect them, configure them, etc etc).
Thank you very much I've been into this for days with no considerable progress!!!