[#6439] ldr-utils: do not setup Windows serial port timeouts.

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#6439] ldr-utils: do not setup Windows serial port timeouts.

Submitted By: Ivo Shopov

Open Date

2011-01-10 07:06:04     Close Date

2011-06-01 09:28:02

Priority:

Medium     Assignee:

Mike Frysinger

Mingquan Pan

Stuart Henderson

Board:

EZBRD     Silicon Revision:

0.2

Resolution:

Fixed     Fixed In Release:

N/A

Processor:

BF526     

Host Operating System:

Windows

toolchain rev.:

win32-2010R1     kernel rev.:

-

State:

Closed     Found In Release:

2010R1-RC4

Is this bug repeatable?:

yes     

Summary: ldr-utils: do not setup Windows serial port timeouts.

Details:

 

If you run some serial port terminal like Hyper Terminal than "bfin-uclinux-ldr -l u-boot.ldr COM1" stuck in first DXE block. The problem is in windows COM1 timeouts. I manege to load the ldr file by first running the Ldrviewer by AD. It setup the windows COM1 timeout and than bfin-uclinux-ldr works.

I need to discard using the Ldrviewer. My solution is the attached software that setup the COM port timeouts like Ldrviewer. If you can include the following code in bfin-uclinux-ldr everything will be fine.

 

    COMMTIMEOUTS timeouts;

 

    if (!::GetCommTimeouts (m_hCommPort,&timeouts))

    {

        printf ( "CSerialCommHelper : Failed to Get Comm Timeouts Reason: %d",GetLastError());

        return E_FAIL;

    }

 

    timeouts.ReadIntervalTimeout                    = 2000;

    timeouts.ReadTotalTimeoutMultiplier        = 1;

    timeouts.ReadTotalTimeoutConstant            = 10;

    timeouts.WriteTotalTimeoutMultiplier    = 10;

    timeouts.WriteTotalTimeoutConstant        = 2000;

   

    if (!SetCommTimeouts(m_hCommPort, &timeouts))

    {

        printf ( "CSerialCommHelper :  Error setting time-outs. %d",GetLastError());

        return E_FAIL;

    }

 

Follow-ups

 

--- Stuart Henderson                                         2011-05-11 06:28:03

fix checked in to trunk.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

commtout.cpp    text/plain    1694    Ivo Shopov

commtout.exe    application/x-msdownload    155718    Ivo Shopov

Attachments

Outcomes