question about set_adress

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

question about set_adress

1,006 次查看
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?



标签 (1)
0 项奖励
回复
1 回复

987 次查看
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 项奖励
回复