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

Fast I/O in LPC2138 not work debugging

hi
I work by LPC2138/01, and i config I/O ports as fast I/O(SCS=0x3).
i change I/O pin in simulation exactly, also I/O pins change whitout any problem in run mode.
but i cannot change I/O pin in debugging mode, even when i click a bit on PINxDIR register manually, it unchecked after a short time.
I use Keil V4.6.00.
How can I solve my problem by fast I/O pin in debug mode???

Parents Reply Children
  • I think the complaint is that the debugger running on real hardware, with a peripheral viewer parked over the registers, is more invasive than anticipated. ie when I keep opening the oven door to look inside it never reaches temperature.

    Yes, debuggers can be invasive when looking at registers in hardware that do not behave like memory cells. ie reading/writing a register may change internal state of this and other registers in ways you might not be able to view, and in fact break the operation. ie reading receive register on a USART or SPI will clear RXNE, etc.

    This type of viewer parking is a crutch, do not use it unless you are comfortable with the side effects. Use less invasive debugging techniques.

  • Use less invasive debugging techniques.

    can u flash an LED?

  • i debug my hardware by J-LINK debugger.
    my LED is active low.
    when bebugger is stopped and SCS=0, if i click on IO1DIR bits (peripheral -> GPIO 1 - slow interface) portpin config becomes as output and my LED becomes on.
    but when SCS=0x3, if i click on FIO1DIR bits (peripheral -> GPIO 1 - fast interface) again portpin config becomes as output and my LED becomes ON, after short time(0.5s) automatically "FIO1DIR bit tick" is removed, and portpin config becomes as input again.
    This situation just occurs for all bit in fast GPIO registers(FIOxMASK, FIOxSET for PORT0 and PORT1)
    Why? i don't know!!!