Use of USB_Break

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
arco
Posts: 312
Joined: 15 Apr 2008 13:54
Location: The Netherlands

Use of USB_Break

#1 Post by arco » 11 Feb 2022 12:24

Is there an example how to use USB_Break() to prevent program hangs on USB reads or writes?
(it's only mentioned briefly and not very clear how to inplement in interrupt)

I added USB_Break to usb interrupt, but program still hangs (deadlocked)...
Regards,

Peter.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Use of USB_Break

#2 Post by filip » 18 Feb 2022 12:25

Hi,

Just call USB_Break before the Gen_Write function.

Regards,
Filip.

arco
Posts: 312
Joined: 15 Apr 2008 13:54
Location: The Netherlands

Re: Use of USB_Break

#3 Post by arco » 19 Mar 2022 14:27

???

Helpfile states that USB_Break should be called from inside the interrupt routine? (not in main())
That doesn't work. (working example would be appreciated...)
Regards,

Peter.

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”