CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2000
    Location
    Wisconsin
    Posts
    8

    Unhappy Serial Comm Interrupts

    I am working on creating a serial communications class for a 16 bit application. This is an embedded app that will be running on dos without windows. I have created a serialPort class and a SerialInterrupt class which is a friend of the SerialPort class so that the ISR can have acess to the buffers. I am compiling the program using Microsoft Compilier 1.52. The code will function properly provided that the interrupts do not occur when certain actions are happening. If the interrupts occur when certain events are happening for instance doing a printf to the screen I recieve a run time error of a stack overflow. If there is anyone with any suggestions I would greatly appreciate it since I have been struggling with this for a couple days with no light in sight.

  2. #2
    Join Date
    May 2002
    Posts
    2
    I do not know if you call printf function in your interrupt routine. If so, it may be the cause of problem. DOS is single task os and use some global memory and cannot be re-entered. If your interrupt rouitne may eventually call into DOS, it has problem sooner or later. The rule is to avoid calling any LIB that will eventually call into DOS!

  3. #3
    Join Date
    Jul 2000
    Location
    Wisconsin
    Posts
    8

    Cool

    Thanks that did seem to fix it since I had a printf for debugging purposes placed in the ISR. Removing that seemed to eliminate the stack overflow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured