Building a USB/IIC/SPI Bridge with ColdFire OTG Module
Guide for implementing a USB-to-I2C/SPI bridge using Freescale MCF522xx ColdFire MCUs to interface a Windows PC with external EEPROM memories.
Overview
This application note provides a technical reference for using the USB On-The-Go (OTG) module of Freescale MCF522xx ColdFire microcontrollers as a communication bridge. The design enables a PC running Windows to read and write to I2C and SPI EEPROMs, specifically the Atmel AT24C02B and AT25020A. It details the configuration of the CMX USB stack, customized USB data packets, and device descriptors. The document covers firmware development in CodeWarrior, interrupt priority management for USB, SPI, and IIC modules, and the creation of a PC-side host application using Visual Studio and the Microsoft USB Host API.
Use Cases
- Interfacing a PC with I2C or SPI peripherals via USB
- Programming external EEPROM memories from a computer
- Developing custom USB device classes for industrial communication
- Prototyping USB-to-serial protocol converters
Topics
Referenced Parts
AT24C02B
Atmel
Serial EEPROM AT24C02B (IIC protocol)
AT25020A
Atmel
Serial EEPROM AT24C02B (IIC protocol) and an AT25020A (SPI protocol).
x86
NXP
• Bulkusb.sys was built using WinXP x86 Free Build Environment command line found on
| MCF52221 | Freescale Semiconductor | flash object image for the MCF52221. |
| AT24C02B | Atmel | Serial EEPROM AT24C02B (IIC protocol) |
| AT25020A | Atmel | Serial EEPROM AT24C02B (IIC protocol) and an AT25020A (SPI protocol). |
| x86 | NXP | • Bulkusb.sys was built using WinXP x86 Free Build Environment command line found on |