µTasker Forum
µTasker Forum => µTasker general => Topic started by: lthyagar on September 18, 2009, 03:10:56 AM
-
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
-
Hi Lav
The V1.3 package doesn't support extended COM port mapping. This means that you need to use
SERIAL_PORT_0 '1' // map SCI0 to COM1
(note that the 1 is written as ASCII '1', which is limited to COM '1' .. '9').
The V1.4 version (with #define SIM_COM_EXTENDED) allows 1..255 to be selected.
Regards
Mark
-
Now I am getting Unhandled exception at 0x0045018f in uTaskerV1-3.exe: 0xC0000005: Access violation writing location 0x00000069.
line tx_control[pars->Channel]->opn_mode = pars->usConfig;
Any hints will be appreciated.
Thanks!!
Lav