NXP Semiconductors LPC24XX UM10237 User Manual

Page 418

Advertising
background image

UM10237_4

© NXP B.V. 2009. All rights reserved.

User manual

Rev. 04 — 26 August 2009

418 of 792

NXP Semiconductors

UM10237

Chapter 15: LPC24XX USB OTG controller

Set BDIS_ACON_EN in external OTG transceiver

/* Set BDIS_ACON_EN in ISP1302 */

OTG_I2C_TX = 0x15A; // Send ISP1302 address, R/W=0

OTG_I2C_TX = 0x004; // Send Mode Control 1 (Set) register address

OTG_I2C_TX = 0x210; // Set BDIS_ACON_EN bit, send STOP condition

/* Wait for TDI to be set */

while (!(OTG_I2C_STS & TDI));

/* Clear TDI */

OTG_I2C_STS = TDI;

Clear BDIS_ACON_EN in external OTG transceiver

/* Set BDIS_ACON_EN in ISP1302 */

OTG_I2C_TX = 0x15A; // Send ISP1302 address, R/W=0

OTG_I2C_TX = 0x005; // Send Mode Control 1 (Clear) register address

OTG_I2C_TX = 0x210; // Clear BDIS_ACON_EN bit, send STOP condition

/* Wait for TDI to be set */

while (!(OTG_I2C_STS & TDI));

/* Clear TDI */

OTG_I2C_STS = TDI;

Discharge V

BUS

/* Clear the VBUS_DRV bit in ISP1302 */

OTG_I2C_TX = 0x15A; // Send ISP1302 address, R/W=0

OTG_I2C_TX = 0x007; // Send OTG Control (Clear) register address

OTG_I2C_TX = 0x220; // Clear VBUS_DRV bit, send STOP condition

/* Wait for TDI to be set */

while (!(OTG_I2C_STS & TDI));

/* Clear TDI */

OTG_I2C_STS = TDI;

/* Set the VBUS_DISCHRG bit in ISP1302 */

OTG_I2C_TX = 0x15A; // Send ISP1302 address, R/W=0

OTG_I2C_TX = 0x006; // Send OTG Control (Set) register address

OTG_I2C_TX = 0x240; // Set VBUS_DISCHRG bit, send STOP condition

/* Wait for TDI to be set */

while (!(OTG_I2C_STS & TDI));

/* Clear TDI */

OTG_I2C_STS = TDI;

Advertising