Page 3 of 3

Re: STM32F103 LibUsb

Posted: Fri Sep 07, 2012 8:50 pm
by Giovanni
You should single step in ASM through that switch/case and see what happens exactly.

Giovanni

Re: STM32F103 LibUsb

Posted: Thu Sep 13, 2012 3:23 pm
by goahunter
Ok so to fix the problem, the following line of code was changed to directly use the LLD

Code: Select all

      /* Initiate next receive */
       usbPrepareReceive(usbp, EP_OUT, receiveBuf, 62);
       chSysLockFromIsr();
       usbStartReceiveI(usbp, EP_OUT);
       chSysUnlockFromIsr();

to

Code: Select all

usb_lld_read_packet_buffer(usbp, ep, receiveBuf, 62);
      usb_lld_start_out(usbp, ep);

Re: STM32F103 LibUsb

Posted: Thu Sep 13, 2012 6:28 pm
by Giovanni
Hi,

That looks more like a workaround than a solution, low level functions are not meant to be called directly. It is possible that some error condition prevents the high level functions to call the low level but you should address the reason not just bypass the check.

Giovanni