M32 + Jtag MkII + exernal Clock -> no debugging

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
in the past I had a separate crystal for the Mega32 CPU and for a SPI to serial converter (MAX3100). Usage of Jtag ICE was as expected.

To simplify the board the CPU crystal was replaced by a wire from the Mega clock-input to the MAX clock output. While the programm was not changed a reload was not necessary. The application was running perfectly.
Now with the external clock a program improvement was required. The results were:
- loading of the programm via Jtag does not lead to a running application (AVRSTudion showed only FFFF in the assembly window).
- Stopping did not work immediately, only after ten or twenty seconds and single stepping did not work either.
-Single stepping looked like debugging of a optimized code - jumping without a logical sequence through the source code.

I tried to change the clock fuses from external high speed crystal to external clock (can't remeber which delay) without any progress.

Any comments?

Knut

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Knut,

is the mega32 running at the same speed when clocked from the MAX as when running with the crystal?

Were you able to program the clock fuses?

Does the application actually run correctly, i.e is it just the debugging and programming that does not work as expected?

Tore

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tore,

Quote:
is the mega32 running at the same speed when clocked from the MAX as when running with the crystal?

With 2 crystal it was 4MHz for the mega32 and 3.6864MHz for the MAX. Now (because of a currently not needed MAX) I moved the crystal from the MAX to mega32 and than I can debug.

Quote:
Were you able to program the clock fuses?

I could program the clock fuses.

Quote:
Does the application actually run correctly, i.e is it just the debugging and programming that does not work as expected?

The application runs correctly.
It is debugging and programming that did not work.

Just as an additional hint. The first time with one crystal was using the mega32 as a clock source and the MAX with it's clock input. The output swing of the mega32 was too low, so the MAX did not work. The MAX oscillator out generates a full 5V swing at 5V supply, while the mega32 output is approx. running at 2.5V output swing (maybe a little more but seriously less than the MAX). Could this be a problem?

Cheers

Knut