Communicating via HDLC over a TDM Interface with a QUICC ...
Communicating via HDLC over a TDM Interface with a QUICC ...
Communicating via HDLC over a TDM Interface with a QUICC ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Code Listing<br />
}<br />
// Enter an endless loop to wait for an receive frame by polling the<br />
// RXF bit in the UCC8 Event register.<br />
// A production application would most likely enable an interrupt for<br />
// this event to allow the system to do other work.<br />
while (1) {<br />
}<br />
while ((*ucce_p & 0x00080000) == 0)<br />
{<br />
}<br />
// do nothing...<br />
// Display the received data.<br />
printf ("RX Frame: %s\n\r", g_rxbuf);<br />
// Clear RXF Flag to allow a new event to be detected.<br />
*ucce_p = 0x00080000;<br />
// Clear out the RX buffer.<br />
for (i=0; i< BUF_SIZE; i++)<br />
g_rxbuf[i]=0;<br />
// Set the empty bit in the RX BD to allow another frame to<br />
// be received.<br />
rx_bd_p->cntrl |= 0x80;<br />
<strong>Communicating</strong> <strong>via</strong> <strong>HDLC</strong> <strong>over</strong> a <strong>TDM</strong> <strong>Interface</strong> <strong>with</strong> a <strong>QUICC</strong> Engine UCC, Rev. 0<br />
34 Freescale Semiconductor