|
|
View previous topic :: View next topic |
Author |
Message |
DiegoGarcia
Joined: 01 Mar 2008 Posts: 48
|
Why USB driver uses 74% of RAM ? |
Posted: Sat Mar 08, 2008 12:29 pm |
|
|
Anyone of you guys knows why this usb driver uses all that much of ram ?
I think it is because the interrupt but don't know if I'm sure.
Regards,
Diego Garcia |
|
|
Ttelmah Guest
|
|
Posted: Sat Mar 08, 2008 3:50 pm |
|
|
It is a very large and complex driver. There is a lot to USB....
However it'd help massively, if you said 'what chip', using what USB implementation, etc. etc..
Best Wishes |
|
|
DiegoGarcia
Joined: 01 Mar 2008 Posts: 48
|
|
Posted: Sat Mar 08, 2008 8:02 pm |
|
|
Oh sorry for that
I'm using PIC18F67J50 and usb_desc_hid ...
using one endpoint with 2 reports one input and one output.
I think that is all ;)
Regards,
Diego Garcia |
|
|
Ttelmah Guest
|
|
Posted: Sun Mar 09, 2008 4:09 am |
|
|
OK.
You can't use the 'descriptor', without a lot of other files. In your case, you are presumably using ex_usb_hid.c, or something similar of your own?. This will load the pic18_usb.h file, which provides the actual hardware driver, and configures the _buffering_ needed by USB. Now the default on the 18J chips, for the USB buffer, is to use the available RAM, -0x500. This uses 68% of the available RAM. Add the variables used, and 3/4 of your memory has gone. You can protentially reduce the buffer size, and limit the maximum number of endpoints allowed (the default is for all 16 to be enabled), with careful configuration of the USB device, but a significant 'slice' of this RAM, is _required_ by the USB hardware. This is why the 'available RAM' figure on these chips, has a big warning '*' against it, pointing out that this includes RAM used by the USB hardware...
Best Wshes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|