Closed mndza closed 6 months ago
This started failing CI due to a tinyusb change in master. See 3802956 for how to fix it.
Should we also add a vendor request that asks firmware to hand off the USB port to the FPGA? If the advertising fails for any reason (e.g. older or broken gateware), it might be nice to be able to explicitly switch the port.
Should we also add a vendor request that asks firmware to hand off the USB port to the FPGA? If the advertising fails for any reason (e.g. older or broken gateware), it might be nice to be able to explicitly switch the port.
Another reason this would be useful is that it would switch immediately, rather than potentially waiting some time for the next periodic advertising message.
Should we also add a vendor request that asks firmware to hand off the USB port to the FPGA? If the advertising fails for any reason (e.g. older or broken gateware), it might be nice to be able to explicitly switch the port.
Should this request hand off the USB port to the FPGA until the PROGRAM button is pressed?
Another reason this would be useful is that it would switch immediately, rather than potentially waiting some time for the next periodic advertising message.
The current vendor request will switch immediately in most cases. It will only have to wait if the vendor request is called before advertisement starts, which we are not doing.
I agree with your concerns. The configuration flash bridge uses the scheme that you mention, where the vendor request targets a specific interface. However, the configuration descriptor there is fixed.
Let me try to find a way to append this interface descriptor to an existing configuration descriptor.
I also wonder whether the ApolloAdvertiser
gateware should live here in the Apollo repo rather than in LUNA.
Apollo firmware will keep the USB switch handed over to the FPGA as long as the gateware keeps advertising its usage through the
FPGA_ADV
pin (FPGA_INT
). When these messages stop arriving, Apollo will take over the port. If the ads resume, the port will not be handed off to the FPGA again until a "honor FPGA_ADV" (0xc2
) vendor request arrives.Additionally, the host tools can request a gateware to hand off the USB port to Apollo if the necessary request is available.
HONOR_FPGA_ADV
vendor request (0xc2
)REQUEST_APOLLO_ADV_STOP
(0xf0
) to enumerate ApolloMerge in block with: