General Category > Discussion - MCU

FT90X USBH BOMS Example - USBH_finalise() missing?


Hi all,

I'm developing a product using the FT908 that serves as a bridge between a sensor (that emulates a USB flash drive) and an SDI-12 recorder. I need to be able to deactivate the USB host port, and I see there is a function in the documentation for doing this: USBH_finalise(). It has a prototype in the ft900_usbh.h header file, but the function itself is not in usbh.c. I've tried using sys_disable(sys_device_usb_host), but this doesn't seem to have any effect.

Can anyone shed any light here?

Thanks in advance!

BRT Community:

I checked this and also couldn't see the source code.

I will ask for this to be added into the APIs.

Something like the following sequence in USBH_finalise() would be required to deactivate the USB Host:

// Remove all devices/interfaces/endpoints from root hub.
usbh_hub_port_remove(NULL, 1);

               usbh_intr_xfer = 0;
               usbh_intr_port = 0;

// Clear Status Register

Please test this out and provide any feedback.
You can modify the source APIs to add this.
See BRT TN 002 Modifying FT9xx API Functions for details on how to do this.
Simply copy the source .c into your project and it will override the library version.

To activate the USB host port again, you would then perform USBH_initialise().

Best Regards,
BRT Community

Thanks very much, this worked fine.

Just a note: I had to enable the compliation of the usbh_hw_disable_int() function in usbh.c, by changing the preceding #if 0 to #if 1

Thanks again


[0] Message Index

Go to full version