USB_VCP.setinterrupt() not functioning?

Discussion related to "under the hood" OpenMV topics.
Posts: 3
Joined: Wed Mar 21, 2018 9:31 am

USB_VCP.setinterrupt() not functioning?

Postby gregjeffrey » Wed Mar 21, 2018 9:40 am


I'm trying to disable the USB_VCP keyboard interrupt (in the docs it says to give USB_VCP.setinterrupt(-1) to disable), but I don't believe it is properly disabled.
I'm trying to send integers over USB and can do so just fine, except for the integer 3 (which corresponds with CTRL+C and is the default setting of setinterrupt). Sending a 3 will interrupt any python code that is running.

For now, I can get around this by sending the integers as strings and converting them back later, but I'd like to be able to send raw integers as well.
Am I disabling the keyboard interrupt feature properly, by using the following?

Code: Select all

brd = pyb.USB_VCP()
User avatar
Posts: 2573
Joined: Sun May 24, 2015 2:10 pm

Re: USB_VCP.setinterrupt() not functioning?

Postby kwagyeman » Wed Mar 21, 2018 12:09 pm

Mmm, this is some weird MicroPython behavior. Um, I'll have to do some digging about this. In the meantime, try searching around for this problem. It sound like there will be a hit hub MicroPython issue about this.

Return to “Technical Discussion”

Who is online

Users browsing this forum: Raul_ and 4 guests