Page 1 of 1

ChibiOS Serial-over-USB + Serial

Posted: Fri Jun 02, 2017 8:25 am
by baoshi
I've successfully implemented a USB-UART bridge using Serial-over-USB (SDU1) and Serial (SD1).

Now I want to implement CDC_SET_LINE_CODING. I understand that I can write my own sduRequestsHook to do this. But sduRequestsHook is called from ISR and I cannot call thread level function sdStop(&SD1) and sdStart(&SD1, &newconfig) from inside.
Is there anyway to do this? Or I need to operate registers directly?

Thanks
Baoshi

Re: ChibiOS Serial-over-USB + Serial

Posted: Fri Jun 02, 2017 3:37 pm
by Giovanni
Hi,

You could wakeup a thread for that, using an event for example.

Good point anyway, it is a weakness.

Giovanni