Hot!SOLVED - PIC32MZ USB MSD example

Author
SScheiff
Starting Member
  • Total Posts : 36
  • Reward points : 0
  • Joined: 2017/10/14 10:55:10
  • Location: 0
  • Status: offline
2018/09/05 17:31:33 (permalink)
0

SOLVED - PIC32MZ USB MSD example

I am trying to get the MSD basic example to work on my custom board to verify that my hardware is correct. I have been able to successfully run the example on the PIC32MZ starter kit, so I know the application works. The only modification between my board and the starter kit is the power enable. In the application it never gets out of APP_STATE_WAIT_FOR_BUS_ENABLE_COMPLETE because it always returns 0x00 on USB_HOST_BusIsEnabled(0).
 
Here is what I have checked and verified so far. The power switch does turn on and supplies 5V to the stick (although my supply is running a little high at 5.5V). I also verified that I am supplying the 5V to the VBUS (pin73). I also verified that I am supplying 3.3V to VUSB3V3. I used an internal pull-down on USBID to make sure it is setup as a host. 
 
So far I am not able to get it to recognize that the USB bus is on. It has to be something about my hardware that I am just not seeing as the application works on the starter kit. Anyone have any ideas? Did I miss a pin or connection that I need to make this work?
 
Any ideas would be greatly appreciated.
 
Regards,
 
Sebastian
post edited by SScheiff - 2018/10/18 20:46:22
#1

4 Replies Related Threads

    nigelwright7557
    Senior Member
    • Total Posts : 131
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: PIC32MZ USB MSD example 2018/09/06 00:34:25 (permalink)
    0
    I have 100r in series with my vbus.
    Vusb goes to 3v3.
    Other than that maybe vbus is configured as an output in harmony ?
     
    You could maybe kid the software that vbus is high somehow ?
     
     
    #2
    SScheiff
    Starting Member
    • Total Posts : 36
    • Reward points : 0
    • Joined: 2017/10/14 10:55:10
    • Location: 0
    • Status: offline
    Re: PIC32MZ USB MSD example 2018/09/06 07:03:34 (permalink)
    0
    I currently do not have a resistor in series but it is in my new board revision. I was wanting to get the USB to work before ordering more boards.
     
    I will double check to see if the configuration is different, but as I said above, the only configuration change between the starter kit and my board is the pin to turn on the USB power switch.
    #3
    SScheiff
    Starting Member
    • Total Posts : 36
    • Reward points : 0
    • Joined: 2017/10/14 10:55:10
    • Location: 0
    • Status: offline
    Re: PIC32MZ USB MSD example 2018/09/07 07:51:53 (permalink)
    0
    I think I may have solved the issue. I had an issue with my oscillator on my design and had been using the internal FRC for testing. I left it on FRC when I used the starter kit to check the configuration. However, it looks like the USB PLL bypasses the FRC completely. So on the starter kit it still had the oscillator input to run the USB PLL although I wasn't using it for the main clock. On my own board I did not have that input and therefore the USB PLL was not running. I won't know for sure until I get my new boards in with the correctly functioning Oscillator.
    #4
    SScheiff
    Starting Member
    • Total Posts : 36
    • Reward points : 0
    • Joined: 2017/10/14 10:55:10
    • Location: 0
    • Status: offline
    Re: PIC32MZ USB MSD example 2018/10/18 20:47:53 (permalink)
    0
    It was the issue described in my last post. You cannot run the USB from the internal oscillator. You need either an external crystal or oscillator for USB to work.
    #5
    Jump to:
    © 2018 APG vNext Commercial Version 4.5