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
1
We have a project where after some unknown event happens, the FEC stops triggering the RXF interrupt.  It could be minutes, could be days before the event happens.  Wiresharking hasn't shown anything suspicious. Tx is still working, in fact, our clue that there is a problem is that the device is refreshing its ARP table on its 20 minute boundary but doesn't listen to the response.
 
Things I've checked when this occurs:
EBERR is 0
RXF is 0
RXB is usually 1, but that mask is not set
ETHR_EN is 1
RDAR is 1
 
 
Also, not every device seems to do this.  Out of 100 devices probably 5-10 exhibit this behavior.
 
Any help in how to trouble shoot this would be great.
Thanks,
Aaron

2
We have a mature product that was developed on CW7.  We've ported it over to CW10.4, and have found that some boards, identical in measured 25Mhz xtal input, are running about 20% slower.  40Mhz instead of 50Mhz.
This is causing the uart baud rate calculations to be wrong among other things.
Below is the pll initialization function.  I've checked the LOCK bit in SYNSR and it indicates that the PLL is locked.
 
Code: [Select]
void pll_init(void)
{
  MCF_CLOCK_CCHR =0x05; // The PLL pre divider - 25MHz / 5 = 5MHz
 
  /* The PLL pre-divider affects this!!!
  * Multiply 25Mhz reference crystal /CCHR by 10 to acheive system clock of 50Mhz --> MCF_CLOCK_SYNCR_MFD(3)
  */
 
  MCF_CLOCK_SYNCR = MCF_CLOCK_SYNCR_MFD(3) | MCF_CLOCK_SYNCR_CLKSRC| MCF_CLOCK_SYNCR_PLLMODE | MCF_CLOCK_SYNCR_PLLEN ;
 
  while (!(MCF_CLOCK_SYNSR & MCF_CLOCK_SYNSR_LOCK))
  {
  }
}

 
I've tried erasing the chip completely and then re-programming to no avail.  If I load up one of the S19 files that was generated with CW7, then there are no issues with any of the boards.
 
chip markings are different only in the third line:
good: qaaq932
bad: qea1042

Any ideas on how to correct this would be greatly appreciated!
Aaron

3
NXPTM M522XX, KINETIS and i.MX RT / reducing ram footprint
« on: October 10, 2012, 09:01:54 PM »
I'm not sure how the other platforms handle this, but in CW 7.2 the following code still uses 24 bytes of ram, as verified by the xMAP file.
Code: [Select]
const CHAR *cMimeTable[] = {                                         // keep the ordering in the table to match the MIME type defines below!!
        (const CHAR *)"HTM",                                             // HTML file - will be interpreted by web server
        (const CHAR *)"JPG",                                             // JPG image
        (const CHAR *)"GIF",                                             // GIF image
        (const CHAR *)"CSS",                                             // CSS Cascading Style Sheets
        (const CHAR *)"JS",                                              // Java script
        (const CHAR *)"BIN",                                             // binary data file
        (const CHAR *)"TXT",                                             // text data file
        (const CHAR *)"ICO",                                             // icon
        (const CHAR *)"???",                                             // all other types will be displayed as unknown
    };

Adding const after the *, not only forces the pointers into flash, but also the values being pointed to:
Code: [Select]
const CHAR * const cMimeTable[] = {                                         // keep the ordering in the table to match the MIME type defines below!!
        (const CHAR *)"HTM",                                             // HTML file - will be interpreted by web server
        (const CHAR *)"JPG",                                             // JPG image
        (const CHAR *)"GIF",                                             // GIF image
        (const CHAR *)"CSS",                                             // CSS Cascading Style Sheets
        (const CHAR *)"JS",                                              // Java script
        (const CHAR *)"BIN",                                             // binary data file
        (const CHAR *)"TXT",                                             // text data file
        (const CHAR *)"ICO",                                             // icon
        (const CHAR *)"???",                                             // all other types will be displayed as unknown
    };

Be sure to update the externs for this also.

Aaron

4
We are starting to accumulate customer calls that turn out to be a lack of DNS resolution.  However, as shown in the function below, we are hitting the "Some Unknown Error" case, and no number is printed out.  Of course this is something that we are not able to reproduce here, so I'm looking for ideas on what sorts of things can cause this.

