ChibiOS Serial-over-USB + Serial

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

ChibiOS Serial-over-USB + Serial

Postby baoshi » Fri Jun 02, 2017 8:25 am

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: ChibiOS Serial-over-USB + Serial

Postby Giovanni » Fri Jun 02, 2017 3:37 pm

Hi,

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

Good point anyway, it is a weakness.

Giovanni


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 6 guests