• AVR Freaks

Hot!Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10

Author
alcor777
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2018/05/31 16:37:24
  • Location: 0
  • Status: offline
2020/08/17 22:56:47 (permalink)
0

Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10

Hello,
With Harmony 3.0 , I'm trying to implement a simple USB HID data communication with a Pic32MZ2048EFH064 and it fails.
I noticed when I plug the USB connector the appData.state is changing from APP_STATE_WAIT_FOR_CONFIGURATION to APP_STATE_MAIN_TASK, as it should be.
When I enumerate the available HID device on my PC, it goes back to APP_STATE_WAIT_FOR_CONFIGURATION, and no way to come back to APP_STATE_MAIN_TASK, unless to unplug/plug the USB connector.
 
I never come to this point ->
switch(appData.receiveDataBuffer[0])
 
On windows' side USBlogview (https://www.nirsoft.net/utils/usb_log_view.html) does not indicate any USB disconnection...
 
This is very strange ... I do not understand why.
 
Rgds,
 
PS : OCS is  24Mhz.
 
 
post edited by alcor777 - 2020/08/17 23:12:31
#1

5 Replies Related Threads

    alcor777
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2018/05/31 16:37:24
    • Location: 0
    • Status: offline
    Re: Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10 2020/08/19 21:44:23 (permalink)
    0
    I have noticed that If I take the sample software from Harmony and the PC C++ sample software from microchip that the call to
    WriteHandle = CreateFile((DetailedInterfaceDataStructure->DevicePath), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0);
    under windows  10 cause the LED to go off from the demo board...
    Devicepath is ->
    "\\\\?\\hid#vid_04d8&pid_003f#9&1c938d59&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"
    #2
    LdB_ECM
    Super Member
    • Total Posts : 456
    • Reward points : 0
    • Joined: 2019/04/16 22:01:25
    • Location: 0
    • Status: offline
    Re: Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10 2020/08/19 22:40:56 (permalink)
    4 (1)
    The MS windows USB enumeration has never changed it is 16 published steps.
    https://techcommunity.microsoft.com/t5/microsoft-usb-blog/how-does-usb-stack-enumerate-a-device/ba-p/270685
     
    Manufacturers who provide there own drivers can do whatever they like but if you are relying on windows to pick up your device you need to respond correctly to each USB request windows will make to your device.
    #3
    alcor777
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2018/05/31 16:37:24
    • Location: 0
    • Status: offline
    Re: Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10 2020/08/19 23:12:01 (permalink)
    0
    Solution is here -> 
    https://www.microchip.com/forums/tm.aspx?m=1075689&mpage=2
    For me there is a bug either in Harmony or even worse a silicon bug in pic32MZ ...
     
    I can send and get data from the device, but no in debug mode, I have to program the device ans remove the pick4 programmer and run my board standalone... Also this is strange but I made a big step.
    #4
    alcor777
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2018/05/31 16:37:24
    • Location: 0
    • Status: offline
    Re: Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10 2020/08/26 21:13:42 (permalink)
    5 (1)
    BUT 
     
    I'm somehow disappointed that it took so much time and effort to make it work. This is an off-the-shelve demo that simply does not work with Pic32MZ. I'm hoping this is not a silicon bug.
    I would love to have the opinion of a microchip engineer or a guru here.
     
    I'm trying to change status to SOLVED but I have "access denied" in this server... another bug.
    post edited by alcor777 - 2020/08/26 21:16:26
    #5
    ric
    Super Member
    • Total Posts : 28975
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Stuck in APP_STATE_WAIT_FOR_CONFIGURATION after enumeration of HID under windows 10 2020/08/26 22:14:44 (permalink)
    5 (1)
    alcor777
    I'm trying to change status to SOLVED but I have "access denied" in this server... another bug.

    That is because there is a live URL in your first post, triggering a brain dead firewall on the web server this forum runs under.
    See: How to avoid errors when editing posts

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #6
    Jump to:
    © 2020 APG vNext Commercial Version 4.5