Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lthyagar

Pages: [1] 2
1
µTasker general / Re: backup data using the simulator
« on: October 14, 2009, 04:16:28 PM »
Hello Mark,  can I save the data using the ufile system to  memory using the simulator?
Thanks!!
Lav

2
µTasker general / backup data using the simulator
« on: October 14, 2009, 03:22:04 AM »
Hello Mark, Can I use the simulator to backup realtime data? For e.g. If have data logging application monitoring different parameters ( I have written an app that simulates this), how can I use the
simulator to save data?
Thanks!!
Lav

3
µTasker general / DMA usage on the SAM7X
« on: October 04, 2009, 05:34:50 PM »
Hello Mark, I was going through the DMA drivers for the USARTs. It looks like the drivers do not use the "Next counter" and "Next pointers" features, which causes the DMA to  re-enable the triggers, when the counter is decremented to zero. Is there a specific reason for not using this feature?
Thanks!!
Lav

4
µTasker general / displaying real time data on the webpage
« on: September 26, 2009, 03:19:39 AM »
Hello Mark, I am having trouble updating  real time data  on the webpage for the SAM7x. I did go through one of your posts on how to do it, but I still have not been able to get the data to the webpage.
What command or function does the application need to use to get the data to webserver?
How to map the data point on the application side to the webpage? for e.g. a counter value from "my task" to the webserver.

Thanks!!
Lav

