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.

change uart example

Hi 

 I used omapl137evm from spectrum digital. 

i used below example from ti :

C:\Program Files\Texas Instruments\pspdrivers_01_30_00_05\packages\ti\pspiom\examples\evmOMAPL137\uart\interrupt\build\uartSample.pjt

this example run on my board very good.

in this example when data  transmit with uart, program wait in below line until receive 1000 byte :

status = GIO_submit(hUart_OUT,IOM_WRITE, buf, &len, NULL);

i will not wait in line. i want do my work but when data is send for me i get it.

can i do this work with interrupt function?

can i used this line in interrupt function?

Regards,

Mahdi

  • HI Mahdi,

    This example by default is configured with interrupt only.


    void user_uart0_init(){ Uart_init(); uartParams = Uart_PARAMS;
    uartParams.hwiNumber = 9; uartParams.opMode = Uart_OpMode_INTERRUPT;}

    status = GIO_submit(hUart_OUT,IOM_WRITE, buf, &len, NULL);

    This API will not block, rather
    status = GIO_submit(hUart_IN,IOM_READ,buf,&len,NULL); (Line 185).
    Due to this API it will be blocked till the time it do not recieve 1000 bytes.
    But if you want transmission should not get blocked , you can create 2 Tasks, one each for reading and writing.
    Also Check BIOSPSP Userguide for more information.