Myke
The K22 doesn't have VBAT register files - in fact very few Kinetis parts do.
These registers are preserved across power cycles (when VBAT is present) and in all very low power modes and can be written and read as bytes, half words or long words.
The clock must be gated for reads/writes not to hard fault and this has to be enabled after every reset/power cycle.
Attached is a FRDM-KL82Z binary that can be loaded to such a board and VBAT register files tested as follows (either on its LPUART VCOM connection at 115kBaud or on its USB device connection as CDC class). Here I use the I/O menu to do memory reads, write etc., whereby the first thing that needs to be done is
"mm 4004803c l 60000031" to enable the VBAT clock gate (the 0x40000000 is set since it is initially 0 in SIM_SCGC6)
Below is a test session where reads and writes of different sizes are verified (it started after a watchdog reset due to previously trying to read a VBAT register without the clock gated to it (hard fault).
Regards
Mark
Console session:
Hello, world... FRDM-KL82Z [WDOG]
Kinetis Unique ID: 0x10710000750a003e0014100735194e45
Static memory = 0x00000c74
OS Heap use = 0x0359 from 0x3000
Initial stack margin 0x000141ec
Enumerated [1]
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 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]
dma DMA transfer [src][dst][len]
lp_cnt Read LPTMR CNT
dac DAC [ref] [hex]
save Save port setting as default
help Display menu specific help
quit Leave command mode
#mm 4004803c l 60000031
Write - OK
#md 4003e000 l 4
Memory Display
0x4003e000 12345678 00000000 00000000 00000000 .4Vx............
#mm 4003e000 l 0
Write - OK
md 4003e000 l 4
Memory Display
0x4003e000 00000000 00000000 00000000 00000000 ................
#mf 4003e000 l 12345678 4
Fill - OK
md 4003e000 l 4
Memory Display
0x4003e000 12345678 12345678 12345678 12345678 .4Vx.4Vx.4Vx.4Vx
#md 4003e000 b 16
Memory Display
0x4003e000 78 56 34 12 78 56 34 12 78 56 34 12 78 56 34 12 xV4.xV4.xV4.xV4.
#mm 4003e000 l 0
Write - OK
md 4003e000 b 16
Memory Display
0x4003e000 00 00 00 00 78 56 34 12 78 56 34 12 78 56 34 12 ....xV4.xV4.xV4.
md 4003e000 l 4
Memory Display
0x4003e000 00000000 12345678 12345678 12345678 .....4Vx.4Vx.4Vx
#mm 4003e000 b 25
Write - OK
md 4003e000 l 4
Memory Display
0x4003e000 00000025 12345678 12345678 12345678 ...%.4Vx.4Vx.4Vx
mm 4003e000 w 1234
Write - OK
md 4003e000 l 4
Memory Display
0x4003e000 00001234 12345678 12345678 12345678 ...4.4Vx.4Vx.4Vx
#md 4003e000 b 16
Memory Display
0x4003e000 34 12 00 00 78 56 34 12 78 56 34 12 78 56 34 12 4...xV4.xV4.xV4.
#mm 4003e003 b aa
Write - OK
md 4003e000 b 16
Memory Display
0x4003e000 34 12 00 aa 78 56 34 12 78 56 34 12 78 56 34 12 4...xV4.xV4.xV4.
mm 4003e002 w 7654
Write - OK
md 4003e000 b 16
Memory Display
0x4003e000 34 12 54 76 78 56 34 12 78 56 34 12 78 56 34 12 4.TvxV4.xV4.xV4.