Usb serial bursting data since move to 16.1

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
totalkrill
Posts: 12
Joined: Thu Jul 09, 2015 2:21 pm

Usb serial bursting data since move to 16.1

Post by totalkrill »

Hello!

I have been using the serialusbdriver on my stm32f4 in conjunction with the chprintf functionality. It has been working fine when i was on the stable_3.0 branch.

Now when i am using the same code, the usb is sending unevenly, it now only sends data over the USB in chunks of ~250 bytes.

This is happening even if i skip the chprintf and use:

Code: Select all

chSequentialStreamWrite(&SDU1,"sometext",8); 

as well.

Is there anything i need to change between 3.0 and 16.1 to use the SerialUSBDriver?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Usb serial bursting data since move to 16.1

Post by Giovanni »

Look at the demos, there is one more function to call from the periodic callback: usbcfg.c.

Code: Select all

static void sof_handler(USBDriver *usbp) {

  (void)usbp;

  osalSysLockFromISR();
  sduSOFHookI(&SDU1);
  osalSysUnlockFromISR();
}

/*
 * USB driver configuration.
 */
const USBConfig usbcfg = {
  usb_event,
  get_descriptor,
  sduRequestsHook,
  sof_handler /* THIS IS NEW */
};


Giovanni
totalkrill
Posts: 12
Joined: Thu Jul 09, 2015 2:21 pm

Re: Usb serial bursting data since move to 16.1

Post by totalkrill »

Now everything works as it did before again, thank you!
Post Reply