question about set_adress

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

question about set_adress

557 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by joyhope on Mon Sep 23 19:14:45 MST 2013
In the lpcUSBlib

The set address is called SIE_WriteCommandData two times.

static inline void USB_Device_SetDeviceAddress(const uint8_t Address)
{
SIE_WriteCommandData(CMD_SET_ADDR, DAT_WR_BYTE(DEV_EN | Address)); /* Don't wait for next */
SIE_WriteCommandData(CMD_SET_ADDR, DAT_WR_BYTE(DEV_EN | Address)); /*  Setup Status Phase */
}

why the SIE_WriteCommandData should be called two times?



Labels (1)
0 Kudos
1 Reply

538 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Wed Sep 25 08:34:35 MST 2013
In UM10139 - LPC214x User Manual, this description is found.

14.9.1 Set Address (Command: 0xD0, Data: write 1 byte)
The Set Address command is used to set the USB assigned address and enable the (embedded) function. The address set in the device will take effect after the status phase of the setup token. (Alternately, issuing the Set Address command twice will set the address in the device).


You'll see the same description for LPC23xx/24xx, LPC17xx and LPC1343

Tsuneo
0 Kudos