2009-06-06 06:01 AM
a question about stm32 hid software
2011-05-17 04:14 AM
Hi,
Strange but true, I came here today to ask why in 'usb_int.c' the following line included:- _SetISTR((u16)CLR_CTR); /* clear CTR flag */ when the reference manual states that it is read-only? Should this line be left out in reality? What actually clears it? Thanks, Nick.2011-05-17 04:14 AM
In the custom hid project, the hid descriptor is like following:
0x05, 0x8c, /* USAGE_PAGE (ST Page) */ 0x09, 0x01, /* USAGE (Demo Kit) */ 0xa1, 0x01, /* COLLECTION (Application) */ /* Led 1 */ 0x85, 0x01, /* REPORT_ID (1) */ 0x09, 0x01, /* USAGE (LED 1) */ 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 0x25, 0x01, /* LOGICAL_MAXIMUM (1) */ 0x75, 0x08, /* REPORT_SIZE (8) */ 0x95, 0x01, /* REPORT_COUNT (1) */ 0xB1, 0x82, /* FEATURE (Data,Var,Abs,Vol) */ 0x85, 0x01, /* REPORT_ID (1) */ 0x09, 0x01, /* USAGE (LED 1) */ 0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */ What on earth the last 3 lines used for? A feature main item or output main item? I think the last 3 lines is useless. sencond question: In the endpoint descriptor,can one endpoint both used as interrupt in and interrupt out? third question:in function CTR_LP(),the sentence try to clear CTR flag in ISTR reg using _SetISTR((u16)CLR_CTR),but i see the CTR flag is read only in the stm32 reference manual,why? [ This message was edited by: cgha21 on 06-06-2009 11:08 ]2011-05-17 04:14 AM
Hi,
''_SetISTR((u16)CLR_CTR); /* clear CTR flag */ '' => obiously This is mistake and clearing this flag has no sense. Thank you for reporting this issue. Cheers, STOne-32.