Skip to content

TinyGv9j Manual Programming and Test Instructions

Alden Hart edited this page Aug 2, 2014 · 28 revisions

##Setup The assembled board should be set up with the following:

  • Atmel-ICE programmer
  • Four stepper motors
  • USB connected to host computer
  • Bench power supply - set to 24volts, current limit about 1.5 amps
    OBSERVE POLARITY WHEN CONNECTING TO BOARD

setup power

The Atmel-ICE should be plugged into the SAM port atmel-ice

The JTAG (SWD) connector needs to be properly seated. It's all too easy to plug this connector into only one row of pins. jtag-connector

The motor connectors should plug in as shown. The 5th pin (grounding pin) is left unconnected. motor-connectors

The blue power light should light when the power supply is turned on.

##Programming Start Atmel Studio 6.2 studio6.2

Select /Tools/Device Programming device-programming

Select the Atmel ICE. Select the device to be ATSAM3X8C. Select SWD programming mode. Hit APPLY. setup-programming

READ the Device. It should return a device signature and read about 3.3v read

Hit the MEMORIES tab to get the programming dialog memories

Program the chip. First you must select the tinyg2.elf file you wish to program onto the chip. Then hit PROGRAM. Programming and verification takes about 20-30 seconds.

Set the boot fuse. Select GPNVM Bits. Select boot from Flash, Bank 0
I don't have a picture for this yet and I'm going from memory, so I may not have this exactly right. You do not want the chip to boot from ROM, and you want bank 0, not 1.

Close the programming dialog box. This is necessary to release the USB port so it can be connected to Coolterm.

##Test the motors Gentlemen, start your Coolterm.

Select the Options menu and Re-Scan Serial Ports. You should see a port labeled usbmodem001. Select it. Don't worry about baud rates or other settings. These are handled natively by USB, which should connect at 12 Mbps.

If you see something like usbmodemfa12121 then try the following:

  • Power cycle the board down and rescan. Please note this condition in testing notes for this board.
  • If that doesn't work check the GPNVM bits and make sure the chip is booting from Flash, Bank 0.

rescan-ports

Select the Transmit window. It's convenient to set to LINE mode and CR transmit

Connect to the board. connect to board

Confirm startup string. You should see something like this in the terminal window startup string

Enter The following Gcode sequence and look for proper motor movement.

G0 X20
Y20
Z20
A20
X0
Y0
Z0
A0
G1 F200 X4
Y4
Z4
A4
X0 Y0 Z0 A0

The final move must be terminated with a carriage return or it won't run.

You can use the Coolterm Send String command under the Connection menu to run this command multiple times or for subsequent boards. (On the mac the Connection menu item is at the top of the screen, not on the Coolterm window itself)

The string you type into the dialog box will remain available for the next board if you move the send-string window so you can get at it later, and then just click on the window when you need it again. gcode

The Next Board

The instructions above were for the first board. Here's what's different for subsequent boards.

###Programming the Next Board

  • You should be able to just re-open the Studio6 programming dialog. Most values will be the same, but you still have to APPLY the programmer, READ the chip, select MEMORIES, PROGRAM the chip, and then exit.

###Testing the Next Board

  • The previous board is probably still connected - at least in Coolterm's mind. You will need to hit the DISCONNECT button and CONNECT again to establish connection with the new board. You can probably skip the whole OPTIONS dialog as the next board will also come up as usbmodem001. If the board does not connect go back to the options dialog, rescan, and look for the new board in the USB choices.
Clone this wiki locally