{"id":18875340,"url":"https://github.com/opencomputeproject/ocp-net-nic3-ttf-mcu","last_synced_at":"2025-06-27T00:34:48.955Z","repository":{"id":204779820,"uuid":"712642591","full_name":"opencomputeproject/OCP-NET-NIC3-TTF-MCU","owner":"opencomputeproject","description":"OCP NIC 3.0 Thermal test fixture MCU","archived":false,"fork":false,"pushed_at":"2024-04-12T14:10:19.000Z","size":699,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-31T01:42:58.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencomputeproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-31T22:10:52.000Z","updated_at":"2024-05-06T19:19:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebed5280-0b4e-45b9-9714-91a5d4d5fff0","html_url":"https://github.com/opencomputeproject/OCP-NET-NIC3-TTF-MCU","commit_stats":null,"previous_names":["opencomputeproject/ocp-net-nic3-ttf-mcu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FOCP-NET-NIC3-TTF-MCU","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FOCP-NET-NIC3-TTF-MCU/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FOCP-NET-NIC3-TTF-MCU/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2FOCP-NET-NIC3-TTF-MCU/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomputeproject","download_url":"https://codeload.github.com/opencomputeproject/OCP-NET-NIC3-TTF-MCU/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239828972,"owners_count":19703975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T06:07:04.371Z","updated_at":"2025-02-20T11:29:34.621Z","avatar_url":"https://github.com/opencomputeproject.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCP NIC 3.0 Thermal Test Fixture (TTF)\nWritten by Richard Lewis (rick@fmspcb.com) for Fusion Manufacturing Services.\n    \nPosted February 18, 2023 at [GitHub](https://github.com/bentprong/ocp_ttf)\nInitial Firmware Release: v1.0.5 (March 9, 2023)\n\n## Release v1.0.9 (May 8, 2023)\n1. Fixed issue #16 USB/serial lockup with Windows/TeraTerm.  Updated Terminal Instructions below. Added info\non board rev X07 wrt to heartbeat LED behavior. On X06 boards there is no visual status due to no LED. This\nfix also involved including USBCore.cpp from a library and that file now generates a warning that can be\nignored. It simply verifies that the file is being compiled as it should be and not the library file. It is a\ngood idea after pulling a new release to check the TERMINAL window after a build to make sure this warning is present:\n    src/USBCore.cpp:32:2: warning: #warning Using expected USBCore.cpp with OCP modifications [-Wcpp]\n2. Added scan chain capabilities. New 'scan' command and also on powering up NIC 3.0 card via 'power' command.\n3. Two modifications to board rev X07 use P_UART1 connector: (1) LED between pins 1-3 (2) jumper from P_UART1 pin 2\nto pin 1 of DS_3P3AUX1 (LED) to provide temporary NIC_PWR_GOOD_JMP input pin. NOTE: If this jumper is not installed\nthe power command will not function correctly and/or give erroneous status. Also the pins command and the status\ncommand will show a pin state that may not be correct if the jumper is not installed.\n4. Fixed pin direction for TEMP_WARN, TEMP_CRIT and FAN_ON_AUX signals (schematic is wrong)\n5. Added 3 board ID input pins, currently not implemented in hardware (coming soon).  These pins are internally\npulled down. To change the board ID (aka revision) the 0th bit pin would be pulled high.   Bo\n6. Fixed uncaught potential serial buffer overflow (no issue created for this, fixed-on-the-fly)\n\n## Release v1.0.8 Notes (April 15, 2023)\n1. Changed power command to show help if no argument provided; added 'aux', 'main' and 'card' options to allow\nindividual signals MAIN_EN and AUX_EN to be set or 'card' sets both as before\n2. Changed eeprom command to require a subcommand (show or dump); if no subcommand, it shows help.\n3. Changed set command to show current parameter values and help if no argument is provided\n4. Added EEPROM_DEBUG flag to eeprom.c to allow developers to select hex dumps of key EEPROM regions\n5. Added vers command to display firmware version and build date/time\n6. Improved exception handling and user error messages\n7. Changed 'EEPROM' when referring to simulated FLASH EEPROM to 'FLASH' to avoid confusion\n8. Changed debug command to xdebug and moved to the bottom of the help display\n9. Added function stub for upcoming scan chain query; currently shows 'info not available'\n10. Fixed several previously-uncaught exception bugs\n\n## Release v1.0.7 (Internal testing only)\n\n## Release v1.0.6 Notes (April 12, 2023)\n1. Removed \"Dell\" everywhere, replaced with \"OCP\"\n2. Modified 'power' command: if no arg, showns NIC card power status; else use 'up' or 'down'\n3. Initiating GitHub branching: released code will be in main branch, code in development\n   will be in develop branch.\n\n## Release v1.0.5 Notes (March 9, 2023)\n1. Scan chain query is not yet implemented.\n2. Only the Board Info Area of the FRU EEPROM is currently processed.  Comments welcome. See\n   Issue # 9.\n\n## Overview\nThese instructions have been tested on Windows and Mac.  If you are using a variant of Linux, the\ninstructions for Mac should apply except possibly for the \"screen\" terminal emulator program.  At\na minimum you need to select a Linux terminal emulation program and open the USB TTY with it.\n\nThe project is built using the PlatformIO extension for Visual Studio Code.  An ATMEL-ICE was\nused to debug the code on the board and can be used to program the binary using Microchip Studio.\n\n## Operating Instructions\nEnter the 'help' command to get a list of the available commands, and details about usage of\neach command.\n\nThe simulated EEPROM (in FLASH) is used to store 2 settings:\n   sdelay - delay in seconds between status screen updates [default 3]\n   pdelay - delay in milliseconds between asserting MAIN_EN and AUX_EN signals to power up\n       the NIC 3.0 board [default 250]\n\nUse the 'set \u003cparam\u003e \u003cvalue\u003e' command to change these settings.\n\nDo  not confuse this simulated EEPROM with the FRU EEPROM on a NIC 3.0 board.  The command to\naccess FRU EEPROM contents is just 'eepom' (see help for more).\n\nThe signature of the simulated EEPROM should always be DE110C03.  Decoded, this means:\n   \"DE11\" = project ID\n   \"0C\" = Open Compute\n   \"03\" = 3rd OCP project (TTF); 01=Vulcan, 02=Xavier\n\n---\nWARNING: Flashing the board with (new) firmware WILL erase the EEPROM and you will need to re-enter\nthe settings afterwards.  The board will display \"EEPROM Validation Failed...\" to indicate that\nthis has happened, but it is a good practice to always check the settings after flashing the\nboard's firmware.  See [defaults] listed above.\n---\n\n### Tips:\nBackspace and delete are implemented and erase the previous character typed.\nUp arrow executes the previous command.\nIn this document, \u003cENTER\u003e means press the keyboard Enter key.\n\n## Getting Started\nFollow the Wiring and Terminal Instructions below to get started using the TTF board.\n\nThe board firmware prompt is \"ttf\u003e\" and when you see that, you can enter \"help\u003cENTER\u003e\" for help on the\navailable commands.\n\nThe purpose of the board is to provide support for thermal testing of NIC 3.0 cards.  \n\n## Development Environment Setup\nThis varies slightly between platforms including Mac, Linux and Windows.  This is NOT needed if you only want to\nflash the firmware into a board - see Binary Executable Instructions below in that case.\n\n1. Download and install Visual Studio Code.\n\n2. In VS Code (\"VSC\"), go to Extensions and seach for \"platformio\" and install it.  This will take some time, so\nwatch the status area in the bottom right of VSC for progress.  Note that PlatformIO (\"PIO\") also installs C/C++ \nextensions which are needed.\n\nWhen finished you will see a prompt \"Please restart VSCode\" so do that.\n\nWindows only: It is recommended that you install cygwin so that you have a bash terminal to use git.  There are other \noptions such as GitBash.  Point is, command-line git needs to be run to clone the source code repo unless you \nalready have/know a tool that will allow you to clone and manage a GitHub repository.\n\n3. Set up a Projects folder if you don't already have one.  For these instructions it is assumed that this is\n\u003chome\u003e/Documents/Projects.  VSC \"may\" be able to accomodate other directory structures, but of course, those\nhave not been tested.\n\n    Windows:  \u003chome\u003e = C:/Users/\u003cusername\u003e\n    Mac:      \u003chome\u003e = Users/\u003cusername\u003e\n\n4. Log into GitHub.com using your OWN PERSONAL credentials then clone this repository: \n    bentprong/ocp_ttf \n    \ninto your Projects folder.  Eg, \u003chome\u003e/Documents/Projects/ocp_ttf\n\n    GitHub Requirements:\n        a. SSH key generated and installed on this (YOUR) computer for YOU (new GitHub requirement)\n        b. SSH key for YOU installed in YOUR GitHub.com account\n\n5. In VSC, choose File | Open Folder... and navigate to \u003chome\u003e/\u003cProjects\u003e/ocp_ttf then highlight that, and\nclick Select Folder.\n\n6. In VSC, click the checkmark in the blue bar at the bottom to build.  This should install necessary files, \nlibraries and tools.  It may take quite a bit of time.  This builds the release code - not debug code. The\nrelease code is flashed to the board using Microchip Studio usually, while the debug code is used by VSC/PIO\nfor debugging purposes.\n\n7. In the repo folder platformio, open the README file and follow the instructions to configure PIO for the\nTTF board.  There are 2 steps to this process that are explained in the README.\n\n---\n** FLASHING NOTE ** Failure to exactly follow the instructions in the README in step #7 will\nresult in the code not building correctly!   That is because the files that must be copied or\nupdated define the pinouts for the TTF project.  You have been warned!\n---\n\n## Wiring Instructions\n1. Connect TTF board to ATMEL-ICE and connect ATMEL-ICE to computer\n2. Connect TTF board USB-C port to computer USB port using a DATA CABLE (not a charging only cable).\n3. Windows only: If not already installed, install a terminal emulator program such as TeraTerm.\n \nLED BEHAVIOR: Once the TTF board has been powered up, there will be 2 LEDs that are on solid: one\nfor 3.3V and one for 12V.  These 2 LEDs are near the Power connector.  If either is off, a hardware issue\nexists in one or both power supplies.  These 2 LEDs should always be on.\n\nA third LED may be lit if a NIC 3.0 board is inserted into the bay and the power is good to that board. \nThis is the OCP_PWR_GOOD LED.  UPDATE: The NIC 3.0 board is now no longer powered up when the TTF\nboard is powered up.  Use the 'power' command to power up the NIC 3.0 board.\n\nOn TTF board rev X07 and higher, a heartbeat LED is also present.  When the board is powered up, this\nLED will be on solid.  Once initialization is complete and a serial connection established with a host\ncomputer, the LED will blink slowly to indicate that the firmware is operational.\n\n## Build/Debug Instructions\nIn VSC, click Run | Start Debugging.  The code will be built for debug and you should see the debugger\nstop in main() at the init() call.   Click the blue |\u003e icon in the debugger control area of VSC.\n\nNOTE: Sometimes when using the debugger, the serial over USB does not immediately connect.  See \nTerminal Instructions below for more info.\n\n## Firmware Upload\nTo program release firmware in VSC, click the -\u003e in the blue bottom line of VSC.  Requires ATMEL-ICE.\n\n## Binary Executable Instructions\nFirmware is prebuilt in GitHub and located at:\n    bentprong/ocp_ttf/.pio/build/samd21g18a/firmware.bin\n\n    https://github.com/bentprong/ocp_ttf/tree/main/.pio/build/samd21g18a\n\nUse any flash utility such as Microchip Studio to erase and flash this .bin file into the TTF board.\n\nNOTE: PIO \"upload\" does not work because there is intentionally no bootloader on the TTF board.  At this\ntime, this OCP project does not support Arduino sketches.\n\n## Building Release Firmware\nIt is not necessary to build the firmware in order to use the released firmware.  In the paragraph\nbelow is the location of the firmware.bin file that needs to be programmed into the board using a tool\nsuch as Microchip Studio.\n\nTo build release firmware, in VSC, click the checkmark in the blue line at the bottom.  If no problems\nare reported (there should be none), the executable is located in the local directory here:\n    \u003chome\u003e/Projects/ocp-ttf/.pio/build/samd21g18a/firmware.bin\n\nNote that in this same location is also the firmware.elf file which is the debug version of firmware.\n\n## Microchip Studio\n1. Open Studio then select Tools | Device Programming.\n2. Select Atmel-ICE from the Tool pulldown menu.  Verify that the Device is ATSAMD21G18A then click\nthe Apply button.  A menu of options will appear on the left of the screen now.\n3. Select Memories then Erase Chip \u0026 Erase now.\n4. In the Flash (256KB) section, use the ... button to navigate to the binary file described above.\nThat full path and filename should be shown in the long text area.\n5. Click the Program button and wait for the status messages which should be:\n    Erasing device...OK\n    Programming Flash...OK\n    Verifying Flash...OK\n6. Click the Close button.\n\n---\nNOTE:  There may be a conflict between VSC and Microchip Studio if you are trying to use Studio to\nflash the firmware.  Close out VSC and Studio, then restart Studio.  The conflict would be in these\n2 software programs trying to use the Atmel-ICE at the same time.  If the problem persists, close\nStudio, unplug the Atmel-ICE, wait a few seconds, plug the Atmel-ICE back in, then restart Studio.\n---\n\n## Terminal Instructions\nSerial over USB does not require any of the traditional UART parameters such as baud rate. However,\nmany terminal programs do require this, so use 115200 in all tools.\n\n### Windows\nIt is helpful to have Device Manager (\"DM\") open and the Ports (COM \u0026 LPT) section expanded.  When first\nplugging the TTF board into a Windows computer and powering up TTF, a new COM port will be enumerated \nfor the serial terminal on TTF.   There is often an Intel(R) Active Management Technology - SOL (COMn) \nport already showing in DM that is NOT the COM port for TTF.\n\nOnce you see the COM port in DM, open TeraTerm, then start a new serial connection on the new COM port. \nYou should see the TTF welcome message and TTF prompt ttf\u003e in the TeraTerm window.  \n\nIf the board is powered down, you must close TeraTerm. After the board is powered back up, \nand the COM port is shown in DM, re-open TeraTerm and start a new connection.  \n\nThe reset button on TTF will not reliably re-establish a serial connection.\n\nFor board Rev X06 there is no visual indication of firmware status.  If in doubt about the serial\nconnection, press the ENTER key a few times in TeraTerm.  That should display the prompt.  If the\nprompt doesn't appear, close TeraTerm, power cycle TTF, then open TeraTerm and try again.\n\nFor board Rev X07, the heartbeat LED will be on solid while firmware is initializing and waiting\nfor a serial connection to TeraTerm.  Once the serial over USB connection is established, the LED \nwill start  blinking slowly and the welcome message and prompt will appear in the TeraTerm window.\n\n### Mac\nGet a listing of TTYs like this:\n    user@computer ~ % ls -l /dev/tty.usb*\n    crw-rw-rw-  1 root  wheel    9,   2 Jan 17 14:02 /dev/tty.usbmodem146201 \n\nEnter \"screen /dev/tty.usbmodem146201 115200\" (or whatever the output of the ls command indicates)\nand you should see the TTF welcome message and TTF prompt ttf\u003e in the terminal window.  While the\nbaud rate of 115200 doesn't apply to serial over USB, it is required by the screen command.\n\n### Linux (eg Ubuntu)\nYou can install 'screen' or 'minicom' using apt.  For screen, use the ls command\nas shown in the Mac section above to find the USBn device, then enter the command:\n\"screen /dev/ttyUSB0 115200\" for example if the connection is on ttyUSB0.  \n\nFor minicom, please search online for a tutorial on installation and usage.\n\nFor Mac and Linux, if TTF is powered down, you will see the connection drop in screen.  After the\nboard is powered back up, use up arrow or enter the same command used to start the connection.\n\n## Issues\nSee:\n    https://github.com/bentprong/ocp_ttf/issues\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Focp-net-nic3-ttf-mcu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomputeproject%2Focp-net-nic3-ttf-mcu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Focp-net-nic3-ttf-mcu/lists"}