User Manual UM10430 - ROM API description errors

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

User Manual UM10430 - ROM API description errors

914 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fcarlo on Thu Sep 27 00:51:01 MST 2012
Hi all,
I would like to ask if there could be some errors in the LPC185x User Manual (Rev. 1.6):
----------
#1 pag.613
----------
RegisterEpHandler

Function to register interrupt/event handler for the requested endpoint with USB device stack.
The application layer uses this function to register the custom class's EP0 handler. The stack calls
all the registered class handlers on any EP0  event before going through default handling of the
event. This gives the class handlers to implement class specific request handlers and also to
override the default stack handling for a particular event targeted to the interface. Check
USB_EP_HANDLER_T for more details on how the callback function should be implemented.
hUsbHandle to the USB device stack.ep_indexClass specific EP0 handler function. pfnClass
specific EP0 handler function. dataPointer to the data which will be passed when callback function
is called by the stack.
Parameters:
1. hUsb = Handle to the USB device stack.
2. ep_index = Class specific EP0 handler function.
3. pfn = Class specific EP0 handler function.
4. data = Pointer to the data which will be passed when callback function is called by the stack.


As far I can understand, there is something wrong in the description.
I think that the function above should be used to register the interrupt handler of ANY endpoint (passing ep_index parameter), not only for the EP0!


----------
#2 pag.600
----------
USBD_API_INIT_PARAM

pad0 uint8_tuint8_t USBD_API_INIT_PARAM::pad0[3][3]

Looking at the "usbd_core.h" found in the CMSIS library, the above structure is not defined in the typedef struct USBD_API_INIT_PARAM { ... }


Is there someone that could confirm if there could be something wrong or if I am missing something?
thanks
Labels (1)
0 Kudos
Reply
2 Replies

859 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fcarlo on Wed Oct 03 01:51:48 MST 2012
Hi Daniel,

I'm quite confused now, because I have three different options from which I can choose from:

1) UM10430 (rev 1.6): pag 600 - USBD_API_INIT_PARAM

   pad0 uint8_tuint8_t USBD_API_INIT_PARAM::pad0[3][3]

2) Online doc
   http://docs.lpcware.com/usbromlib/v1.0/mw__usbd__core_8h_source.html

   uint8_t pad0[3];

3) Latest CMSIS library available ($Id: usbd_core.h 7348 2011-05-10 23:30:39Z usb10131 $)
   \lpc18xx\lpc18xx\ ... \usbd\usbd_core.h

   any "pad0" field found in the defined USBD_API_INIT_PARAM structure.


Which one of these is correct?
Is there any difference of the ROM API programmed into the different silicon revisions? (I have "Rev. A" parts only).

Thanks
0 Kudos
Reply

859 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Daniel Widyanto on Tue Oct 02 20:32:01 MST 2012
Hi fcarlo,

Thanks for your feedback. If you need more info to develop your own USB class handler based on USBD ROM, you can check USBD ROM online documentation at http://www.lpcware.com/content/nxpfile/usb-device-rom-stack-api

FYI, this page is very useful to init and getting started with your custom USB class handler based on USBD ROM:
http://docs.lpcware.com/usbromlib/v1.0/_page__developing_with_u_s_b_d.html

For RegisterEpHandler, yes it's suppose to register interrupt handler for any of the physical endpoints (not just EP0). I'll notify the documentation people to fix it. For USBD_API_INIT_PARAM definition, you can take a look at http://docs.lpcware.com/usbromlib/v1.0/mw__usbd__core_8h_source.html

I'm not sure where to download these files yet, but I'll posted it here once I got some info

0 Kudos
Reply