This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ISD51 has a problem

Hello,
I have a problem using ISD51 to debug my code. AT first, I used the simulator to run my code and it works fine. Then I added ISD51.A51 into my project and also added ISDinit() and ISDcheck() to my code, changed the OPTION menu to enable ISD51 and compiled. The problem is that the code doesn't start running after loading (seems waiting). Can anyone help with it?
Another thing: during compiling, I saw there were a few bytes overlap in code space. Does it matter?

Thanks
Frank
-------------------------------------------
compiling LOG.C...
compiling test.c...
assembling Conf_tny.a51...
assembling STARTUP.A51...
assembling ISD51.A51...
linking...
*** WARNING L5: CODE SPACE MEMORY OVERLAP
FROM: 0023H
TO: 0025H
Program Size: data=68.3 xdata=454 code=16180
creating hex file from ".\output\snake"...
".\output\snake" - 0 Error(s), 1 Warning(s).

Parents
  • Frank,

    Let's start with the obvious:

    1) To generate your ISD51 code, make sure you have the symbol ISD51 defined. I don't see a header file included anywhere so I cannot tell. (Sorry if that is TOO obvious.)

    2) You are calling ISDinit() BEFORE enabling interrupts. Try moving the call to ISDinit() to AFTER the ES and EAL settings. This may not be a big problem, but it could cause a timing issue in the handshake.

    3) Better yet, remove the call to ISDinit() and just use ISDcheck() by itself. This function actually does the ISDinit() for you, after it sees the incoming 0xA5 from the debugger.

    ----

    Note: The ISDwait() and ISDcheck() functions really don't do ANYTHING after the Serial Interrupt (ES) is enabled by ISDinit(). (In fact, ISDinit() doesn't do anything if called more than once, because it sees that the ES flag is already enabled.) ISDwait() and ISDcheck() are different from ISDinit() only in that they LOOK for an incoming 0xA5 from the debugger BEFORE they invoke ISDinit() which, in turn, merely enables the Serial Interrupt (by setting ES). Thereafter, just about everything (including further 0xA5 handshakes) is controlled by the Serial Interrupt servicing routine contained within ISD51.A51 (until such time as you explicitly disable the interrupt).

    ISDcheck() is useful if you want your code to run semi-normally in the ABSENCE of the debugger. ISDcheck() essentially performs a No-Op when it is called, UNLESS a 0xA5 is present on the UART Receive pin. Then, and only then, does ISDcheck() launch the ISD51 Interrupt as described above.

    Steve

Reply
  • Frank,

    Let's start with the obvious:

    1) To generate your ISD51 code, make sure you have the symbol ISD51 defined. I don't see a header file included anywhere so I cannot tell. (Sorry if that is TOO obvious.)

    2) You are calling ISDinit() BEFORE enabling interrupts. Try moving the call to ISDinit() to AFTER the ES and EAL settings. This may not be a big problem, but it could cause a timing issue in the handshake.

    3) Better yet, remove the call to ISDinit() and just use ISDcheck() by itself. This function actually does the ISDinit() for you, after it sees the incoming 0xA5 from the debugger.

    ----

    Note: The ISDwait() and ISDcheck() functions really don't do ANYTHING after the Serial Interrupt (ES) is enabled by ISDinit(). (In fact, ISDinit() doesn't do anything if called more than once, because it sees that the ES flag is already enabled.) ISDwait() and ISDcheck() are different from ISDinit() only in that they LOOK for an incoming 0xA5 from the debugger BEFORE they invoke ISDinit() which, in turn, merely enables the Serial Interrupt (by setting ES). Thereafter, just about everything (including further 0xA5 handshakes) is controlled by the Serial Interrupt servicing routine contained within ISD51.A51 (until such time as you explicitly disable the interrupt).

    ISDcheck() is useful if you want your code to run semi-normally in the ABSENCE of the debugger. ISDcheck() essentially performs a No-Op when it is called, UNLESS a 0xA5 is present on the UART Receive pin. Then, and only then, does ISDcheck() launch the ISD51 Interrupt as described above.

    Steve

Children