Hi to all, I am new in keil v5 and i want to implement usb ufi class mass storage under cbi protocol and i want use keil usb custom class in order to done that,but i do not know how i can use keil custom class and port it to my MCB17000 board and after searching in internet i do not find anything about that. Can any one me how can i create and config project with keil usb custom class??
Well, you should try to first understand things before implementing functionality as otherwise you are only guessing and using trial and error mechanism.
Anyways, if you defined all configuration paramaters for your device then when SetConfiguration request is received by USB stack it will configure and start all endpoints that device uses. In case that you are doing what you are doing, USB stack will not configure any endpoints nor start any communication, and you say you do not handle that request but return usbdRequestOK, so it can not work that way.
SetConfiguration request is very important if you do want to override default functionality of the USB stack you should know much more of what you need to do, but I do not see much reason why you would override SetConfiguration request, you can catch it to know when USB Host has requested that your device is configured but you should leave processing to USB stack.
as i said i want to implement ufi spec under cbi communication protocol so i need 4 endpoint as below :
endpoint 0 : default control endpoint endpoint 1 : bulk in and out endpoint endpoint 2 : interrupt endpoint
i add these endpoints to USBD_Config_CustomClass_0.h as i need, but when leaving processing of SetConfiguration command to usb_stack it fail to handle it, i say this because after receiving this command and i return usbdRequestNotProcessed, usb_stack do not call USBD_Device0_Endpoint0_SetupPacketProcessed function that must call after processing received command. also after leaving this command to usb_stack i dose not receive any setup packet in USBD_Device0_Endpoint0_SetupPacketReceived function. now i am searching for solution for this problem.
I can already point one problem if you setup your endpoints as described, by documentation LPC17xx microcontroller has specific endpoint types for specific endpoint numbers for example endpoint 1 can not be of bulk type but only interrupt, and endpoint 2 can only be of bulk type. So, I first suggest you reverse to use endpoint 2 as bulk, and endpoint 1 as interrupt.
you are my best man Milorad, it worked and my problem was that you point. because i was in hurry to done this project i didn't read lpc17xx datasheet. thanks again.
Ignoring the data sheets seldom speeds up the progress.