Code: [Select]
//local dns function for nslookup via the telnet client.
static void fnDNSListner(unsigned char ucEvent, unsigned char *ptrIP){
CHAR cBuf[21];

    switch (ucEvent) {
case DNS_EVENT_SUCCESS:
uStrcpy(cBuf, "DNS answer: ");
fnDebugMsg(cBuf);
//fnDebugMsg("DNS answer: ");
fnIPStr(ptrIP, cBuf);
break;
default:// DNS error message
uStrcpy(cBuf, "DNS Error: ");
fnDebugMsg(cBuf);
if (ucEvent == DNS_ERROR_NO_ARP_RES) {
uStrcpy(cBuf, "DNS_ERROR_NO_ARP_RES");
}else if (ucEvent == DNS_ERROR_TIMEOUT) {
uStrcpy(cBuf, "DNS_ERROR_TIMEOUT");
}else if (ucEvent == DNS_ERROR_GENERAL) {
uStrcpy(cBuf, "DNS_ERROR_GENERAL");
}else if (ucEvent == DNS_OPCODE_ERROR) {
uStrcpy(cBuf, "DNS_OPCODE_ERROR");
} else {
uStrcpy(cBuf, "Some Unknown Error:");
fnDebugMsg(cBuf);
fnDebugDec(ucEvent, 0,cBuf);
}
break;
    }
fnDebugMsg(cBuf);
fnDebugMsg("\r\n");
}


Thanks,
Aaron

5
Mark,

I just tried updating the web files (using ftp) while running the simulator, and the simulator dies with an "access violation" on this line in M5223X.c.
fnRAM_code();                                                        // execute from SRAM

I erased the flash_M5223x.ini file, to start from scratch, but it still fails.

Any ideas on what I should look at?

Thanks,
Aaron

EDIT: By the way I'm using the last VC2010 project files for 1.3 that you posted here: http://www.utasker.com/forum/index.php?topic=1111.0
I also get the same error if I telnet to the simulator and do a "factory restore" int he admin menu, or "save" in the LAN configuration menu.

6
µTasker general / LAN_REPORT_ACTIVITY activity LED stops after a while
« on: December 08, 2010, 10:20:17 PM »
Mark,

We've noticed that when LAN_REPORT_ACTIVITY is set, the activity LED stops after a while  ???.  The only way to get it back to normal is by resetting the chip (MCF52233).  The link LED still works and is updated normally when this occurs.  And for completeness, yes there is network traffic to the device. 

Any ideas?

Aaron

7
µTasker general / Can I disable telnet idle timeout?
« on: December 07, 2010, 05:43:12 PM »
Is there an easy way to disable the telnet idle timeout?  When I traced through the code, it looks like the value in the timeout is always evaluated for time, I didn't see a way to turn it off, or make it infinite.

Since we are using telnet as a machine interface, not just for humans, it would be nice be able to make it not time out.

Thanks,
Aaron

8
Mark,

We found an issue under the following circumstances:
1) Using the software random sequence generator (as opposed to a hardware PRNG).
2) Multiple devices powering up at the same time on the same network, including the router (think power outage).

When this happens all the devices are asking for DHCP at around the same time using an identical XID.  Thus multiple devices get the same IP address.

It appears that in fnDHCPListner()
Code: [Select]
data += IPV4_LENGTH + 216;  // skip siaddr, chaddr, sname, file and get all info from the options fieldthe chaddr isn't being checked against the devices own MAC.

Is there any particular reason to not do this comparison?  We are routinely getting two to five devices installed per location (yay for our side), and have seen this behavior several times.

Thanks,
Aaron


9
µTasker general / Increase parameter timeout from 3 minutes to 5 minutes
« on: November 05, 2010, 11:21:29 PM »
I'm trying to increase the timeout for network parameter validation from 3 minutes to 5 minutes, but I just can't seem to find how this is set.  Can someone point me in the right direction?
I'm using version 1.3

Thanks,
Aaron

10
µTasker general / Mutexes and semaphores?
« on: October 12, 2010, 12:16:10 AM »
Mark,

A while back you mentioned that you were going to look into adding mutexes and semaphores.  Have there been any developments in that area?

Thanks,
Aaron

11
µTasker general / DHCP fails when using option overload 52
« on: August 03, 2010, 06:24:25 PM »
Mark,

We found a router, Netgear FVS318, that is sending option 52 and thus causing utasker dhcp to fail.
The cause of the failure is that in fnDoRxDHCP() the case issues a return instead of a break:
Code: [Select]
case DHCP_OPT_OVERLOAD:
                        return NO_SUPPORT_FOR_DHCP_OVERLOAD;             // we don't process overload messages

