I will show another simple method to distinguish the attached camera head:
1: add camera probe code in 2-stage bootloader
2: download 2-stage bootloader into internal SRAM
3: 2-stage bootloader read image sensor ID before enumeration
4: replace PID by image sensor ID
5: feedback this new PID while enumerate
6: wait for specific firmware image file download process
App on USB host will get this PID and download a specific firmware img to drive the dedicated camera head.
Is it practicable?
- Both the suggested methods are feasible.
- In the first method, the jump to the start of the code need not be sent by the host code. Instead, it should be performed in the FX3 firmware.
- In the second method, the host application can monitor the attachment of a new device using an event handler and can download the IMG file based on the PID of the device.
Please let me know if you need further information.