How to abort USB transmit?

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
tsichevski
Posts: 26
Joined: Fri Feb 09, 2018 12:44 am
Has thanked: 2 times
Been thanked: 3 times

How to abort USB transmit?

Postby tsichevski » Tue Apr 17, 2018 10:01 am

Hi all,

I use hal_usb driver in ChibiOS_17.6.3 to transmit data from a STM32 device to host computer.
I start transfer with the usbStartTransmitI(), and wait for the "data transmitted" interrupt.
The question is: how can I prematurely abort the transfer which is already started?

Regards,
Vladimir

User avatar
Giovanni
Site Admin
Posts: 11306
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 412 times
Been thanked: 342 times
Contact:

Re: How to abort USB transmit?

Postby Giovanni » Tue Apr 17, 2018 12:06 pm

Hi,

The driver is not able to interrupt ongoing transactions, you may split transaction in smaller ones and check an "abort" flag before starting the next one.

Giovanni

tsichevski
Posts: 26
Joined: Fri Feb 09, 2018 12:44 am
Has thanked: 2 times
Been thanked: 3 times

Re: How to abort USB transmit?

Postby tsichevski » Tue Apr 17, 2018 5:08 pm

Thanks a lot, Giovanni!


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 3 guests