Because of the return, we never get to the line that saves the offered IP:
Code: [Select]
uMemcpy(ucDHCP_IP, usOfferedIP, IPV4_LENGTH);                // save the offered IP
Can the overload just be ignored, and use a break?  Or is there some better way of handling this case?

Thanks,
Aaron

12
NXPTM M522XX, KINETIS and i.MX RT / OUR_HEAP_SIZE increments
« on: July 12, 2010, 10:00:07 PM »
Mark,

My project has run to the limits of the chip I'm using, and I ran out of stack space.  After a lot of squeezing here and there, I changed the OUR_HEAP_SIZE define.
Code: [Select]
#define OUR_HEAP_SIZE (HEAP_REQUIREMENTS)((22*1024)*MEM_FACTOR)
to
Code: [Select]
#define OUR_HEAP_SIZE (HEAP_REQUIREMENTS)((43*512)*MEM_FACTOR)

I don't know enough about the memory structure to know if this is an issue or not.  Things seem to be working for now.
HEAP   Free 0x0194 from 0x5600
STACK   Unused 0x00d7
Prior to the heap change, I had no stack left. 

What are your thoughts on changing from 1024 to 512? 
Thanks,
Aaron

13
µTasker general / dhcp and DNS search order
« on: June 21, 2010, 06:39:44 PM »
Now that our product is out in "the wild" we've found that a fair amount of dhcp servers are giving "bogus" DNS server information.  After poking around in the utasker code, I found that fnReadDHCP_IP() is setup to return the last IP of possibly multiple DNS server IP addresses.

Example option 6 response:
IP Address: 2.2.2.2
IP Address: 3.3.3.3
IP Address: 192.168.10.2
IP Address: 192.168.10.1
fnReadDHCP_IP() will return 192.168.10.1.

Is there a reason to use the last IP given, as opposed to the first one?
Please ignore the actual values of of the first two IPs, this is my testing of what to do when we receive bad DNS values.

Thanks,
Aaron

EDIT:
I've made the following change to fnReadDHCP_IP(), and so far so good.
Code: [Select]
//unsigned char *ptr = (*data + ucMsgLength - IPV4_LENGTH + 1);
unsigned char *ptr = (*data + 1);
But I'm not an Ethernet expert.  Are there times when this could cause problems for the other IPs that are passed in?

14
µTasker general / dhcp client ID
« on: May 13, 2010, 10:37:17 PM »
Has anyone tried putting in a client ID string into the dhcp request?  Any issues doing this?
Also looking at the existing dhcp structures, it looks like it would need to be added, in order to use it.
Suggestions?

Thanks,
Aaron

15
µTasker general / DNS bug when using the final '.' notation
« on: April 12, 2010, 06:36:08 PM »
Mark,

In fnResolveHostName() if the cHostNamePtr ends with a '.' eg. "www.google.com."  Then the string parsing fails, and DNS is left in the BUSY state, without ever having sent a UPD packet, nor triggering the timer to allow the task to complete or fail.

Below is my simple, but code bloated way of fixing it.  If you have a more elegant method, that would be welcomed.
Code: [Select]
if ((*cHostNamePtr) == '.') {                                    // still not at the end, skip dot
            cHostNamePtr++;
if ((*cHostNamePtr) == '\0') {                               // add ZERO, QTYPE and QCLASS
                uMemcpy(ucBuf, ucZeroQTypeClass, sizeof(ucZeroQTypeClass));
                uTaskerMonoTimer( OWN_TASK, DNS_RESEND_PERIOD, E_DNS_RESEND ); // monitor resolution
                                                                         // send the request
                fnSendUDP(DNSSocketNr, ucDNS_server_temp_ip, DNS_UDP_PORT, (unsigned char *)&UDP_Message.tUDP_Header, (unsigned short)(usTotal + 13 + sizeof(ucZeroQTypeClass)), TASK_DNS);
            }
        }
        else {
            if ((*cHostNamePtr) == '\0') {                               // add ZERO, QTYPE and QCLASS
                uMemcpy(ucBuf, ucZeroQTypeClass, sizeof(ucZeroQTypeClass));
                uTaskerMonoTimer( OWN_TASK, DNS_RESEND_PERIOD, E_DNS_RESEND ); // monitor resolution
                                                                         // send the request
                fnSendUDP(DNSSocketNr, ucDNS_server_temp_ip, DNS_UDP_PORT, (unsigned char *)&UDP_Message.tUDP_Header, (unsigned short)(usTotal + 13 + sizeof(ucZeroQTypeClass)), TASK_DNS);
            }
        }

Aaron

Pages: [1] 2 3