Programming OTP memory via SPI boot

Programming OTP memory via SPI boot

This application note describes how to create a binary image which can be used to program the xCORE tile OTP memory via SPI boot. This is the XMOS recommended process for a production programmer which would be used to program application data into the OTP memory in volume production.

The code associated with this application note provides a simple example which demostrates building an application which then, using the XMOS development tools, produces a SPI flash image that can be used to boot the xCORE, program the OTP and then signal that the device has been programmed correctly via GPIO ports on the xCORE device.

With the development flow presented here it is possible to design and manufacture a programmer that could be used to program xCORE devices with custom firmware images as required.

Example code is provided to allow a simple example to be built into the SPI programming image for the xCORE OTP.

Required tools and libraries

  • xTIMEcomposer Tools - Version 13.2

Required hardware

This application note is designed to run on any XMOS xCORE multicore microcontroller that is able to boot from SPI and has OTP memory available for programming.

The example code provided with the application has been implemented and tested on an XMOS general purpose sliceKIT (XK-SK-L2-ST) but there is no dependancy on this board and it can be modified to run on any board containing an XMOS xCORE processor.

Note that the application example can only be run once successfully on the target hardware as the OTP memory is one time programmable.

Prerequisites

  • This document assumes familiarity with the XMOS xCORE architecture, the XMOS tool chain and the xC language. Documentation related to these aspects which are not specific to this application note are linked to in the References appendix.
  • For descriptions of XMOS related terms found in this document please see the XMOS Glossary [1].
  • The XMOS tools manual contains information regarding the use of xSCOPE and how to use it via code running on an xCORE processor [2].
[1]

http://www.xmos.com/published/glossary

[2]

http://www.xmos.com/published/xtimecomposer-user-guide