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]
NXPTM M522XX, KINETIS and i.MX RT / uart1 appearing on uart0
« on: March 20, 2009, 12:48:59 AM »

I'm trying to setup uart1, and I've followed 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]
    QUEUE_HANDLE SerialPortID;                                          // serial port0 handle
QUEUE_HANDLE SerialPortID1;                                          // serial port1 handle

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

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
    tInterfaceParameters.ucFlowHighWater = temp_pars->temp_parameters.ucFlowHigh;// set the flow control high and low water levels in %
    tInterfaceParameters.ucFlowLowWater = temp_pars->temp_parameters.ucFlowLow;
    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);
    tInterfaceParameters.usConfig &= ~USE_XON_OFF;
    tInterfaceParameters.ucMessageTerminator = '\r';
    tInterfaceParameters.ucDMAConfig = UART_TX_DMA;                      // activate DMA on transmission
  //tInterfaceParameters.ucDMAConfig |= (UART_RX_DMA | UART_RX_DMA_HALF_BUFFER); // test half buffer DMA reception
    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.


µ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.


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?


µ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.


µ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?

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

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.


µ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 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.


NXPTM M522XX, KINETIS and i.MX RT / target board ethernet not working
« on: November 24, 2008, 07:02:46 PM »
I just finished the simulator part of the tutorial and it all worked fine, after a few SP8 discrepancies were straightened out.
Now I am trying to get the target board, 52235evb, going, and I get LED1 blinking from the watchdog, and a few blinks of the ACT LED, but that is it.  The ethernet doesn't appear to be getting started, or something.  The link LED on the evb and on the hub are not lit.

I know my hardware is good, because it works with the Freescale software.

I'm using codewarrior 7.0 build 15
uTasker 1.3.0 SP8

I'm not even sure where to start looking.
Thanks for any help,

Pages: 1 2 [3]