I have on my board reset push button and external watchdog chip, both are connected to the reset pin of the K64 together with pull up resistor (in parallel). When the pushbutton is pressed (pulled down), the K64 goes to reset state but will not exit to main (stuck at CLOCK_CONFIG_FllStableDelay function in clock_config.c) unless I disable the watchdog (I have a dip switch which can disconnect the reset watchdog to the reset pin of the K64).
If the watchdog is disconnected, the pushbutton works as expected, and once I release the pushbutton, main is called. If the watchdog is connected, if I release the pushbutton, K64 is stuck at CLOCK_CONFIG_FllStableDelay function.
I checked the input reset pin - it is logic high, obviously, the chip is not at reset state but is stuck at loop in this function.
Why is it stuck at this function?
P.S.
The NMI pin is not pulled high. Could this be the reason?
But now that I think of it, without the watchdog mechanism, the reset works as expected. Do I need to pull this pin high anyway? Can I do it internally (register)? because the board is already manufactured.
Roy
已解决! 转到解答。
Problem solved. I had a race condition since one of the outputs went to a NAND gate and the propagation time was such that there was a boot loop on reset. I've put a delay on one of the lines to wait for the reset from the watchdog to be disabled and all is well.
Problem solved. I had a race condition since one of the outputs went to a NAND gate and the propagation time was such that there was a boot loop on reset. I've put a delay on one of the lines to wait for the reset from the watchdog to be disabled and all is well.