-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control transfer gets anulled (?) after some 120 seconds #6
Comments
You should be able to trap that in the debugger.
Check your interrupt flags. There could be lots of things happening here.
Debugging :-D Also, don't waste your time with a 2550. It's an old, expensive, MCU. There are much better 8-bit MCUs from Microchip for a fraction of the price nowdays. Only ancient tutorials and textbooks recommend the 2550/4550. Alan. |
On Mon, 19 Jan 2015 06:45:39 -0800
Hi Alan, Thanks for reply. To be honest, I gave up on the m-stack. I don't have Interrupts are not enabled at all. I call(ed) the processing function This works fine, except that the 'interrogation' after about 2 minutes
No interrupt flags - no interrupts enabled.
I know that. The only reason I used it is because I had a few left from Cheers, |
PicKit 3 - $45 bucks iirc
That doesn't meant flags don't get set on reset.
Instead you're only throwing time away ;) I do the same kinds of stuff though... Alan. |
On Tue, 20 Jan 2015 18:09:29 -0800
Hi Alan, I've looked around and the cheapest version I can find (in Argentina)
I've solved the problem with the Microchip stack. If I find some time I was very surprised though that the Microchip USB stack solution only Anyway, again thanks! Cheers, |
This is my first experience with USB programming, so it is maybe a little adventurous...
I took the control-transfer example C-code, and the unit-test PIC code. I adapted the PIC code for use with the 18F2550, and removed all code from the 'while'. In the data_cb routine I take the first byte of the buf and send it to 4 LEDs which are connected to the PIC.
In the host C code, I changed the code slightly to parse an argument which says which LED to switch on.
Everything works fine, I can select each LED correctly. But after about 120 seconds the LEDs switch off. Checking with Wireshark, I notice that this happens when the host interrogates the hub.
This is the part from the control program:
then, when the LEDs switch off:
I can't see that the LED port is actually changed anywhere, so I suspect that the microprocessor is resetting. Could this be the result from this activity (which doesn't originate from the program)?
And, if so, how do I solve this problem?
The text was updated successfully, but these errors were encountered: