-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any advice for getting mipi-demo setup? #2
Comments
Hey there, yeah I'm happy to help! I got busy with other projects and haven't gotten around to transferring images off-device.
Yeah that should work just fine. It's more a matter of writing the glue logic to get the captured image where you want it. Do you have an SD card shield for the board? (i.e. https://store.arduino.cc/usa/mkr-sd-proto-shield) It's probably best to interface with that via the SAMD21. You could use the FPGA<->SAMD21 SPI interface to stream a captured image from the SDRAM onto the SD card. That would require some work around changing the FIFO receiver to output over SPI instead of to the HDMI interface. Or you could have a 3rd, lower priority tenant in the arbiter so you still get a live preview on the screen.
It's not required, more a thing of personal preference. I'm using it to simplify my dev cycle (create project, testing, synthesis) so I can code in VSCode and usually don't need the Quartus GUI. But you could just as well create your own project and add the source there. |
Thanks @sameer, Thanks for the reply!
If that's the case, I'll try creating implementing the source into my own Quartus Project. Does your project use it's own pin mapping, or the original one supplied by the Arduino Devs? I noticed names are slightly different.
I do have an SD breakout for the board (MKR ENV SHIELD), and your previous recommendation is the method I intend on using. Also, I'm curious if it is as simple as changing the I2C command to the camera to swap between capturing a stream of frames to just a single frame. Again, sorry if I'm butchering jargon but I am new to the world of FPGAs. I really appreciate your help! |
The physical pins are the same, it's more a matter of naming preference. You should be fine using either with some minor renaming
You could definitely do something like that. The way these MIPI camera modules (and cameras in general maybe, but not 100% sure) work is that they are continuously streaming images. When you take a picture on a modern phone it'll stack multiple frames to remove artifacts and improve visual quality (i.e. night vision on Android for low light pictures). But if your goal is to get a single frame onto the SD card, you could just start the camera, capture the frame, and stop the camera. (forgive my really bad drawing skills, meant to digitize this, but here's the camera control state diagram)
Yeah no worries, I'm also a newbie 😅 |
Okay, great! I'm gonna go ahead and get my hands dirty then and see what I can get working. |
That error is new to me, what version of Quartus are you using? Also could you share the full qsf? Wondering what constraints are different between yours and mine. Tried synthesizing on my end and it's working with Quartus 20.1.1 (there was one issue that I've fixed in 4808bfb). |
Huh, that's weird. I'm using Quartus 20.2.1 as well. Here is the modified qsf I tried using to import the pin assignments. It's a combination of your pin mapping and the original Arduino github mapping. It correctly named the pins and locations, but did not assign their format as it should -- (all just got set to the default voltage). Because it wouldn't import the formats, I ended up assigning everything manually. I've exported my current pin assignments to the following file: |
I've since looked at some of the official Vidor projects -- like VidorGraphics, and I saw that many of the pins that were assigned to LVDS in the .qsf file were set to a regular 3.3V within Quartus pin mapper. Only the clock pins remained in LVDS format. |
Hi @sameer,
Firstly, thank you for doing all this work to get a working mipi-hdmi interface on the mkr vidor. I'm new to FPGA's and have been using this board to test some basic logic gate examples. Up until now, I've been using the method shown here to simultaneously upload SAMD21 code as well as the bit file to the FPGA.
I would love to implement and demo your code, and ultimately try to save image frames to an SD card. Having reviewed the files in your repository, I was wondering if the prior method could be used, or if another method is required?
Additionally, I am unfamiliar with HDLmake, is this tool also necessary for compiling?
I apologize for this basic implementation question, any help would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: