I'm trying to find documentation for the CNFV0 bit in the USB Configuration Value Register (UCVR), in the H8S/2218-H8S/2212 USB module. The hardware manual says CNFV0 "stores the Configuration value when the Set_Configuration command is received." The problem is, CNFV0 is a single bit, and the Set_Configuration value is a byte value in the range 1 to 255. Does anyone know what gets stored for CNFV0?
Well when you set the UCVR register to a byte value lets say: UCVR= 16 that means that bit 5 will be set.... CNFV0 is bit 5 from the 8 bits of the byte.
Does that make sense? I believe you can also set a specific bit on a register two if you know the name in this case CNFV0
Thanks, but that wasn't my question. I know how to set and read bits in H8S registers. My question pertains to how the H8S/2212 implements the USB protocol.
The USB protocol has a standard control message, Set_Configuration, which is sent from the host (e.g. a PC) to a USB device (e.g. the H8S). In that message, a "wValue" is sent, which contains the configuration number. To be specific, wValue is 16 bits, of which the high 8 bits is zero and the low 8 bits specifies a configuration number. Values of 1-255 are valid configuration numbers, and 0 means "not configured."
The H8S/2212 hardware manual says that the Set_Configuration message is processed automatically by the USB controller (section 14.5.8, "Processing of USB Standard Commands and Class/Vendor Commands"). The only place the Configuration value appears is in the UCVR register, where bit CNFV0 "stores the Configuration value when the Set_Configuration command is received."
CNFV0 is a single bit, yet it is being used to "store" an 8-bit Configuration value received in a USB command. My question is, how is that 8-bit value stored? Does CNFV0 store the least-significant bit of the Configuration value? Does the H8S USB controller only recognize Configuration values 1 and 2? Or possibly 0 and 1? I'd like to be able to use two different configuration values, but I don't know which values the H8S/2212 will recognize.
©2003–2009 Renesas Technology Corp. All rights reserved. Using Our Website | Privacy
Contact us