ChibiOS Serial-over-USB + Serial

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
baoshi
Posts: 9
Joined: Wed May 15, 2013 5:49 am
Been thanked: 1 time

ChibiOS Serial-over-USB + Serial

Post 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
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ChibiOS Serial-over-USB + Serial

Post by Giovanni »

Hi,

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

Good point anyway, it is a weakness.

Giovanni
Post Reply