CPUStick™ User's Guide  v2.02


https://github.com/rtestardi/StickOS

 

1      Overview

CPUStick is a 1”x4” very low cost standalone USB embedded computer, pre-loaded with StickOS BASIC, based on the Freescale MCF52252 ColdFire MCU, similar in size and form to a USB “memory stick” and suitable for use in soldered or solderless-breadboard applications.

 

Internal to the MCF52252 is an entire resident StickOS BASIC interactive programming environment, which includes an easy-to-use editor, transparent line-by-line compiler, interactive debugger, performance profiler, and flash filesystem, all controlled thru an interactive command-line user interface.

 

In StickOS, external MCU pins may be bound to “pin variables” for manipulation or examination, and internal MCU peripherals may be managed by BASIC control statements and interrupt handlers.

 

The CPUStick may be directly connected to any USB host computer that supports a CDC/ACM Serial Port, including Windows, Linux, and Mac, and may then be controlled by any terminal emulator program, with no additional software or hardware required on the host computer.  The USB host computer may then be disconnected for standalone operation.

 

The CPUStick also includes an MC13201 ZigFlea Wireless Transceiver, which allows the MCU to be remotely controlled by another MCU, via a telnet/rlogin-like interface, eliminating the need for a direct connection to the host computer altogether.  Additionally, BASIC programs may trivially remotely access variables on other MCUs, enabling the use of “remote pin variables” or other forms of inter-MCU communication.

 


 

Table of Contents

 

1      Overview.. 1

2      CPUStick. 3

2.1        First Boot & Pin Assignments 3

2.2        Interface. 3

2.3        External Pins 4

2.4        Power Jumpers 5

2.5        CPUStick Schematic. 6

 


2      CPUStick

2.1    First Boot & Pin Assignments

When StickOS first boots, certain pin assignments default to “standard” board layouts.  The proper CPUStick pin assignments may be set with the following commands:

 

pins heartbeat fec_crs

pins safemode* fec_col

pins qspi_cs* qspi_cs0

pins clone_rst* qspi_cs2

pins zigflea_rst* fec_rxer

pins zigflea_attn* none

pins zigflea_rxtxen fec_txclk

2.2    Interface

The CPUStick contains a “heartbeat” LED (on pin fec_crs), a user controlled LED (on pin fec_txd0), an “autorun disable” switch (on pin fec_col), a USB mini-B connector, 48 external 0.1” header pins, and 2 power jumpers, as depicted below.

 

 

When the StickOS is running the “heartbeat” LED E1 will blink slowly; when the BASIC program in the MCU is running, the “heartbeat” LED E1 will blink quickly.  LED E2 may be user controlled on digital output pin “e2”.

 

Holding the “autorun disable” switch SW1 depressed during power-on prevents autorun of the BASIC program and overrides static IP address assignment in favor of DHCP.

 


2.3    External Pins

All CPUStick external pins support general purpose digital input or output.  In addition, eight an? pins can support analog input, four dtin? pins can support analog output (PWM actually) servo output or frequency output, three urxd? pins can support UART input, and three utxd? pins can support UART output.  The qspi? pins can support QSPI master input/output.

 

The CPUStick 0.1” header pinout is listed below.  Pins indicated with strikethrough text are intended for debug and initial code load only.

 

J5

1  gnd

2  +3V

3  qspi_clk

4  qspi_dout

5  qspi_din

6  qspi_cs0

7  rcon*

8  rstin*

9  qspi_cs2

10 qspi_cs3

11 rstout*

12 +5V

J6

1  utxd2

2  urxd2

3  urts2*

4  ucts2*

5  gpt0

6  gpt1

7  gpt2

8  gpt3

9  irq1*

10 irq3*

11 irq5*

12 irq7*

 

J7

1  utxd0

2  urxd0

3  urts0*

4  ucts0*

5  utxd1

6  urxd1

7  urts1*

8  uxts1*

9  dtin0

10 dtin1

11 dtin2

12 dtin3

J8

1  gnd

2  +3V

3  scl

4  sda

5  an0

6  an1

7  an2

8  an3

9  an4

10 an5

11 an6

12 an7

 

Note that if ZigFlea is in use, pins irq1* and qspi_cs0 may not be used.  Additionally, pins qspi_clk, qspi_dout, and qspi_din may be used only for qspi functionality.


2.4    Power Jumpers

The power jumpers J1 and J2 determine where the CPUStick will draw power from, as follows:

 

J1

J2

Power

Installed

Installed

USB

-

Installed

+5V header

-

-

+3V header

 

All digital and analog circuitry within the CPUStick runs at +3.3V.  See the schematic in the appendix for details.

 


2.5    CPUStick Schematic