Question

I have a hardware where I need to turn on LED connected in GPIO( Looking at hardware specs, GPIO BCBUSB0 is connected to LED) to show that software is running fine inside it. If for some reason software is not running , then LED should turn off or become red.

Now , I thought I should set up a watchdog or something which sends signal to Led in regular interval to show status that software is running. if for some reason LEd does not receive signal with particular interval it should turn off.

I am quite comfortable in using C language, but have no idea about programming GPIO to turn on/off LED. Any advice or suggestion will be of great help.

Thanks

Was it helpful?

Solution

The FT2232H is a USB-to-UART converter chip. A quick glance at the datasheet shows that it can be placed in a bit-bang mode which is what you are apparently trying to do. If you read section 4.10 of the datasheet, it references AN2232-02, “Bit Mode Functions for the FT2232” which claims to have the details and some examples of how to do this.

You say you're communicating with the hardware via Ethernet but that doesn't sound right (or at least is only part of the story). Most likely, the FT2232H is connected to a processor (possibly your host machine) via USB. To toggle the GPIO pin, you'll need to configure the FT2232H so that it operates in bit-bang mode. Once you've figured out how to do that you'll need to send commands over USB in order to toggle BCBUSB0. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top