Here are some details on my project: IDE: MPLABX on Mac OS X MCU: PIC32MX250F128B Programmer: Microstick II Git Repository: The device enumerates, and Im able to see that Windows 7 and Mac OS X is able to identify the device.However in Windows, Im getting an error: This device cannot start.
Bluetooth Hid Device Code 10 Code To GetAfter redoing my breadboard wiring this week to try and improve the signal quality, Ive come to tonight, trying to alter my code to get things working.Im using USBINTERRUPT mode, and have my descriptor looks as follows: ROM USBDEVICEDESCRIPTOR devicedsc 0x12, Descriptor size in bytes USBDESCRIPTORDEVICE, Device descriptor type 0x0200, USB spec release number in BCD format 0x00, Class code 0x00, Subclass code 0x00, Protocol code USBEP0BUFFSIZE, Max packet size for EP0 MYVID, Vendor ID MYPID, Product ID 0x0001, Device release number in BCD format 0x01, Manufacturer string index 0x02, Product string index 0x00, Device serial number string index 0x01 Number of possible configurations; the above represents a Joystick with one button, so Im trying to start small.
Bluetooth Hid Device Code 10 Mac OS X MCUMy HID report looks like this: typedef union INPUTCONTROLSTYPEDEF BYTE buttons; INPUTCONTROLS; Ive also set the descriptor size to 28 bytes in usbconfig.h: define HIDRPT01SIZE 28 This is about the furthest Ive come with this project ever, but Im face to face with a brick wall, that wont budge. Bluetooth Hid Device Code 10 Full Contents OfThe full contents of main.c is at my GitHub repository Im testing my device on both Mac and Windows 7 via VMWare. What Ive done is light up an LED on Pin 2 (RA0) when USBDeviceState CONFIGUREDSTATE, and all I know is that the device is in CONFIGUREDSTATE, as the LED lights up a few moments after the device is plugged in. I also managed to get the following from the USBLizer trial version: I cant set breakpoints in MPLABX, and halt the MCU to investigate the issue, because of USB clock timing requirements, so really stuck as to how I can troubleshoot and fix this. I also got a more recent clue, HIDTxPacket() is never getting called from inside ProcessIO, hence Im also not seeing any packets being sent in USBLyzer. This must be why Windows is complaining as its never receiving any HID reports from my device. Ill check this out a bit later tonight, need to kick up my feet a bit to clear my head. Forgot that in pic32 it is automatically declared as the interrupt handler when you specify USBINTERRUPT. HIDTxPacket is in fact getting called, but the piece of junk is still persisting with its f-ing Code 10 error. Its driving me insane, why the hell does this have to be such a bloody battle. Its been DAYS that Iv been trying to get this darned USB device working.:( Is it something to do with the fact that I have the device plugged in via the debugger USB and the second USB plug, causing Windows to become confused Is it because my HID report is wrong, is the size wrong, is HIDRPT01SIZE incorrect in usbconfig.h Is it because Im using VMWare Ill restart into my Bootcamp version of Windows shortly to check. Bloody hell, WTH does this thing want from me Is the PIC32MX250F128B USB module faulty Should I rather get a PicKit3, power the device from VUSB entirely, and instead of using the MicroStick 3.3V power supply, build my own. Why the HELL does flippant Microchip supply examples for every other freaking board they have, but leave the bloody MicroStick II out of the equation. I was using EPOUT instead of EPOUT (with leading underscore). I brought a USB Starter Kit II, and the first thing I did was to test my code on it. Ill try to rebuild the board again for interest sake later on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |