• Aucun résultat trouvé

If you have problems

Dans le document Real-Time C Debugger for68302 (Page 119-123)

Listed below are common problems and their most common causes.

Problem: You get "ERROR: Stepping failed" when trying to step.

Cause: This is most likely caused by an invalid stack. In order to step, the emulator will first modify the values on the stack, and then execute an RTE. If the stack pointer points to an invalid address, or the chip-select needed to access the stack is not initialized, the stack reads caused by the RTE will result in a double-bus fault.

Fix: Make sure the stack pointer is pointing to a legitimate address and that any chip-selects for that address are initialized.

Problem: You get "ERROR: Break failed" when trying to step.

Cause: You have configured the emulator for dedicated mode interrupts but have not put the 68302 in dedicated mode by modifying the GIMR and setting the most significant bit.

Or, the instruction that you single-stepped resulted in a double-bus fault and the processor is now halted.

Fix: Make sure that the processor is set for the correct interrupt mode before single-stepping. If the interrupt mode is correct, then use the trace command before stepping so that you see what went wrong.

Chapter 4: Plugging the Emulator into Target Systems Configuring the Emulator for In-Circuit Operation

Problem: You get "ERROR: BERR during background access to supervisor stack" when you first try to step or run.

Cause: This problem occurs when the emulator attempts to modify the stack so that your run or step command will begin from the proper address. The emulator will try to modify the stack and then use an RTE to force the program counter and status register to the proper values. In this case, a bus error occurred when the emulator attempted to modify the stack.

Fix: Make sure the stack pointer is pointing to a legitimate address and that any chip-selects for that address are initialized.

Problem: You get "ERROR: Monitor failure; bus error" when trying to do a display, modify, or load command.

Cause: This error means that when the emulator tries to read from, or write to, a memory location mapped as target RAM or ROM, a bus error exception occurred. This can have many causes, but most often is caused when you try to access memory that relies on a chip-select signal, but have not initialized the chip-select registers first.

Fix: Make sure that your chip-select registers are properly initialized.

Chapter 4: Plugging the Emulator into Target Systems Configuring the Emulator for In-Circuit Operation

120

Problem: Whenever you break into the monitor you have problems with the SCC portion of your program.

Cause: The emulator asserts the FRZ pin when it breaks into the monitor and this in turn "freezes" the Communications Processor. Based on what type of SCC setup you have, and what type of activity is occurring at the time of the break, you may experience unexpected SCC errors or activity.

Note that if you are using the background monitor the FRZ is asserted during the entire time the emulator is running in the monitor. If you are using the foreground monitor, the FRZ pin is asserted for a short time during transition from your program to the monitor program (approximately 30 CPU cycles).

Fix: Either use the foreground monitor, which will reduce but not eliminate the time that the FRZ pin is asserted, or avoid setting any breakpoints while debugging SCC functions. By using the trace analyzer, you can capture a real-time log of SCC-related bus activity.

Problem: You are using the DRAM refresh controller of the 68302, but when you break into the monitor, the values in your DRAM become corrupted.

Cause: You are either using the background monitor, or have not made the proper modification to the foreground monitor.

Fix: Use the foreground monitor and include the necessary modifications. Refer to "Step 7. If you use the 68302 built-in DRAM refresh" for details on how to ensure proper DRAM refresh.

Chapter 4: Plugging the Emulator into Target Systems Configuring the Emulator for In-Circuit Operation

Problem: The emulator status shows HALTED

Cause: A double-bus fault has occurred, or the target system has asserted the HLT pin. This is almost always caused by a double-bus fault. Most often, a bus error or address error exception fails to complete correctly because of an invalid stack or vector table entry.

Fix: Make sure you have a valid stack and valid vector table entries. Refer to "Step 9. If emulator status shows HALTED" for troubleshooting information.

Problem: Incorrect data is read from target RAM or ROM.

Cause: This is most often caused by a slow rising DTACK signal.

The DTACK signal is usually pulled high with a resistor.

Any resistor value above 1K ohms will usually result in some target memory cycles that are terminated with 0 wait states regardless of how the chip-select registers are programmed.

Fix: Make sure that the pullup resistor on DTACK is no higher than 1K ohms. Refer to "Step 11. Check your DTACK pullup resistor!" for more information.

Chapter 4: Plugging the Emulator into Target Systems Configuring the Emulator for In-Circuit Operation

122

5

Dans le document Real-Time C Debugger for68302 (Page 119-123)

Documents relatifs