I try to use v-usb in a project where I need HW interrupts for the ATMega. I use a modified 'custom-class' project. The USB is connected to INT0 and it works nicely.
In INT1 I have a peripheral system that can cause an interrupt. As an interrupt service I have (it is dummy for now)
Code: Select all
ISR( INT1_vect, ISR_NOBLOCK )
{
toggleGreen();
_delay_ms(250);
}
And yes, I can toggle the green led with the external interrupt.
Now, if I cause INT1-interrupts then occasionally my PC's host program won't find the USB device.
- Could not find USB device "LEDControl" with vid=0x16c0 pid=0x5dc
So it seems that the INT0 (USB) cannot override the INT1(external). Despite the ATMega docs saying it should. AVR-libc docs say passing ISR_NOBLOCK to the ISR function should not disable interrupts. Am I doing something wrong, or is this as specified?
thanks