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

Pages: 1 ... 4 5 [6] 7
76
µ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.

Thanks,
Aaron

77
NXPTM M522XX, KINETIS and i.MX RT / Re: uart1 appearing on uart0
« on: March 20, 2009, 04:17:19 PM »
I've tried the M52235evb and my board and the simulator.  I think this means it's in the code somewhere...
I have more details.

On the target everything appears on uart0.

In the simulator I haven't gotten the PC uart to work yet, and am using the telnet connection instead.  In the simulator only messages sent to the DebugHandle are displayed. 

Aaron

78
NXPTM M522XX, KINETIS and i.MX RT / Re: uart1 appearing on uart0
« on: March 20, 2009, 06:19:46 AM »
In the simulator:
SerialPortID = 0x0a
SerialPortID1 = 0x0b

I haven't verified the above on the target, but that's where I discovered the behavior.

When you say the UART was opened twice with the same interface number, do you mean that
Code: [Select]
tInterfaceParameters.Channel = UART1; is set with the wrong value when calling
Code: [Select]

 if ((SerialPortID1 = fnOpen( TYPE_TTY, ucDriverMode, &tInterfaceParameters )) != 0) { // open or change the channel with defined configurations (initially inactive)
??

There wouldn't be anything related to the
Code: [Select]
tInterfaceParameters.Task_to_wake = OWN_TASK; being used in both fnSetNewSerialMode2() and fnSetNewSerialMode()  causing this, could there?

Thanks,
Aaron

79
NXPTM M522XX, KINETIS and i.MX RT / uart1 appearing on uart0
« on: March 20, 2009, 12:48:59 AM »
Mark,

I'm trying to setup uart1, and I've followed http://www.utasker.com/forum/index.php?topic=54.msg220#msg220 as best as I can.  But when I send data to the uart1 handle, it is still appearing on uart0.

My test code:
Code: [Select]
void fnMyFirstTask(TTASKTABLE *ptrTaskTable){
unsigned char buffer[]="test code\r\n";

        fnDebugMsg("spid1: ");
fnPrint ((unsigned char *)buffer, SerialPortID);//should appear on uart0
fnDebugMsg("spid2: ");
fnPrint ((unsigned char *)buffer, DebugHandle); //should appear on uart0
fnDebugMsg("spid3: ");
fnPrint ((unsigned char *)buffer, SerialPortID1); //should appear on uart1
}

uart defines in app_hw_m5223x.h
Code: [Select]
//#define DEMO_UART    0                                           // use UART 0
        //#define PPP_UART     1                                           // use UART 1 for PPP
        #define UART0 0
#define UART1 1 //uart1

my configuration code in application.c:
Code: [Select]
#ifdef SERIAL_INTERFACE
    QUEUE_HANDLE SerialPortID;                                          // serial port0 handle
QUEUE_HANDLE SerialPortID1;                                          // serial port1 handle
#endif

//in fnApplication
#ifdef SERIAL_INTERFACE                                                  // this serial interface is used for debug output and menu based control
        if (!fnSetNewSerialMode(FOR_I_O)) {                              // open serial port for I/O
            return;                                                      // if the serial port could not be opened we quit
        }
        DebugHandle = SerialPortID;                                      // assign our serial interface as debug port
        if (!fnSetNewSerialMode2(FOR_I_O)) {                              // open serial port for I/O
            return;                                                      // if the serial port could not be opened we quit
        }
#endif

and the serial uart configuration:
Code: [Select]
//configure uart1
extern QUEUE_HANDLE fnSetNewSerialMode2(unsigned char ucDriverMode)
{
    TTYTABLE tInterfaceParameters;                                       // table for passing information to driver
    tInterfaceParameters.Channel = UART1;                            // set UART channel for serial use
    tInterfaceParameters.ucSpeed = temp_pars->temp_parameters.ucSerialSpeed; // 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 = OWN_TASK;                        // wake self when messages have been received
    #ifdef SUPPORT_FLOW_HIGH_LOW
    tInterfaceParameters.ucFlowHighWater = temp_pars->temp_parameters.ucFlowHigh;// set the flow control high and low water levels in %
    tInterfaceParameters.ucFlowLowWater = temp_pars->temp_parameters.ucFlowLow;
    #endif
    tInterfaceParameters.usConfig = temp_pars->temp_parameters.usSerialMode;
    #ifdef TEST_MSG_MODE
    tInterfaceParameters.usConfig |= (MSG_MODE);
        #if defined (TEST_MSG_CNT_MODE) && defined (SUPPORT_MSG_CNT)
    tInterfaceParameters.usConfig |= (MSG_MODE_RX_CNT);
        #endif
    tInterfaceParameters.usConfig &= ~USE_XON_OFF;
    tInterfaceParameters.ucMessageTerminator = '\r';
    #endif
    #ifdef SERIAL_SUPPORT_DMA
    tInterfaceParameters.ucDMAConfig = UART_TX_DMA;                      // activate DMA on transmission
  //tInterfaceParameters.ucDMAConfig |= (UART_RX_DMA | UART_RX_DMA_HALF_BUFFER); // test half buffer DMA reception
    #endif
    if ((SerialPortID1 = fnOpen( TYPE_TTY, ucDriverMode, &tInterfaceParameters )) != 0) { // open or change the channel with defined configurations (initially inactive)
        fnDriver( SerialPortID1, ( TX_ON | RX_ON ), 0 );                  // enable rx and tx
        if (tInterfaceParameters.usConfig & RTS_CTS) {                   // {8}
            fnDriver( SerialPortID1, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0 ); // activate CTS interrupt when working with HW flow control (this returns also the present control line states)
            fnDriver( SerialPortID1, (MODIFY_CONTROL | SET_RTS), 0 );     // activate RTS line when working with HW flow control
        }
    }
    return SerialPortID1;
}

If anyone can provide some guidance, that would be great.

Thanks,
Aaron

80
µTasker general / Re: How can I negotiate low speed first?
« on: February 18, 2009, 10:57:56 PM »
Mark,

Looking at the code below, once I call fnMIIwrite(), how would I know if link is established?
Code: [Select]
if (!(pars->usMode & (LAN_10M | LAN_100M))) {
      usMIIData |= PHY_R0_RAN;                                           // start autonegotiation
  }
  else {
      if (pars->usMode & FULL_DUPLEX) {
          usMIIData |= PHY_R0_DPLX;                                      // set full duplex operation
      }
      else {
          usMIIData &= ~PHY_R0_DPLX;                                     // set half-duplex operation
      }

      if (pars->usMode & LAN_100M) {
          usMIIData |= PHY_R0_DR;                                        // set manual 100Mb
      }
      else {
          usMIIData &= ~PHY_R0_DR;                                       // set manual 10Mb
      }
  }
  fnMIIwrite(PHY_ADDRESS, PHY_REG_CR, usMIIData);                        // command operating mode of PHY

Your system already seems to handle loosing link (hot unplug cable) and re-establishing link (hot plug cable).  Is this not configuring the PHY each time?

Since this Freescale chip can not be guaranteed to auto negotiate, I need a software solution anyway.   I know that's what the Internich folks ended up doing.   I figured I should just be able to change the order.

Thanks,
Aaron

81
µTasker general / How can I negotiate low speed first?
« on: February 18, 2009, 07:27:31 PM »
For the freescale chips there is a 100mW power savings if 10M lan speed is selected over 100M.  The typical protocol for selecting speeds is to negotiate the highest speed possible, and only go slower when that fails.

But from a "green" point of view I can save 100mW if I go for 10M first.  How can the order be changed, such that first 10M is tried, then if that fails (maybe the user only has 100/1000 hubs) it tries 100M?

Are there some other gotchas that I'm not aware of, or need to consider when changing the order?
Our little server doesn't need 100M speed or capacity, so that won't be an issue.

Thanks,
Aaron

82
Just updating to close this thread.  I forgot to pull up the center tap of the magnetics.  Now I have link and can serve up web pages.

Thanks for the help.
Aaron

83
Mark,

The pulses pretty much look the same. print_006 is my board TXp & TXn, print_007 is the eval board.
The Rbias is 1% 12.4k.  I only have one transformer, a magjack SI-50196-F, integrated transformer and jack.
But I even took the H2019 off the eval board, ran little wires to it and a jack, with nearly the same resultant waveforms and still no link.

One odd think I've found is that if I have the bypass caps on the centertap of the magnetics, the Tx pulse becomes a runt.  The attached plots are with no bypass caps on the centertaps, just the series connected 49.9ohm resistors: TXp--R--CT--R--TXn.

Keep the ideas coming please.

Aaron


84
I'm looking for guidance on trouble shooting the lack of link on my board.  I've run out of ideas.
I can program the 52235eval board, and it establishes link and runs, as long as I force the mode to 10Mb or 100Mb.  But using the same S19 file on my board, I can not get the link to establish. 
I've tried both the utasker and the coldfire lite systems and I get the same result.
I'm pretty sure it's my hardware, but I don't understand this chip enough to trouble shoot it.

What is going on when the chip is trying to establish link?  How can I monitor it?

Thanks,
Aaron

85
µTasker general / SSDP protocol
« on: December 09, 2008, 05:17:55 PM »
Has anyone implemented SSDP?  We are looking to be compatible with systems that use SSDP for device discovery on a LAN.

Aaron

86
µTasker general / unhandled exception in simulator
« on: November 26, 2008, 07:53:57 PM »
This happens at random, while the simulator is just sitting there running.  I'm not interacting with it at all.

Code: [Select]
First-chance exception at 0x0046a1d7 in uTaskerV1-3.exe: 0xC0000005: Access violation writing location 0x00000000.
Unhandled exception at 0x0046a1d7 in uTaskerV1-3.exe: 0xC0000005: Access violation writing location 0x00000000.
The program '[2936] uTaskerV1-3.exe: Native' has exited with code 0 (0x0).


Is this normal?
Aaron

87
µTasker general / Re: static web pages or hard coded html
« on: November 25, 2008, 01:39:18 AM »
Thanks Mark,

I think I can make a solution from your answers.

Aaron

88
µTasker general / static web pages or hard coded html
« on: November 25, 2008, 12:47:12 AM »
Mark,

I'm trying to figure out how to hard code my web pages into the flash, so that they don't have to be up loaded later.  I want the S19 file to be all inclusive, program and initial set of web files.
I'd like to keep the option of updating the files via ftp later though.

I've looked through the documentation and I can't find it.  Is this an option?
I did find SUPPORT_INTERNAL_HTML_FILES and the "one line" defined files.  But this doesn't appear to support binary files, like images.

Thanks,
Aaron

89
µTasker general / Re: Google's Chrome gives error
« on: November 24, 2008, 10:31:43 PM »
Thanks Mark.  I'll put that on the back burner for now.  Maybe when I'm done with my project, a new SP will be available which will address it.  Either way it's not critical, specially since Chrome is still beta.

Aaron

90
µTasker general / Google's Chrome gives error
« on: November 24, 2008, 10:05:04 PM »
Has anyone gotten Google's Chrome to work on the web server?
I get a weird error:

This webpage is not available.
The webpage at http://192.168.10.91/ might be temporarily down or it may have moved permanently to a new web address.
  More information on this error
Below is the original error message

Error 320 (net::ERR_INVALID_RESPONSE): Unknown error.

Aaron

Pages: 1 ... 4 5 [6] 7