Hi Jingjing,
Thanks for the help.
Setting the RTC to use the bus clock with a modulo of 9 gives me
exactly 10KHz on PTC5. So that confirms that my bus clock is 20
MHz. We've confirmed before that the flash configuration for a 20
MHz bus clock is correct. (Page 484 of the reference manual does not
say what the prescalers are for x2 and x3. How does this work with
table 28-5?)
With respect to the debug session being terminated, I got tired of
the popup so I checked the "don't show this again" box. Can you tell
me how to re-enable that so the popup occurs again?
What happens is I tell the debugger to run by clicking on the run
button (the green right arrow picture you show in your
response). The debugger runs for a short time then exits. I don't
have the popup anymore, but the debug and console windows are shown
in the attached picture.
The second picture shows my test code. If I set a breakpoint at line
20 (with the for loop delay commented out), then keep running to the
breakpoint, the long delay for each breakpoint is long enough to make
it work. If I run without the breakpoint (again with the for loop
commented out), I get the session terminated problem. If I put the
for loop delay in by uncommenting it, then everything works fine
again with the long delay. This is why I believe there is a timing
issue somewhere with the EEPROM.
Thanks,
Dave