• AVR Freaks

Hot!USB host on Curiosity board.

Author
LEverett
Starting Member
  • Total Posts : 66
  • Reward points : 0
  • Joined: 2009/06/04 09:34:48
  • Location: 0
  • Status: offline
2020/03/21 18:05:59 (permalink)
0

USB host on Curiosity board.

Hello all:
From
https://github.com/Microc...sb.git/trunk/apps/host
I checked out msd_basic version 416. It was a huge number of files.
Using MPLabX v5.35 and XC32 v2.40 I loaded project msd_basic/firmware/pic32mx470_curiosity.X
Following along the pdf documentation I found at:
http://www.microchip.com/...aspx?ddocname=en588545
I purchased a Curiosity PIC32MX470 development board part#DM320103
I connected the board to my PC (windows 10) and clean built the project. No errors or warnings.
I configured the board as described in the pdf file, loaded the program. No errors or warnings.
I also have the USB cables described in the pdf file. With the code running I insert a USB flash drive.
Nothing. The pdf says the program should write a file to the drive then illuminate one LED if successful and another if unsuccessful.
No LEDs are illuminated. I repeated this test for 3 different flash disks. None work.
I have tried stepping through with the debugger, it seems it works until it tries to attache the drive.
Any ideas of what else to try? Other software demos that work? Anyone else get this demo working?
 
#1

4 Replies Related Threads

    nigelwright7557
    Super Member
    • Total Posts : 373
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: USB host on Curiosity board. 2020/03/22 02:56:12 (permalink)
    2 (1)
    Flash drives formatted ?
    NTSC or FAT32 formatted ?
     
    #2
    LEverett
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2009/06/04 09:34:48
    • Location: 0
    • Status: offline
    Re: USB host on Curiosity board. 2020/03/26 13:31:36 (permalink)
    0
    I figured out what was happening on the curiousity board there is a jumper J13 that connects the VBUS to the usb connector. My board had no jumper so when it tried to power the usb nothing happened.
     
    Then I jumpered that and being lazy I left the usb in the port as I was loading the code. This caused the initialization to be confused. The documentation said to run the code FIRST then plug in the usb. I was being lazy and ignored that.
     
    Third if the usb does not constantly get a 1ms SOF (I think it is called) the device enters a suspend ??? not sure the name, state and must be reawakened. The debugger stopped the usb clock (I think) and so debugging was causing issues.
     
    Hope this might help others in similar situation. Jumper J13, do not use the debugger, run the code THEN put in the usb.
    #3
    LEverett
    Starting Member
    • Total Posts : 66
    • Reward points : 0
    • Joined: 2009/06/04 09:34:48
    • Location: 0
    • Status: offline
    Re: USB host on Curiosity board. 2020/03/26 13:32:58 (permalink)
    0
    Yep. It was formatted for FAT32.
    I found my dumb mistakes and just posted.
    Thanks for reading.
     
    #4
    ric
    Super Member
    • Total Posts : 26159
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: USB host on Curiosity board. 2020/03/26 19:29:59 (permalink)
    0
    nigelwright7557
    Flash drives formatted ?
    NTSC or FAT32 formatted ?

    Watch that! ;)
     

    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!
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5