FreeCalypso > hg > freecalypso-tools
annotate target-utils/flash-boot-test/watchdog.c @ 1014:961efadd530a default tip
fc-shell TCH DL handler: add support for CSD modes
TCH DL capture mechanism in FC Tourmaline firmware has been extended
to support CSD modes in addition to speech - add the necessary support
on the host tools side.
It needs to be noted that this mechanism in its present state does NOT
provide the debug utility value that was sought: as we learned only
after the code was implemented, TI's DSP has a misfeature in that the
buffer we are reading (a_dd_0[]) is zeroed out when the IDS block
is enabled, i.e., we are reading all zeros and not the real DL bits
we were after. But since the code has already been written, we are
keeping it - perhaps we can do some tests with IDS disabled.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 26 Nov 2024 06:27:43 +0000 |
parents | 3d7b546c710c |
children |
rev | line source |
---|---|
490
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
1 #include <sys/types.h> |
488
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 #include "types.h" |
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 |
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 void |
490
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
5 cmd_wd() |
488
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 { |
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 /* stop/disable the watchdog timer */ |
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 *(volatile u16 *)0xFFFFF804 = 0xF5; |
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 *(volatile u16 *)0xFFFFF804 = 0xA0; |
cd900b885eb2
target-utils/flash-boot-test: added wd (watchdog disable) command
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 } |
490
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
11 |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
12 void |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
13 cmd_we() |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
14 { |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
15 /* watchdog enable */ |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
16 *(volatile u16 *)0xFFFFF804 = 0x8000; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
17 } |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
18 |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
19 void |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
20 cmd_wr() |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
21 { |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
22 /* read and display watchdog downcount register */ |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
23 printf("%04X\n", *(volatile u16 *)0xFFFFF802); |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
24 } |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
25 |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
26 void |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
27 cmd_ww(argbulk) |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
28 char *argbulk; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
29 { |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
30 /* single or double write to WATCHDOG_TIM_MODE */ |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
31 char *argv[3]; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
32 u_long w1, w2; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
33 |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
34 if (parse_args(argbulk, 1, 2, argv, 0) < 0) |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
35 return; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
36 if (parse_hexarg(argv[0], 4, &w1) < 0) { |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
37 printf("ERROR: arg1 must be a valid 16-bit hex value\n"); |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
38 return; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
39 } |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
40 if (argv[1] && parse_hexarg(argv[1], 4, &w2) < 0) { |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
41 printf("ERROR: arg2 must be a valid 16-bit hex value\n"); |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
42 return; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
43 } |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
44 /* do it */ |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
45 *(volatile u16 *)0xFFFFF804 = w1; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
46 if (argv[1]) |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
47 *(volatile u16 *)0xFFFFF804 = w2; |
3d7b546c710c
target-utils/flash-boot-test: more watchdog experimentation commands
Mychaela Falconia <falcon@freecalypso.org>
parents:
488
diff
changeset
|
48 } |