OCP Xavier NIC 3.0 Test Board Written by Richard Lewis (rick@fmspcb.com) for Fusion Manufacturing Services.
Posted February 18, 2023 at https://github.com/bentprong/ocp_xavier Initial Firmware Release: v1.0.4
Merged new features from TTF project here including scan chain, card detection, and new commands/help.
Updated Arduino files in the 'platformio' subdirectory of this repo.
These instructions have been tested on Windows and Mac. If you are using a variant of Linux, the instructions for Mac should apply except possibly for the "screen" terminal emulator program. At a minimum you need to select a Linux terminal emulation program and open the USB TTY with it.
This project was initially cloned from the OCP Vulcan project then refactored to split the source code into multiple files to ease readability and management. Primary reason for cloning that project was to re-use the USB serial code that was working, plus the simulated EEPROM and CLI.
The project is built using the PlatformIO extension for Visual Studio Code. An ATMEL-ICE was used to debug the code on the board and can be used to program the binary using Microchip Studio.
Enter the 'help' command to get a list of the available commands, and details about usage of each command.
The simulated EEPROM (in FLASH) is only used to set 'sdelay' the delay between status page
updates. You can verify that it is operational by entering 'debug eeprom' command. The
'set' command can be used to change this delay 'set sdelay
Do not confuse this simulated EEPROM with the FRU EEPROM on a NIC 3.0 board. The command to access FRU EEPROM contents is just 'eepom' (see help for more).
The signature of the simulated EEPROM should always be DE110C02.
Backspace and delete are implemented and erase the previous character typed.
Up arrow executes the previous command.
In this document,
Follow the Wiring and Terminal Instructions below to get started using the Xavier board.
The board firmware prompt is "cmd>" and when you see that, you can enter "help
The purpose of the board is to provide debug capabilities for NIC 3.0 cards.
This varies slightly between platforms including Mac, Linux and Windows.
Download and install Visual Studio Code.
In VS Code ("VSC"), go to Extensions and seach for "platformio" and install it. This will take some time, watch the status area in the bottom right of VSC for progress. Note that PlatformIO ("PIO") also installs the C/C++ extension which is needed.
When finished you will see a prompt "Please restart VSCode" so do that.
Windows only: It is recommended that you install cygwin so that you have a bash terminal to use git. There are other options such as GitBash. Point is, command-line git needs to be run to clone the source code repo unless you already have/know a tool that will allow you to clone and manage a GitHub repository.
Set up a Projects folder if you don't already have one. For these instructions it is assumed that this is
Log into GitHub.com using your own credentials then clone this repository: bentprong/ocp_xavier
into your Projects folder.
GitHub Requirements:
a. SSH key generated and installed on this computer for YOU
b. SSH key for YOU installed in YOUR GitHub.com account
In VSC, choose File | Open Folder... and navigate to
In VSC, click the checkmark in the blue bar at the bottom to build. This should install necessary files and tools. It may take quite a bit of time.
In the repo folder platformio, open the README file and follow the instructions to configure PIO for the Xavier board. There are 2 steps to this process explained in the README.
LED BEHAVIOR: Once the Xavier board has been powered up, there will be 2 LEDs that are on solid: one for 3.3V and one for 12V. These 2 LEDs are near the Power connector. If either is off, a hardware issue exists in one or both power supplies. These 2 LEDs should always be on.
A third LED may be lit if a NIC 3.0 board is inserted into the bay and the power is good to that board. This is the OCP_PWR_GOOD LED.
A fourth MCU_LED near the P-UART1 connector should be fast blinking (4-5 times a second). This means that the board has initialized OK and is waiting on a USB/serial connection. For more O/S- specific information on LED behavior, please see Terminal Instructions below.
If the MCU_LED is on solid, an initialization error occured. Best bet is to program the board again. If all LEDs are off, then the board is not receiving any power. Check the USB cable and that it is firmly in the USB connector.
NOTE: The board is supposed to be able to be powered from USB 5V, if the SW_DEV_PWR jumper is installed. However, that does not to work. You must have an ATX power supply connected to the appropriate connector on Xavier. The setting of the SW_DEV_PWR jumper doesn't matter.
Once a connection is made, the MCU_LED will slow blink to indicate a heartbeat from the board and firmware.
If the MCU_LED is off, the board firmware never started up. The firmware turns this LED on when it first starts, then it initializes itself and the harware, then it starts fast blinking unless errors were encountered in which case it stays on.
In VSC, click Run | Start Debugging. The code will be built for debug and you should see the debugger stop in main() at the init() call. Click the blue |> icon in the debugger control area of VSC.
NOTE: Sometimes when using the debugger, the serial over USB does not immediately connect. See Terminal Instructions below for more info.
To program release firmware in VSC, click the -> in the blue bottom line of VSC. Requires ATMEL-ICE.
Firmware is prebuilt in GitHub and located at: bentprong/ocp_xavier/.pio/build/samd21g18a/firmware.bin
https://github.com/bentprong/ocp_xavier/tree/main/.pio/build/samd21g18a
Use any flash utility such as Microchip Studio to erase and flash this .bin file into the Xavier board.
NOTE: PIO "upload" does not work because there is intentionally no bootloader on the Xavier board. At this time, this OCP project does not support Arduino sketches.
It is not necessary to build the firmware in order to use the released firmware. In the paragraph below is the location of the firmware.bin file that needs to be programmed into the board using a tool such as Microchip Studio.
To build release firmware, in VSC, click the checkmark in the blue line at the bottom. If no problems are reported (there should be none), the executable is located in the local directory here: