This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2SX: How to capture Vin1 and VIN2 simultaneously

Part Number: TDA2SX
Other Parts Discussed in Thread: SYSBIOS

Hello,

I want to capture frames on VIN1 and VIN2 but I don't know how to program VIP to accomplish that. I'm using starterware_01_03_00_09 and have based my current project off the examples videoLoopback and ov10630_sensor. 

To configure the VIP for VIN1 or VIN2 I first run App_FrameBufInit(), then App_coreOpen(), followed by App_configureVIP(). For each of the three functions I have created unique variables for the various handles, including VpsDrv_CaptInstObj and App_FrameBufObj, as well as unique callback functions. I can capture images from VIN1 or VIN2 if I run the 3 configuration functions for that VIN number right before calling the App_coreStart() function. However when I run those 3 configuration functions for both VIN1 and VIN2 and then call the App_coreStart() for either one of those VINs, images will only be captured if the last VIP configuration functions I ran matches the VIN number I'm trying to capture. So there seems to be something in VIP that's getting overwritten when I call those same 3 functions again? I'm not really sure why else I would be able to capture from each VIN when I program VIP right before a capture.

I was also wondering how the IRQs should work when capturing both cameras at the same time. I'm currently using VIP1_IRQ1 mapped to IPU1_27 because that's how the examples were configured. I'm used to mapping the core interrupt to an ISR but I don't see how the VIP configuration functions do this. Do I need to add VIP1_IRQ2 so that I have one IRQ per VIN?

Thanks,
Juan

  • Hi Juan,

    I have forwarded your question to ISS experts.

    Regards,
    Yordan
  • Thank you Yordan.
  • The VIP driver supports capture from multiple ports and is verified at Sysbios driver level. Could you share the changes done in video loopback application?

    If you capturing from VIN1 (VIP1 Slice 0 PORT A) and VIN2 (VIP1 Slice 1 Port B), then they share the same interrupt. The driver internally takes care of managing this. So no need to set the inettrupt routing as you have mentioned in the post

  • Hello,

    What if I'm capturing from VIN1 (VIP1 Slice 0 PORT A) and VIN2 (VIP1 Slice 1 Port A)? I think I am seeing the interrupts for each frame capture being managed correctly but I'm still unable to capture from both inputs. Could this be due to having both on Port A?

    Which would you recommend for multiple camera inputs, having one each on VIP1 (VIN1)and VIP2 (VIN3) Slice 0 Port A, or having both on VIP1, Slice 0 and Slice 1 of Port A (VIN1 and VIN2)? Is there a different configuration that would be better?

    What about having 3 inputs? Which configuration is more recommended? VIP1 (VIN1), VIP2 (VIN3), and VIP3 (VIN5) or VIP1, Slice 0 and Slice 1 of Port A (VIN1 and VIN2) and VIP2 Slice 0 Port A (VIN3)?

    Thank you.
  • There is no issue in capturing multiple videos through PORTA of different VIP instance and slice. You just need to ensure that the pins are not shared and that there is no conflict in programming the pinmux settings.

    Which EVM/board are you using? The TI EVM + Vision board or custom board? If this is custom board kindly review the schematics for any conflicts between the ports.

    The only time you want to capture multiple inputs on different VIP instance/slice is when you want to do CSC or SC blocks of the VIP for each of the inputs. Note the SC/CSC blocks within a slice is shared between PORT A and B.

    From VIP point of view there is no restriction in selecting the ports for multiple inputs (except the one I mentioned above). What you need to consider is the SOC level pinmux and that there are no conflicts in the pin outs from the various VIP ports. You need to refer to the TDA datasheet to know which pins are muxed with what all VIP ports.

  • Thank you for the the followup reply. I've verified all pins are not shared and pinmux is correct configuration is correct for all pads. Still I can only program VIP for one single camera at a time. Attempting to program camera1 then camera2 followed by trying to capture camera1 will not work. However, capturing from camera2 does work.

    I'm using custom hardware and after reviewing it, we don't see any conflicts between ports. One camera is wired to VIN1 and the other camera to VIN2. Is there anything specific you recommend we look out for?

    Good to know about the CSC or SC block requirements. We're not currently utilizing this feature so doesn't seem to be the issue. Also thanks for clearing up the VIP input restrictions. Good to know we have no restrictions except for ensuring pinmux on those pins.

    Apart from trying to capture from two cameras at the same time I've also uncovered a new error where even with one single camera the capture software does not cycle back to index 0 once it's captured max number of buffers per port. I see that the function App_GetFrameBuf() sets that index value to back to 0 once the max is reached but the software just never captures an image after that.

    Since I'm still not seeing the issue I was hoping to share some of my software with you privately. Would that be possible?
  • Hi JG,

    Could you first check if the VIP is receiving frames correctly by checking frame size register in VIP? Frame size register is at the offset 0x30 from the VIP base address. If you see correct frame size at this location, VIP is receiving streams correctly and able detect correct syncs.. 

    Rgds,

    Brijesh