Other Parts Discussed in Thread: TMS320F28026
Hi All,
I'm using the TMS320F28026 piccolo device.
I am receiving serial data via the SCI FIFO RX interrupt, but am seeing the strange behaviour that it receives only every second byte in the data stream.
I've looked at the data with a scope, and it's all there.
The RX FIFO interrupt level is set to SCI_FifoLevel_1_Word ... so it should interrupt every byte.
baud rate has been set correctly to 31250 - and I'm able to transmit data ok.
Here's my RX interrupt handler function ...
#define RX_BUFFER_SZ 32
unsigned char rx_buffer[RX_BUFFER_SZ];
unsigned char rx_buffer_count;
//
// Receive a character via the SCI interrupt
//
interrupt void sciaRxFifoIsr(void)
{
uint16_t data = SCI_getData(mySci);
rx_buffer[rx_buffer_count] = (unsigned char)(data & 0x00FF);
rx_buffer_count = rx_buffer_count + 1;
if (rx_buffer_count == RX_BUFFER_SZ) {
rx_buffer_count = 0;
}
// Clear Overflow flag
SCI_clearRxFifoOvf(mySci);
// Clear Interrupt flag
SCI_clearRxFifoInt(mySci);
// Issue PIE ack
PIE_clearInt(myPie, PIE_GroupNumber_9);
return;
}
The byte stream I see on the scope and the one I am expecting is
00 14 0F 9C 80 03 03 00 00 00 00 01 2A 4E 62
The byte stream I receive via the interrupt is
14 9C 03 00 00 01
... which is every second byte of the original stream, and its also short one byte (4E).
Can't work out what could be causing this if anything. Would really appreciate any suggestions or help with this. Have been working on it for a couple of days now without any progress.
Thanks in advance
Harvey