2019-04-02 01:24 AM
Hi!
I need to interface 2 VGA cameras with an STM32. The cameras are for snapshots only, so FPS and throughput are not issues, the only issues are:
There doesn't seem to be much public info on the subject, so I came here.
From what I understand, I have several options:
I can't find a good solution for 1.
The 2nd one - bitbanging DCMI seems dirty and doable, however, getting into a long adventure only to discover it was a poor choice is not good. Ann example or recommendation would be appreciated.
The 3rd solution -are the good examples? is it viable with STM32?
The 4rd one seems to be the simplest to integrate physically, the cheapest and with the most market variation, but how difficult is it to use USB OTG with a USB camera, really?
So, an input from you guys would be much appreciated - how would you go about connecting 2 cameras to an STM32 (or a couple of them)?
Thanks!
2019-04-02 03:40 AM
Couldn't you just mux the input pins? Or route via a CPLD?
Also look at camera's with FIFO chip.
2019-04-02 04:06 AM
Do you need to have both active at the same time?
Otherwise, if it's an XOR, check the DCMI alternate pins on the datasheet.
If the DCMI exist in 2 sets of pins, you can just switch the active pins by SW.
Otherwise, if it's only to run pictures (not video) check for SPI cameras and longevity of the corresponding parts.
2019-04-02 05:30 AM
FIFO if cool, unforunately, didn't find a FIFO camera for a good price, my budget is 6$ per camera for mass production.
2019-04-02 05:31 AM
No, the cameras will work one at a time :)
2019-04-02 05:33 AM
Also, how would muxing help?
2019-04-02 05:35 AM
Then check the alternate function table to get duplicate DCMI pins. Then check which package are suitable (the pin table just before the alternate on the datasheet). You can dynamically change the DCMI pins by SW by changing MODER of the GPIO port registers. Do make the transition properly to avoid glitches or transients.
2019-04-02 05:42 AM
Got it. Thanks! It's either that, or worst case, to get an MCU with enough pins.
What about data retention before saving to flash? I suppose it's either SRAM or a large enough RAM. Possible problem with SRAM is that it might be too slow to save, compared to the camera data rate. What are the standard solutions for this?
2019-04-02 05:57 AM
Only way to know more about camera would be to find a reference SW example from a Discovery or some related application notes. Not expert on camera here...