2006-03-21 07:40 PM
2006-03-21 03:18 AM
Hello,
we are sing the str710 with HDLC : - when we are polling the HDLC receive line everything is working well like in your example - when we want to use the HDLC IT, this IT is called forever and the exe can do nothing else : like the IT wasn't cleared? Is the HDLC It is working well? here is the code : init_hdlc : HDLC_ITConfig(HDLC_RMCM|HDLC_TMCM,ENABLE); EIC_IRQChannelPriorityConfig(HDLC_IRQChannel,4); EIC_IRQChannelConfig(HDLC_IRQChannel,ENABLE); void HDLC_IRQHandler(void) { if(HDLC_ReadInterruptStatus(HDLC_RMC)) { if (HDLC_ReadPCRStatus(HDLC_REN)==1) return 1; if (HDLC_ReadInterruptStatus(HDLC_RBF)) { HDLC_ClearInterruptStatus(HDLC_RBF); if (HDLC_ReceiveHalfBufferStatus()== HDLC_RECV_HIGH_HALF_BUFFER_FULL) recv_buf_addr = HDLC_RECEIVEBUFFER_BASE_HI; } bytecount = HDLC_RecvFrameByteCountRead (); for(addr = recv_buf_addr; addr { pBufr[i] = (*(u8 *)addr); i++; } //here I put data in fifo HDLC_ClearInterruptStatus(HDLC_RBF | HDLC_RMC); } else if (HDLC_ReadInterruptStatus(HDLC_TMC)) { HDLC_ClearInterruptStatus(HDLC_TMC); } } Thanks2006-03-21 07:11 PM
I added this :
instead of : if (HDLC_ReadPCRStatus(HDLC_REN)==1) return 1; I put this : if (HDLC_ReadPCRStatus(HDLC_REN)==1) { HDLC_ClearInterruptStatus(HDLC_RBF | HDLC_RMC); HDLC_Recv_Control(ENABLE); return 1; } In this case all the HDLC transfert is working well but I have still something strange : our transfert is like this : receive - answer - receive - answer etc... and for the HDLC It I have RMC (ok) - TMC (ok) - RMC just after TMS (?) - RMC (ok) - TMC (ok) - RMC just after TMS (?) .. when I'm sending something i have the TMC IT in which I'm doing : if (HDLC_ReadInterruptStatus(HDLC_TMC)) { HDLC_ClearInterruptStatus(HDLC_TMC); HDLC_Recv_Control(ENABLE); } and just after I have a RMC It but it's going to this case : if (HDLC_ReadPCRStatus(HDLC_REN)==1) { HDLC_ClearInterruptStatus(HDLC_RBF | HDLC_RMC); HDLC_Recv_Control(ENABLE); return 1; } what does it means? it's receiving data from data which I send (there is no loopback) Thanks2006-03-21 07:40 PM
In this case all the HDLC transfert is working well but I have still something strange :
our transfert is like this : receive - answer - receive - answer etc... and for the HDLC It I have RMC (ok) - TMC (ok) - RMC just after TMS (?- data n°1) - RMC (ok - data n°2) - TMC (ok) - RMC just after TMS (? - data n°3) - RMC (ok - data n°4) I notice that : data n°1 = data n°2 data n°3 = data n°4 but for data n°1 and data n°3 REN=1 : what does it mean?