Robert
In fact the problem that you have is very likely to be the method you are using to check that the interrupt takes place. When the watchdog fires it generates an interrupt and WCNT later (256 clocks if I remember correctly) it unconditionally resets too. Using break points to detect this will probably not work because the debugger will show a reset before it has had time to show that the break point was hit.
If you set a port output or write something to SRAM that can be checked after the reset you should find that it does in fact work. I have attached a binary that verifies the operation that can be checked on the FRDM-K22F.
1. It runs " normally" for about 20 s and in this time the SRAM content can be checked via the VCOM interface at 115kBaud.
2. It will create a forever loop after this time that causes the watchdog to fire. The watchdog interrupt will write a pattern to SRAM.
The SRAM locations 0x2000fffc..0x2000ffff are reserved for this. They will power up to random values. When the forever loop starts 0x2000fffc is set to 0x1234. When the watchdog interrupt takes place 0x2000fffe is set to 0x55aa.
This is what it looks like (after powering the board) - using the command line interface to request memory content
Hello, world... KINETIS
OS Heap use = 0x0189 from 0x6000
Serial number: 00
Software version V1.4.012
Device identification: KINETIS
Main menu
===================
1 Configure LAN interface
2 Configure serial interface
3 Go to I/O menu
4 Go to administration menu
5 Go to overview/statistics menu
6 Go to USB menu
7 Go to I2C menu
8 Go to utFAT disk interface
9 FTP/TELNET client commands
a CAN commands
help Display menu specific help
quit Leave command mode
3
Input/Output menu
===================
up go to main menu
md Memory Display [address] [<l>|<w>|<b>] [num]
mm Memory Modify [address] [<l>|<w>|<b>] [val]
mf Memory Fill [address] [<l>|<w>|<b>] [val] [num]
sd Storage Display {as md}
sm Storage Modify {as mm}
sf Storage Fill {as mf}
se Storage Erase [address] [len-hex]
set_ddr Set port type [1..4] [<i>|<o>
get_ddr Get data direction [1..4]
read_port Read port input [1..4]
write_port Set port output [1..4] [0/1]
save Save port setting as default
help Display menu specific help
quit Leave command mode
#md 2000fff8 w 4
Memory Display
0x2000fff8 41bb 0000 5340 3a04 A...S@:. <---- Notice random content
After the watchdog reset
Hello, world... KINETIS
OS Heap use = 0x0189 from 0x6000
Serial number: 00
Software version V1.4.012
Device identification: KINETIS
Main menu
===================
1 Configure LAN interface
2 Configure serial interface
3 Go to I/O menu
4 Go to administration menu
5 Go to overview/statistics menu
6 Go to USB menu
7 Go to I2C menu
8 Go to utFAT disk interface
9 FTP/TELNET client commands
a CAN commands
help Display menu specific help
quit Leave command mode
3
Input/Output menu
===================
up go to main menu
md Memory Display [address] [<l>|<w>|<b>] [num]
mm Memory Modify [address] [<l>|<w>|<b>] [val]
mf Memory Fill [address] [<l>|<w>|<b>] [val] [num]
sd Storage Display {as md}
sm Storage Modify {as mm}
sf Storage Fill {as mf}
se Storage Erase [address] [len-hex]
set_ddr Set port type [1..4] [<i>|<o>
get_ddr Get data direction [1..4]
read_port Read port input [1..4]
write_port Set port output [1..4] [0/1]
save Save port setting as default
help Display menu specific help
quit Leave command mode
#md 2000fff8 w 4
Memory Display
0x2000fff8 41bb 0000 1234 55aa A....4U. <-- notice the expected pattern in memory
If I try to debug this I never hit the break point but the test shows that it does work, but the debugger probably can't handle the situation.
Regards
Mark