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???
Review your hardware design, make sure all clocks are enabled.
Simulators are not good at reflecting the board the chip is soldered too.
Thankyou but my LPC2138 works whitout any problem in run mode, just problem is in debugging mode. If possible more explain about your solution.
But are you clicking any registers in any dialogs when running on real hardware?
when i click on any register, no problem. (even slow GPIO dialog) just when i click on any fast GPIO registers, it becomes unchecked after short time.
But the registers you see in the dialogs takes input from two directions - your clicks, and any changes that are the result of your program.
not work debugging i change I/O pin in simulation exactly Are you simulating or debugging?
yes, simulation is a form of debugging, but today 'debugging' usually means 'live'
Erik
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!!!
I found reason of my problem: The LPC2138/01 do not defined in J-Link V8.0 debugger, for this reason address if FIO register(0x3FFFC000 to 0x3FFFC03C) not defined for J-Link V8.0 too. I decided that use slow-GPIO registers, if config VPBDIV for PCLK==CCLK there is no difference between speed of GPIO and Fast-GPIO operation.