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.


Topics - ZeroOne

Pages: [1]
1
µTasker general / "Stack up" messages to tasks
« on: March 24, 2008, 10:23:07 AM »
Hi

Is it possible to "stack up" messages to a task, for them to be read later on?

For instance:

funktion1 is set run every 10 sek. funktion2 is running all the time (UTASKER_GO) sending internal messages to funktion1.

Is it possible to read all the messages send by funktion2 every 10 sek? or will funktion1 respond everytime a message arrives?

ZeroOne

2
µTasker general / UART / Serial and the simulator problem
« on: March 15, 2008, 10:01:44 AM »
Hi

I have a problem with the UART/serial interface and the simulator.

I have the forlowing code in a file called MyUart.c:
Code: [Select]
//includes
#include "config.h"

//Prototypes
void setUart(unsigned char mode);

// Global variables
static QUEUE_HANDLE SerialPortID; // quehandler for serialport 0

//call functions
void fnSerialTest(TTASKTABLE *ptrTaskTable)         // my task task in polling mode (at the moment)
{
static int iState = 0;

        if (iState== 0)
{   
setUart(FOR_I_O); //Rx & Tx
iState = 1;
        }
fnWrite(SerialPortID, (unsigned char *)"Hello world", uStrlen("Hello world"));
}

void setUart(unsigned char mode)
{
TTYTABLE tInterfaceParameters;       //table for passing information to driver

tInterfaceParameters.Channel = 0;  // serial 0, 1, 2, 3, 4, etc.
  tInterfaceParameters.ucSpeed =  SERIAL_BAUD_19200; // 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_MYUART;
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

}

In TaskConfig.h I have the forlowing entrys:
Code: [Select]
#define TASK_MYUART 'u'
...
extern void fnSerialTest(TTASKTABLE *ptrTaskTable);
...
TASK_MYUART,   //ctNodes
...
{ "uart", fnSerialTest,    NO_QUE,      0, 0, UTASKER_GO}, //ctTaskTable

and in app_hw_m5223x.h:
Code: [Select]
#define SERIAL_PORT_0   '1'
This is correct since I use channel zero and com1 for communication.

The problem is that nothing is written to com1 using the simulator.

When i debug in MyUart.c at:
Code: [Select]
if ( (SerialPortID = fnOpen(TYPE_TTY, mode, &tInterfaceParameters)) != 0 )
fnOpen() doesn't return to this line. Instad it returns to
Code: [Select]
if ((SerialPortID = fnOpen( TYPE_TTY, ucDriverMode, &tInterfaceParameters )) != 0)
in application.c.

I am using uTasker sp6.

ZeroOne

3
Hi

I am using a crossed LAN cable between the M52233DEMO (running uTasker) and my PC and there seems to be no connection what so ever between the two. The netmask on the PC is the same as the one one the demoboard. The funny thing is when the M52233DEMO is connected to a router I have no problem connecting to M52233DEMO using ftp or http. I can upload webpages, view them and use them.

I tried disabling the DHCP i config.h, but the result is the same.

ZeroOne

Ps. I did check the cable and it is ok.

4
Hej.

I'm working through the coldfire tutorial and at the point where uTasker is suppose to create the file FLASH_M5223x.ini to store the webpages it simply doesn't. When I close down uTasker and start it up again I have to upload alle the webpages again.
Does anyone know what the problem might be?

ZeroOne

ps. I close doen uTasker by using File|Exit

Pages: [1]