• AVR Freaks

Hot!Yet another "how do i create an usb (host) project from scratch in harmony?" thread

Author
JPortici
Super Member
  • Total Posts : 725
  • Reward points : 0
  • Joined: 2012/11/17 06:27:45
  • Location: Grappaland
  • Status: offline
2018/09/21 01:36:12 (permalink)
0

Yet another "how do i create an usb (host) project from scratch in harmony?" thread

Hi,
I am a noob regarding harmony, but i don't think there is another up-to-date USB stack for PIC32, in my case PIC32MK.
I want to create a project from scratch that uses the Host stack for USB audio 1.0.
Luckily, there is the audio_speaker example i can use as a basis, however i do not want to simply port the example, i want to understand HOW to create a project from scratch that uses the usb stack.. otherwise what do i do in case there is no example to base my project on?
 
So, i set up the clock and USB peripheral as host, using the same configuration as in the example, but of course when i attach a peripheral nothing happens, probing the data lines show no activity.
 
A very quick comparison of the initialization routines of my project and the example shows that duh, obviously it doesn't work, i am not starting the peripheral and handling the stack.
 
Okay, but how do i do that? isn't this harmony's job, to generate the code for the stack handling too when i select "use the usb stack"?
Apparently not, unless there is an option i'm missing.
Documentation didn't help me much, unless there is a chapter called "how to run the usb stack" that i somewhat missed.
 
I've read through the other topics here in the forum but i never found an answer different than copy whatever they do in the example, thanks but it doesn't help me much in understanding.
what is that big state machine? where is the deficition? should i keep it the same? what if i have different configurations?
 
It gets annoying that one has always to have some sort of ephifany in order to understand someone else's code. /rant
 
#1

0 Replies Related Threads

    Jump to:
    © 2019 APG vNext Commercial Version 4.5