5
µTasker general / Re: Unhandled exception utasker1.3 for NE64
« on: September 20, 2009, 04:40:27 PM »
Hello Mark, appreciate your help. I have got UART 1 on the NE64 to work.
But I had to comment out "return DriverID" in tty_drv.c. This was causing UART 1 to communicate at 19200.  The code was not going to fnConfigSCI(pars->Channel, pars);   hence not picking up
the new baud rate from my code.

 if (NO_ID_ALLOCATED != (DriverID = fnSearchID (entry_add, pars->Channel))) {
        if (!(driver_mode & MODIFY_CONFIG)) {
     //       return DriverID;                                             // channel already configured
        }

After running for a while I get this error:
Run-Time Check Failure #2 - Stack around the variable 'ol' was corrupted.

I had got my GPS code to run on the SAM7x project without any issues. I am using the character LCD in the (4x16) mode.
Now I am having problems getting the same GPS code to work in the NE64 code base. The LCD is not being updated as per my code refresh rate( 4 event timers at 0.1 seconds). The third line in the LCD is going to the second and the fourth to the third.
My code is a new task(gps task) and is completely independent of the processor architecture. It used the function  fnDoLCD.. to send messages to the LCD task.

Thanks!!
Lav

6
µTasker general / Re: Unhandled exception utasker1.3 for NE64
« on: September 20, 2009, 12:14:34 AM »
Hello Mark,

tInterfaceParameters.usConfig = (CHAR_8 | NO_PARITY | ONE_STOP | NO_HANDSHAKE |  CHAR_MODE );
tInterfaceParameters.Channel = SERIAL_PORT_0;
#define SERIAL_PORT_0  '1'  ( in ascii because of no extended serial support).
hence pars->Channel is '1 '
Some more debug info:
QUEbuffer = CXX0030: Error: expression cannot be evaluated
buf_length = CXX0030: Error: expression cannot be evaluated

Thanks!!
Lav

7
µTasker general / Unhandled exception utasker1.3 for NE64
« on: September 19, 2009, 03:48:20 AM »
Now I am getting Unhandled exception at 0x0045018f in uTaskerV1-3.exe: 0xC0000005: Access violation writing location 0x00000069.
error at line:  tx_control[pars->Channel]->opn_mode = pars->usConfig;
Any hints will be appreciated.
Thanks!!
Lav

8
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

9
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

10
µTasker general / Re: How to use simulator for CAN bus on SAM7X
« on: September 15, 2009, 03:02:36 PM »
Hello Mark, I was wondering if it would be possible for you to give me the source for the cold fire project. I will try to port it to the SAM7X if possible.
Thanks!!
Lav

11
µTasker general / How to use simulator for CAN bus on SAM7X
« on: September 14, 2009, 04:28:02 PM »
Hello Mark, I have successfuly completed my first project ( GPS data)  using the utasker and simulator. I am able to display the positional, speed and bearing information on the LCD.
I am planning to start playing with CAN. How can I use the simulator with CAN bus?

Thanks!!
Lav

12
µTasker general / Re: Simulator for serial port data
« on: September 11, 2009, 01:31:31 AM »
Finally got it working !!
Had to force the COM3 to COM1 in the USB driver on Windows, and used
SERIAL_PORT0 set to 1 instead of 3.

13
µTasker general / Re: Simulator for serial port data
« on: September 11, 2009, 12:15:44 AM »
Step 2 works. I had to set SERIAL_PORT_0 to 0. It was mapped to 3 to match the COM3 on the PC.

I was taking a look at the code below:

extern void fnConfigSCI(QUEUE_HANDLE Channel, TTYTABLE *pars)
{
    unsigned long *ulReg = fnSelectChannel(Channel);
    switch (Channel) {
    case 0:
        POWER_UP(USART0);                                                // {37} enable clocks to UART0
        break;
    case 1:
        POWER_UP(USART1);                                                // {37} enable clocks to UART1
        break;
    #ifdef DBGU_UART                                                     // {35}
    case 2:
        POWER_UP(SYSIRQ);                                                // {37} enable clocks to UART2 (DBGU)
        break;
    #endif
    default:
        return;
    }
If channel is 3, it goes into the default section!!!
So UART0 is not enabled on the target.

14
µTasker general / Re: Simulator for serial port data
« on: September 10, 2009, 11:21:33 PM »
Hello Mark, Step 2 failed. I am not receiving anything using the simulated receive.
SERIAL_SUPPORT_DMA   is set.
so i had to set tInterfaceParameters.ucDMAConfig = 0;

15
µTasker general / still no data read on serial port
« on: September 10, 2009, 05:44:53 PM »
Yes, I am working with the SAM7X
Mapped COM3 on PC to SERIAL_PORT_0.
Running the simulation with the GPS sentences coming in on the COM port:
while ((length = fnMsgs(SerialPortID)) != 0)
SerialPortID= 19
length=52428-----> and the buffer contains garbage.
My code below.

The task is running at 1 second rate.

#include "config.h"
#define OWN_TASK                 TASK_MY_FIRST_TASK
//Prototypes
void setUart(unsigned char mode);
// Global variables
static QUEUE_HANDLE SerialPortID;      // quehandler for serialport 2


extern void fnMyFirstTask(TTASKTABLE *ptrTaskTable)
{
   QUEUE_TRANSFER length;
    unsigned char ucInputBuffer[100];
  static int iState = 0;
  static unsigned char ucCounter = 0;
  static const char LCDdsp[] = " From Lav's task";      // display message from present cursor position
  if (iState== 0)
   {   
      setUart(FOR_READ ); //Rx only
      iState = 1;
        }
while ((length = fnMsgs(SerialPortID)) != 0) {    // get number of waiting bytes
        if (length > sizeof(ucInputBuffer)) {     // ensure buffer can’t be overrun
            length = sizeof(ucInputBuffer);
        }
        fnRead(SerialPortID, ucInputBuffer, length);     // read to a local buffer
    }
  //  fnDebugMsg("Hello, World! Test number ");
   /* fnDebugDec(ucCounter++, sizeof(ucCounter));
    fnDebugMsg("\r\n");*/
   TOGGLE_LAV_OUT() ;
   fnDoLCD_com_text(E_LCD_TEXT, (unsigned char *)LCDdsp, (sizeof(LCDdsp) - 1));
   //uTaskerStateChange(OWN_TASK, UTASKER_GO);                // switch to polling mode of operation
}

void setUart(unsigned char mode)
{
   TTYTABLE tInterfaceParameters;       //table for passing information to driver
   
   tInterfaceParameters.Channel = SERIAL_PORT_0;  // serial 0, 1, 2, 3, 4, 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;      // outpu buffer size
      tInterfaceParameters.Task_to_wake = TASK_MY_FIRST_TASK;
   tInterfaceParameters.Config = (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
   
}

Pages: [1] 2