contrib: replace the GPLv2-or-later license tag
[fw/openocd] / contrib / loaders / flash / kinetis_ke / kinetis_ke_watchdog.s
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4  *   Copyright (C) 2015 by Ivan Meleca                                     *
5  *   ivan@artekit.eu                                                       *
6  ***************************************************************************/
7
8         .text
9         .cpu cortex-m0plus
10         .code 16
11         .thumb_func
12
13         .align  2
14
15         ldr             r3, wdog_cs1
16         mov             r2, #127
17         ldrb    r5, [r3]
18         ldrb    r4, [r3, #1]
19         and             r2, r5
20         ldr             r5, unlock1
21         ldrh    r0, [r3, #4]
22         ldrh    r1, [r3, #6]
23         strh    r5, [r3, #2]
24         ldr             r5, unlock2
25         strh    r5, [r3, #2]
26         strb    r4, [r3, #1]
27         strh    r0, [r3, #4]
28         strh    r1, [r3, #6]
29         strb    r2, [r3]
30         bkpt    #0
31
32         .align  2
33
34 wdog_cs1:
35         .word   0x40052000      // Watchdog Control and Status Register 1
36 unlock1:
37         .word   0x20C5          // 1st unlock word
38 unlock2:
39         .word   0x28D9          // 2nd unlock word