Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HostControllerCommunicationsArea Struct Reference
The Host Controller Communications Area (HCCA) is a 256-byte structure of system memory that is used by system software to send and receive specific control and status information to and from the HC. More...
#include <UsbStructures.h>
| Data Fields | |
| uint32_t | interruptTable [32] | 
| These 32 Dwords are pointers to interrupt EDs. | |
| uint16_t | frameNumber | 
| Contains the current frame number. | |
| uint16_t | pad1 | 
| When the HC updates HccaFrameNumber, it sets this word to 0. | |
| struct TransferDescriptor * | doneHead | 
| When the HC reaches the end of a frame and its deferred interrupt register is 0, it writes the current value of its HcDoneHead to this location and generates an interrupt if interrupts are enabled. | |
| uint8_t | reserved [120] | 
| Reserved for use by HC, also makes the data after this 16 byte aligned. | |
| Device | deviceZero | 
| I have added onto the end of this alligned struct some extra data that I don't want to be taken out of the main 32k of main ram. | |
| LinkedListItem | memoryPool [32] | 
| My memory pool of 32 byte objects that MUST be aligned on a 16byte boundry. | |
| uint8_t | scratchRam [256] | 
| And now some scratch ram to used when I am reciving strings. | |
Detailed Description
The Host Controller Communications Area (HCCA) is a 256-byte structure of system memory that is used by system software to send and receive specific control and status information to and from the HC.
This structure must be located on a 256-byte boundary. System software must write the address of this structure in HcHCCA in the HC. This structure allows the software to direct the HC�s functions without having to read from the Host Controller except in unusual circumstances (e.g., error conditions). Normal interaction with the Host Controller can be accomplished by reading values from this structure that were written by the Host Controller and by writing to the HC�s operation registers.
Definition at line 421 of file UsbStructures.h.
Field Documentation
| Device deviceZero | 
I have added onto the end of this alligned struct some extra data that I don't want to be taken out of the main 32k of main ram.
Device zero is used for enumeration and setup when a usb device is inserted.
Definition at line 469 of file UsbStructures.h.
| struct TransferDescriptor* doneHead | 
When the HC reaches the end of a frame and its deferred interrupt register is 0, it writes the current value of its HcDoneHead to this location and generates an interrupt if interrupts are enabled.
This location is not written by the HC again until software clears the WD bit in the HcInterruptStatus register. This protocol provides an interlocked exchange of the Done Queue. The LSb of this entry is set to 1 to indicate whether an unmasked HcInterruptStatus was set when HccaDoneHead was written. I don't process this in the interupt but in the driver update. The interupt flags the driver that stuff is done.
Definition at line 454 of file UsbStructures.h.
| uint16_t frameNumber | 
Contains the current frame number.
This value is updated by the HC before it begins processing the periodic lists for the frame.
Definition at line 433 of file UsbStructures.h.
| uint32_t interruptTable[32] | 
These 32 Dwords are pointers to interrupt EDs.
Definition at line 426 of file UsbStructures.h.
My memory pool of 32 byte objects that MUST be aligned on a 16byte boundry.
So don't move this entry or add stuff before it! It is 32 bytes as the transfer descriptor needs an extra 16 bytes for my driver so I can do callbacks when a transfer is complete. Without it then I would need some kind of horrid lookup table and code that could add bugs. This way it is nice, clean, and simple.
Definition at line 479 of file UsbStructures.h.
| uint16_t pad1 | 
When the HC updates HccaFrameNumber, it sets this word to 0.
Definition at line 438 of file UsbStructures.h.
| uint8_t reserved[120] | 
Reserved for use by HC, also makes the data after this 16 byte aligned.
Definition at line 459 of file UsbStructures.h.
| uint8_t scratchRam[256] | 
And now some scratch ram to used when I am reciving strings.
Definition at line 484 of file UsbStructures.h.
Generated on Wed Jul 13 2022 15:27:32 by
 1.7.2
 1.7.2