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 - alager

Pages: 1 [2] 3
µTasker general / Using the queue system that's already in place
« on: April 08, 2010, 07:45:56 PM »
Rather than make my own fifo system for some data, I'd like to leverage the queue system that is already in place.
Has anyone done this?  If so can you provide some guidance?
I know I need to add 1 to PHYSICAL_QUEUES, but after that I get lost.


µTasker general / DHCP and the BROADCAST_FLAG
« on: January 22, 2010, 01:26:26 AM »

I was pointed to these articles by a co-worker: and

I've found that embedded routers do not always fully comply with the DHCP standard (or DNS).
Looking through the uTasker code, it looks like the BROADCAST_FLAG is being set in the DHCP header cRequestHeader.

Have you run into any compatibility issues with this bit being set (or not being set)?
We haven't yet, but would like to know in advance if it could be a problem.


µTasker general / certain routers not working...even with simulator
« on: December 23, 2009, 04:30:40 AM »

I've have two routers so far with this issue, one was a Belkin and the other is a 2wire 2700HG-B.  Something in the uTasker isn't working with them.
The Belkin we updated the firmware and it started working with the uTasker project.  The 2wire already has the latest firmware and it is a very prevalent brand here in the US. 
The issue is duplicatable in the simulator as well.  In the simulator the link and activity lights never blink.

There is an interrupt every once in a while which triggers fnNetworkIndicator() and it hits both ACTIVITY_LED_ON() and TURN_LINK_LED_ON() and it never hits LINK_DOWN_LEDS().
The heartbeat works fine on PORT TC bit 0.

There are never any DHCP requests sent out on wireshark, even though the code is going through fnSendDHCP().  It's very bizzar to me.
I have the network settings set to 100MB.

Any ideas?


µTasker general / why are the packets only 128 bytes long?
« on: December 18, 2009, 06:14:03 PM »
Is there anything in uTasker that would cause the PC (Linux) side of ethernet communications to only send 128 byte length packets?
I've attached a wireshark capture (ip.addr==  It shows a test application that just responds with 1024 'x' characters, but only 128 are sent.  I stopped it after the first packet, but it would continue with 128 length packets until all 1024 are sent.

I've never run into this before, so I thought I'd start here.


µTasker general / writing data to flash
« on: December 01, 2009, 01:41:57 AM »

We are using the telnet interface to communicate to our servers and would like to be able to pass base64 data from the server to uTasker and then save it to flash.  This is actually for a firmware upgrade function.  I thought I could base it on some of the code from the ftp.c, but in the case for STOR, after the ptrFile and ucMimeType are set, I don't see where data is actually being written to flash, it looks like the function returns shortly after that.

If you could point me in the right direction that would be great.


µTasker general / OpenDHCPServer issue
« on: November 10, 2009, 04:16:26 AM »
Has anyone used the OpenDHCPServer from SourceForge?
When we run ours we are getting a message regarding the uTasker based devices as follows:
DHCP Request from Client 10:65:a3:00:00:6a () without Discovery, ignored
and no IP address is being assigned to our devices.

Thanks for your help,

µTasker general / trying to use fnDelayResetBoard()
« on: October 05, 2009, 08:57:20 PM »

I'm using the secret command "MAC" for factory configuration.  I've found that after I set the MAC, the system reboots faster than the UART can output the message "\r\nConfiguration saved\r\n". (~23ms)
So I tried removing the static qualifier on fnDelayResetBoard() and called it instead, but then the card never resets.

