AnsweredAssumed Answered

USB Stack v5.0- bare metal (no OS) USB Stack- no Timer interrupt

Question asked by Yogesh kulkarni on Jun 6, 2016
Latest reply on Jun 10, 2016 by Yogesh kulkarni


I used this stack on the FRDM K64 board using GCC_ARM compiler (Modified the Makefile in the HID keyboard example to use the arm-none-eabi  gcc arm compiler). I want FRDM K64  in the Host mode.

 

When I attach the keyboard , it hangs in the while loop waiting for the timer expiry interrupt to occur.  I do not have any debugger to take a trace, but below is the sequence of operation.

 

_usb_khci_attach()  got called when key board gets attached. This further calls

 

    usb_hal_khci_set_device_addr(g_usb_instance.instance, 0);

    OS_Gpio_set_value(pin, 1);

#ifdef USBCFG_OTG

    OS_Time_delay(50);

#else

    OS_Time_delay(150); --------------------------------------------------------------> It hangs here.

#endif

    OS_Gpio_set_value(pin, 0);

 

 

I was able to reach to the conclusion after some debugging by adding additional  prints as below:

 

The timer expiry interrupt function delay_isr() never gets called even though it was installed by calling delay_init() in beginning of main(). Why the timer expiry interrupt function delay_isr() is not getting called inspite of initialising the same ?

 

 

Regards

Yogesh

Outcomes