no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | cybiko:softreboot [2009/11/27 17:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | !From some experiments by DK | ||
+ | =======A software initiated Cybiko Reboot======= | ||
+ | |||
+ | |||
+ | There is (as far as we know) no documented way to have the SDK perform a software reset of the Cybiko. | ||
+ | |||
+ | There are many potential uses of such a facility. One being a surefire way to recover from ' | ||
+ | |||
+ | Now that we know how to plant assembler into the C file, this seems to be the way to go. | ||
+ | |||
+ | I looked at the Boot ROM H8 code. There are two versions of this Version 1.1.2 (used in the original Classic unit, the one with the black slide power on/off switch) and Version 1.1.7 - (used in the second edition of the Cybiko Classic which uses the ' | ||
+ | |||
+ | N.B. if you aren't using either of these versions of the boot loader, the addresses will likely not work. Note that this bootstrap code is located in the ROM of the H8 chip. Unlike CyOS (which resides in flash), it isn't upgradeable. | ||
+ | |||
+ | Locations 0 .. 1e6 hold the vectors for the H8 reset. | ||
+ | < | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | Start vector 0 - 00 00 0d be | ||
+ | 0: 00 00 00 00 nop | ||
+ | 2: 0d be 0d be | ||
+ | | ||
+ | | ||
+ | NMI vector 7 - 00 00 10 b8 | ||
+ | 1c: 00 00 00 00 nop | ||
+ | 1e: 10 b8 10 b8 .word H' | ||
+ | </ | ||
+ | This is 00 00 0D 6A (decimal 3434) for the older Classic unit and is 00 00 0D BE (or decimal 3518) for the newer Classic units. | ||
+ | |||
+ | The function ' | ||
+ | |||
+ | <code c> | ||
+ | void classic_reset_original() | ||
+ | { | ||
+ | // | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | // | ||
+ | } | ||
+ | |||
+ | |||
+ | void classic_reset_new() | ||
+ | { | ||
+ | // | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | // | ||
+ | } | ||
+ | |||
+ | | ||
+ | case 0: classic_reset_original(); | ||
+ | case 2: clasic_reset_new(); | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Interesting to note that the ' | ||
+ | |||
+ | Calling this has worked for me in two test apps. | ||
+ | |||
+ | Another point of interest. on the newer Classic, if the address 3518, above, is replaced with the number ' | ||
+ | {{tag> |