Code: [Select]
else {
            fnDoFlash(DO_SAVE_PARS, 0);                                  // save the new MAC address
            //fnResetBoard();                                              // reset so that it strats with the new values
   fnDelayResetBoard(); //delay to allow UART to complete, then reset with new values.
any ideas on how to make this work?

BTW, in the simulator, the message is printed fine with the regular fnResetBoard() function call.  I think this is a windows simulator buffering trick though.


NXPTM M522XX, KINETIS and i.MX RT / port 52233 to 52236?
« on: September 03, 2009, 08:29:51 PM »

There are some availability issues with the mcf52233, but we found some mcf52236, which appear to be pin compatible, with the only difference I can find being the 60Mhz vs 50Mhz respectively.  Looking through app_hw_m5223x.h, I see there are #defines for making sure the clocks are correct, but I don't see what needs to be changed in order to use the 50Mhz clock.
Can you provide some guidance?


okay, I found these....
Code: [Select]
#define CRYSTAL_FREQ                   25000000                  // 25 MHz oscillator / crystal input
#define PRE_DIVIDER                    5                         // warning: in first silicon this can not be changed!
#define OSCCLK                         (CRYSTAL_FREQ / PRE_DIVIDER)
#define PLL_MUL                        12                        // 60MHz operation

Do I just change the PLL_MUL to 10?  Are there any issues with Ethernet timing that you are aware of, when using this chip?


µTasker general / Linked list in CW7.1
« on: June 12, 2009, 09:18:41 PM »
I'm trying to make a buffer that grows as the size of the data does, and so I'm trying  a linked list.  The code I have compiles and works fine in MSVC and the simulator, but CW won't compile it. 
It says:
Code: [Select]
Error   : illegal implicit conversion from 'unsigned long **' to 'unsigned long *' my_uart.c line 245     fnAddNode(&pList, RXBuffer); 
Error   : illegal implicit conversion from 'unsigned long *' to 'unsigned long **' my_util.c line 107      pTmpNode = *pTmpNode; 
I've following the examples from

Here is my code:
Code: [Select]
unsigned long *pList=NULL;
void fnProcessRx(CHAR *RXBuffer, QUEUE_TRANSFER length){
    fnAddNode(&pList, RXBuffer);  //this line fails in the compiler (line 245)

Code: [Select]
//take an array and allocate a chunk of ram for it on the heap
//then copy the array into the data section
//structure is an array: |ptr|string data|
void fnAddNode(unsigned long** pNode, CHAR * data){
unsigned long * pTmp;
unsigned long **pTmpNode;

pTmpNode = pNode;

pTmp = uMalloc(uStrlen(data)+1+4); //extra bytes added, one for the NULL string terminator and 4 for the address pointer
if (pTmp == NULL) {
//return NULL;
*pTmp=NULL; //make sure that the new pointer is NULL

uStrcpy((CHAR*)(pTmp+1),data); //copy the data into the new link node

//go to the end of the list to add
if (pTmpNode != NULL) {
while (*pTmpNode != NULL) {
pTmpNode = *pTmpNode;  //this line fails to compile in CW
*pTmpNode = pTmp;
//the list appears to be empty
//*pNode = pTmp;
*pNode = pTmp;

If anyone has any pointers (no pun intended) that would be great!


µTasker general / user file guide
« on: May 27, 2009, 12:47:39 AM »

I have two things I'd like to do.  One is to create a file in RAM, that is accessible by file name in a web browser.  The reason for RAM is that its contents will be changing a lot, and I don't want to wear out the flash.  I'm going to be updating a web page in near real time using Ajax techniques.

The other thing is how do I go about accessing a file (read & parse it) that has been ftp'ed or posted to the uTasker file system?  I want to put a file in the file system that will contain parameters that direct the system what to do.  The name will be a known constant. 


µTasker general / Multiple telnet connections
« on: May 22, 2009, 10:42:16 PM »
I'm trying to get multiple telnet connections into to the telnet server, but uTasker is only allowing 1.
The second client sends the [SYN], and the server responds with [RST][ACK].

I have one automated telnet client in the uTasker project that is calling out every 10 seconds.
And I need to let two clients call into the device.

With one client connected my heap and stack are:
HEAP   Free 0x0c9c from 0x6400
STACK   Unused 0x09cb
Which should be plenty to allow the second incomming session.

What else do I need to check?


The messages coming from my interface hardware on uart0 always (for now) end with <CR><LF>
When a message is sent:
fnRead read gives a length of 5 and will read the 5 characters

But the second message:
the buffer 'ucInputMessage' shows:
Code: [Select]
The <LF> from the first message is leftover and is now at the start of message two.
My message terminator is set to '\r' aka <CR>.

How can I get this leftover 0x0a to be read during the initial message, so the pointers are in the correct spots?
Here is the code section from application.c where I'm running into this issue:
Code: [Select]
    while (fnMsgs(SerialPortID) != 0) {
        unsigned char ucLength;
        fnRead( SerialPortID, &ucLength, 1);                     // get message length
        Length = fnRead( SerialPortID, ucInputMessage, ucLength);


NXPTM M522XX, KINETIS and i.MX RT / fnRandom() not changing
« on: April 28, 2009, 04:52:36 PM »
When I run my code on the simulator the fnRandom() call returns a random number.  However when I run it on the target MCF52233CAF, I get the same number over and over again: 32767.
I even tried calling fnInitialiseRND() right before it each time...same number.

Any ideas?


µTasker general / Visual Studio help
« on: April 24, 2009, 07:44:39 PM »
I know this isn't uTasker directly, but I am working on a uTasker project.   ;)

I use F5 to start debugging, and since I'm lazy, I let that do the build also.  But I accidentally clicked the check box to "don't warn me anymore" when there are errors in the build.  Now I can't figure out how to turn that warning back on.
Any ideas?


µTasker general / How to change MAC address?
« on: April 16, 2009, 04:19:26 PM »
I'm trying to change the MAC address in the simulator by changing the following line in application.c
Code: [Select]
//{0x00, 0x11, 0x22, 0x33, 0x44, 0xf1},   // ucOurMAC - when no other value can be read from parameters this will be used
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},     
I think the comment indicates my problem.  So how can I get this value to be used when there is a valid set of parameters already?  Or to put it another way, how can I erase the parameters in the simulator?

I know in my target I can just erase the chip, but that construct doesn't exist for the simulator, that I can find.


Pages: 1 [2] 3