Hello, I have two matters to discuss please and they are very important for me. i hope you can help me as soon as possible.
I'm using TM4C123gxl tivac launchpad with TM4C123GH6PMI onboard. i'm working with Keil Uvision 5 with lagacy support and working with CCS 6.0.1 as well.
1) the SysCtlClockGet() in the Driver library version 2.1.0.12573 for Tivac series for the TM4C123GH6PMI did not report the correct frequency!! for example, i set my frequency to 80MHz with 16MHz external oscillator, then calling the SysCtlClockGet() results in a strange clock, while calling the ROM_SysCtlClockGet() results in the correct 8000000 frequency. this is a bug that i thought i should inform you about it. any use for the SysCtlClockGet() inside any function can result in bad behavior, it is good that TI examples always uses the ROM_SysCtlClockGet().
2) I have tested the Airmouse application for the sensors board. it is working with USB HID, MPU 9150 IMU. i have set the example frequency to be 80MHz. for working as an HID mouse, we should define the polling interval in our endpoint descriptors. i found the polling interval set to 16 for both keyboard and mouse endpoints which results in 62Hz mouse update rate on screen while the normal mouse in any PC have 125Hz update rate which means polling interval set to 8.
I have tried setting the polling interval in all mouse and keyboard endpoints to 8, 2 , 4, and 1 with no results!! it has no effect and i do not know why!! it is always kept 62Hz poling rate despite and changes. I have read that requesting polling intervals more than 125Hz requires drivers on host side, and that 125Hz is the default Polling interval for windows. I also tried several Chinese cheap mouse and they all worked on 125Hz with no drivers required. so why this example keeps stuck in 62Hz slow update rate?? the controller in far more fast and powerful than anything in the Chinese mouse and there is no reason to be slow! can anyone please help me in this issue ??
the polling interval for the mouse endpoint is defined in the usbdhidmouse.c file inside the usblib\device folder, here is the part
const uint8_t g_pui8HIDInEndpoint[HIDINENDPOINT_SIZE] = { // // Interrupt IN endpoint descriptor // 7, // The size of the endpoint descriptor. USB_DTYPE_ENDPOINT, // Descriptor type is an endpoint. USB_EP_DESC_IN | USBEPToIndex(USB_EP_1), USB_EP_ATTR_INT, // Endpoint is an interrupt endpoint. USBShort(USBFIFOSizeToBytes(USB_FIFO_SZ_64)), // The maximum packet size. 16, // The polling interval for this endpoint. };
for the keyboard, it is define in usbdhidkeyb.c in the following lines
static const uint8_t g_pui8HIDInEndpoint[HIDINENDPOINT_SIZE] = { // // Interrupt IN endpoint descriptor // 7, // The size of the endpoint descriptor. USB_DTYPE_ENDPOINT, // Descriptor type is an endpoint. USB_EP_DESC_IN | USBEPToIndex(USB_EP_1), USB_EP_ATTR_INT, // Endpoint is an interrupt endpoint. USBShort(USBFIFOSizeToBytes(USB_FIFO_SZ_64)), // The maximum packet size. 16, // The polling interval for this endpoint. }; static const uint8_t g_pui8HIDOutEndpoint[HIDOUTENDPOINT_SIZE] = { // // Interrupt OUT endpoint descriptor // 7, // The size of the endpoint descriptor. USB_DTYPE_ENDPOINT, // Descriptor type is an endpoint. USB_EP_DESC_OUT | USBEPToIndex(USB_EP_2), USB_EP_ATTR_INT, // Endpoint is an interrupt endpoint. USBShort(USBFIFOSizeToBytes(USB_FIFO_SZ_64)), // The maximum packet size. 16, // The polling interval for this endpoint. };
I hope anyone can help me!
Thank you!