AnsweredAssumed Answered

stm32l-discovery mouse demo modification

Question asked by sandala.lukas on Jan 9, 2014
Latest reply on Jan 19, 2014 by sandala.lukas
Hello Everybody,
i'm trying to modify joystick demo from STM32_USB-FS-Device_Lib_V3.4.0
I want to control movement by thumb joystick. However, when i initialize ADC (or usart) it won't jump to interrupt routine. At the same the, the debugger is not working.

I have found out that debugger and interrupts start wroking when i comment out:
  _SetCNTR(wInterrupt_Mask);   line 57 in usb_sil.c ( setting wInterrupt_Mask = IMR_MSK; )
  _SetCNTR(wInterrupt_Mask);  line 80 in usb_pwr.c ( setting   wInterrupt_Mask = CNTR_RESETM | CNTR_SUSPM | CNTR_WKUPM; )

Any idea what might be the problem ?