AnsweredAssumed Answered

How to receive more than 2 bytes via RXTWI8?

Question asked by flying-egg on Jan 30, 2018
Latest reply on Feb 9, 2018 by Jithul_Janardhanan

Hi,

I'm currently working with CCES and a ADSP 21469 EZ-Lite kite.
And I'm wondering if it's possible to receive an uint8 array via the RXTWI8 command as an interrupt.

 

As of now I'm working with this code:

 

----------------------------CODE-----------------------------

 

void TWI_ISR(uint32_t iid, void *handlerarg)
{

   int varcheck=*pTWIIRPTL;

 

   if((varcheck&TWISCOMP)==0)
   {
      buff_empty=1;
      varcheck|=TWIRXINT;
      *pTWIIRPTL=varcheck;
   }
   else
   {
   varcheck|=TWISCOMP;
   *pTWIIRPTL=varcheck;
   varread = *pRXTWI8;
   varread1 = *pRXTWI8;


   if(write_pend==1)  
   write_pend=0;
   else
   read_pend=0;
   }

}

 

----------------------------CODE-----------------------------

 

With this interrupt I am able to receive a one byte message or an array of 2 bytes. They will be written in the variables varread/varread1.
But as soon as I'm sending an array of 3 bytes or more, nothing will be received. Not even the first two ints of the array. 

I'm pretty sure that has something todo with the FIFO buffer size beeing 16 bits. Sadly I need at least 4 bytes of data transfer via interrupt for my project to work. Is there a way to implement this?

Thanks in advance for any help you guys can give me.

BR
Kai

Outcomes