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.

sci communication in TMS320F28035

Other Parts Discussed in Thread: TMS320F28035

Dear All,

    I have written code for SCI communication with PC and its working fine.

and i am having ADC isr to measure AC signal as well which also working correctly.

But as ADC isr is running and i transmits some data in main code of around 20bytes to 100 bytes at interval of 1S baud rate is 38400. it affects ADC isr. it can be seen from variation on GPIO width which i am toggiling in ADC ISR.

in SCI communication while transiting data i am checking TXBUFF EMPTY flag in while loop, which might be creating some delay and messing up main loop timings or increase it further.

    How can SCI communication can be improved and what are methods ?

    should keeping Tx ISR will improve it and my code can become faster ?

    As i am not using ISR for SCI (Tx & Rx is done in main code) then why its affecting ADC isr ?

    will FIFO communication will improve this scenario ?

    I want ADC isr should be of high priority and keep other ISR to the minimum length and priority.

Thank You in Advance.

  • Certainly using the ISR will let the ADC be the highest priority ISR, but that may not help if you are spending alot of time in the SCI ISR since other ISRs will be blocked until you return.  If ADC data is paramount then you might need to look into nesting ISRs, but I'm not sure how well that will work since you will effectively stall the transmission coming out of the SCI

    Can you advise what C2000 part number you are working with?  If there is DMA or CLA on the chip we could use that to process the ADC data independent of the main core.

    Matt

  • Dear MatthewPate,

        Thanks for your reply,

    I am using TMS320F28035 controller.

    currently i am sending data in main loop. for this i am cheching TXDATABUFF flag to be embply in while loop.

    so till my prevous data to be sent i am stuck in while loop which makes my other main loop fuctions to wait till that time.


    I am not sure if i am sending data in main loop (not using ISR) why ADC ISR getting affected ?

    Thank You

  • Dear matthewPate,

         Will use of FIFO mode of communication will help me to speed up communication without much intruption to software ?

    Thank You

  • Hi Bhuvaneshwar

    Using FIFO should help you out.

    I have recently established ADC to SCI communication with F28335 and have transmitted this data from one DSP to Another.I have associated some flag bits with the data to provide proper handshake if continuous data is being sent.

    This is how am recieving the data at my reciever end:


    while(ScibRegs.SCIFFRX.bit.RXFFST !=0) { } // wait for RXDY =1 for empty state,i.e until FIFO has one word
    DELAY_US(1000000);

    a = ScibRegs.SCIRXBUF.all;

    I hope this helps you out.

    Thanks

    Sneha