>Is there a reset vector in the SuperPro that can be executed through BASIC in order to approximate a hardware reset?
>I have an instance where it would be beneficial to completely re-start the SuperPro under program control without having to toggle an external line. I suppose I could route one i/o to DTR with a jumper (but it seems like a kludge).
>I suppose, if there's not a BASIC construct to do it (like the old SYS() command), that it might be possible to push a false return on the stack, or to do a GOTO or GOSUB to a hex address.
>If I had the address of the reset vector, I could simply gosub to it via pointer to effect the reset.
Actually I think the closest is the watchdog timer, spelled out in the forum here. It does do a reset, and it is a good way to protect from a code run-away.
The other way is to do some educated guessing on the Boot ROM (no I don't have the code for it)
From the user manual for the LPC175x, the memory map puts the Boot ROM at &H1FFF0000
From BASIC you can just poke around at it. Cortex ARMs boot by loading the value at location 0 into the SP, and location 4 into the PC. I assume that on powerup the Boot ROM is mapped to location 0. So here is my guess at how to do it
Code: Select all
@1fff0000 1fff0000: 10001FFC 1FFF0081 00000000 00000000 00000000 00000000 00000000 00000000 wait(100) call (&H1fff0081) run Programming Flash 1756... ARMbasic[9.27h] on the PC Copyright 2013, Coridium Corp. *+ ... ( 0.03K code + 0.00K const)/96K 0.00/9K data programmed Executing... Welcome to ARMbasic Kernel[8.25] with Floating Point Copyright 2013, Coridium Corp. for the SuperPro
So, I learned something here to, or at least reminded myself of how things startup (at least today).
SO the conclusion is either connect an IO line to the reset (which I have done before), or use the Watchdog.