Power On Behavior

 

Initial Power on conditions

On power up all pins are tri-stated on the ARMexpress, ARMweb, PRO or ARMmite.  On the SuperPRO and PROplus, pins are also tri-stated, but all have a weak pull-up resistor.

Following reset, the board waits at least 0.5 seconds for an ESC character (or upto 3 seconds for direct USB connected boards like ARMstamp or LPC54005), which if received stops the user program from running.  If no ESC is received the user program starts.

Restarting the program

If the user has entered a BASIC program into the ARM, that program will be started when the power is applied, or restarted when RESET is asserted either with the pushbutton, or from the BASICtools program via asserting the DTR line (low on ARMmite, high on ARMexpress).

The BASIC firmware sends out a &H01 to indicate a user BASIC program has started.  This tells BASICtools that the program is running (signified by turning the RUN button to red and showing STOP.  If your program changes the baudrate and you are using BASICtools as a terminal window, you should also send out this character after you have switched baud rates, otherwise BASICtools will not think you program is running and it will try to compile any input from the enter line rather than passing it on to your program.

If the user program ends by getting to the last statement of the program or executing an END instruction, the ARM will await either input on the debug serial port, or a RESET.  The BASIC firmware sends out a &H04 which indicates to BASICtools that the program has ended.

Reset and Boot for PRO boards

For the PRO, PROplus and SuperPRO boards when connecting a PC to a board that is running, the reset and boot control signals will be toggled by the PC.  This is a function of Windows and the Drivers.   This will reset the board or possibly put it into a load program state.  To avoid this you can disconnect the Reset or Boot signals from the USB dongle, either by cutting pins or making an adapter using a 6 pin female header with long pins(available from SparkFun ).

The above shows both RESET and BOOT signals disconnected.

Break operation or STOP

If the user code is running, it can be stopped by a RESET condition.  This will normally restart the user code, but there is a short window (500 msec) where the ARM will wait to see if there is input on the serial debug port.  If the character received on the serial port is ESCAPE (27) or CTL-C (3) then the user program is prevented from running and the is ready to be reprogrammed. 

BASIC Boot Loader serial commands

When the user program is not running or not at a STOP, the BASIC bootloader is functioning. 

There are 2 versions of this bootloader, the one on the ARMweb, and then all the others.  The ARMweb has a full compiler ready to compile BASIC programs line by line.  This can be used with the TclTerm terminal emulator or the web interface of the ARMweb.  when running BASICtools programs are compiled on the PC and downloaded to the ARM.  The ARMweb also supports the commands used by all the others, and these are used to load and control BASIC programs-

At a STOP the ARM will respond to ^ run or @ dump-memory commands which are used in the BASICtools variables page.