Read/Write priotrity of serial interfaces - netdcu9

  • We have an issue, that we lose some data packages over the rs232 interface of the netdcu9. At the moment we are not sure where the packages are lost but we wonder how wince is handling rs232 data.


    The load on our system can raise up to 100% depending if something has to be drawn on the display or not. How is incoming data handled by wince? Is there any kernel thread which catches the data from rs232 and if yes, is it possible to change its priority?
    Is there also a kernel thread for sending the data or is it a blocking send?

  • Hello,
    very simple summary:
    - Read-/WriteFile reads/writes data to a SW buffer and returns according COMMTIMEOUTS structure stettings. Evaluate return values and output parameters for details.
    - Call also GetLastError and ClearCommError for details
    - Data reception/transmisson is done in a thread which reads/writes data from HW buffer to SW buffer. This thread is interrupt controled.


    To increase priority try to set HKLM\Drivers\builtin\<yourcomx>\Priority256=DWORD:A. If it works you will see a kernel thread with this priority (this may not work for the serial debug line even if output is off(?)).

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Before I change the priority I need to know which the default priority is because the key doesn't exist in the registry. Do you have a tool to show all running kernel threads? Otherwise we need to investigate more time to write our own one.

  • Hello,
    assume default priority is about 103+55.


    Quote

    Do you have a tool to show all running kernel threads?

    .
    You can use Visual Studios Remote Process Viewer *or* CE Shell: command line -> enter "shell -c" -> help ...

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    I changed the priority settings of serial 2 to 111 (adding Priority256=111). After that I rebooted the device and checked the NK.exe process and it's threads,
    bu I can't find any thread with a priority of 111. Does the entry not work or is it only the priority of the irq?
    Are there any other settings for the com ports, we lose some packages so is there a kernel buffer for the data which can be sized up?

  • Hello,


    i will check it and provide you a solution after my vacation at the beginning of September.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.