LPC1768 how disable USB_UP_LED

Hi everyone
I have an issue using InterruptIn. I am using MbedStudio with mbed OS 6.6.0 . When I declare “InterruptIn usbVbus(p19);” as global in lpc1768, the program is frozen, it do nothing and led1 (p1.18 “USB_UP”) starts flashing. When i comment “InterruptIn usbVbus(p19);” everything works as normal again and led1 stops flashing. I thinks it is because p19 is connected to Vbus in LPC1768 and it makes led1 start flashing but i don’t know why. How can I configure Vbus as InterrupIn and avoid to use USB_UP_LED? and Why “InterruptIn usbVbus(p19);” frozes my code?

I hope can help me whit this problem.
Best regards

Hello,

It seems like InterruptIn is not possible to use on pins P19-20. I found it at the end of in this topic.
But you still can use it as DigitalIn probably.

I also found, in an old topic, this configuration but I do not know if it necessary.

#ifdef ENABLE_VBUS    
    /* Configure pin P1.30 to be VBUS */
    LPC_PINCON->PINSEL3 &= 0xcfffffff;
    LPC_PINCON->PINSEL3 |= 0x20000000;
    
    /* Configure pin P1.30 to have pull-down */
    LPC_PINCON->PINMODE3 |= 0x30000000;
#endif

BR, Jan

1 Like

@JohnnyK thanks for your reply, is true, there is not interrupt in p19 . I will try with other pin or not using interrupts.

Best Regards