I am unable to get receive interrupts using the simulator. I have characters coming in on COM1 on my PC. Using the debugger, the code never gets to the SCI1/0_interrupt routine.
my code snippet below:
void setUart(unsigned char mode)
{
TTYTABLE tInterfaceParameters; //table for passing information to driver
tInterfaceParameters.Channel = SERIAL_PORT_0; // serial 0, 1, 2, etc.
tInterfaceParameters.ucSpeed = SERIAL_BAUD_4800; // baud rate
tInterfaceParameters.Rx_tx_sizes.RxQueueSize = RX_BUFFER_SIZE; // input buffer size
tInterfaceParameters.Rx_tx_sizes.TxQueueSize = TX_BUFFER_SIZE; // output buffer size
tInterfaceParameters.Task_to_wake = 0;
tInterfaceParameters.usConfig = (CHAR_8 | NO_PARITY | ONE_STOP | NO_HANDSHAKE | CHAR_MODE );
if ( (SerialPortID = fnOpen(TYPE_TTY, mode, &tInterfaceParameters)) != 0 ) // open or change the channel with defined configurations (initially inactive)
fnDriver( SerialPortID, (RX_ON | TX_ON), 0 ); // enable RX & TX
}
SERIAL_PORT_0 1 // map SCI0 to COM1
I have the same code running on a SAM7X code base.
Thanks!!
Lav