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.

Use VENCINT and/or VDINT interrupt with DSP/BIOS (on EVM6437)

Other Parts Discussed in Thread: TVP5146

Hello everybody!

I want to handle VENCINT and/or VDINT interrupt using the  DSP/BIOS but I didn't find how to do it!

VENCINT is generate by VPBE ans VDINT by VPFE.

Can someone help me please? 

Thank you

 

  • Typically these interrupts are already configured and handled by the video drivers, have you tried using the existing PSP drivers for your system?

  •  

    I didn't try! i don't know how to get them. Can i use them without using PSP drivers? Do you have any example of the using of these interrupts (VENCINT, VDINT)?

  • BetaBoy said:
    I didn't try! i don't know how to get them.

    You should have received the DM6437 DVSDK software package on a CD with your EVM, this software package contains the PSP drivers as well as other examples and useful software for the EVM, if you do not have it already you can download the package from www.ti.com/davinciregistration after registering your EVM.

    BetaBoy said:
    Can i use them without using PSP drivers?

    You certainly can, however in general I would suggest using the PSP drivers as they have already done all that work for you, in general it would not be practical to write a video driver from scratch.

    BetaBoy said:
    Do you have any example of the using of these interrupts (VENCINT, VDINT)?

    The closest we have to an example for these interrupts would be the PSP drivers themselves, which do include source you could use as a reference, once you have the DVSDK installed the drivers can be found within C:\dvsdk_1_01_00_15\pspdrivers_1_10_01\packages\ti\sdo\pspdrivers\drivers. For example there is \vpbe\src\dda_vpbeBios.c which registers and enables the VPBE interrupt. You can also do much of the interrupt configuration from the HWI module in the DSP/BIOS GUI configuration tool in CCS, the help files in CCS document how to use the configuration tool.

  • Hello! Thank you for your help!

    I want to dynamically assign routines to VENCINT interrupt with HWI module.

    This is the code I used to do it but nothing happened:

        HWI_dispatchPlug(32,(Fxn)Fxn0,NULL,NULL);

    Fxn0 is my routine:

    Void Fxn0(Void)
    {
            printf("HWI0 done!\n");
    }

    Thank you

  • Another question:

    Do the VENCINT/VDINT interrupts run by themself? I mean without doing VPBE/VPFE things?

    I tried everything today and nothing work!

    Does your 'RawCapture' example work because mine doesn't!

  • BetaBoy said:
    Do the VENCINT/VDINT interrupts run by themself? I mean without doing VPBE/VPFE things?

    The interrupts would have to be enabled and the VPBE/VPFE would have to be configured properly. On the VPFE end note that you would not get frame events unless there were frames coming into the port, meaning that the VPFE is seeing horizontal and vertical syncs and a clock.

    BetaBoy said:
    Does your 'RawCapture' example work because mine doesn't!

    I have gotten the raw capture example to work, you just need to ensure that the VPFE is getting a clock and sync signals and it will start clocking in data, of course to have something that looks right you need to have data in the proper format.

  • Ok Thank you.

    A  camera is plugged into the S-VIDEO port .

    With the raw capture example I can see something (strange) on the screen (on S-VIDEO out) but not what the camera films.

    Maybe it is because datas don't passe throw the tvp5146 decoder.

    How to ensure that  VPFE is getting clock and sync signals?Checking register? Using analysis tools?

    I really sorry asking all these questions but I have only 1 month (now 2 weeks left) to understand all these things and achieve my project.

    Thank you again.

  • The raw capture example is designed to be used with a daughtercard of some sort (such as a CMOS camera sensor), not the on board TVP5146, though it looks like the TVP5146 does have the horizontal and vertical syncs hooked up so you could potentially get something, though it would be in the wrong color space and will probably not be in sync which would explain seeing strange output.

    What is your end goal? I am curious why you would want to use the raw capture example with the TVP5146 acting as your source?

  • Ok Thanks!

    Use the TVP5146 was just a suggestion due to an example i saw (onboard>...>video_loopback,  I think).

    The goal of the project is to make on fly video processing such as motion detection (sorry for the english I'm not english).

    The source is a camera (S-VIDEO) and the output (S-VIDEO too) a LCD screen.

  • In that case you may want to look at an example more like the one on this wiki article, as it does some simple changes to the image in a simple loopback which you could replace with your motion detection code. This uses composite input and output so in your case to use S-Video you would have to make a slight modification to the driver configuration, I don't have my dvsdk install in front of me at the moment but if you look at the capture and display driver documentation in the psp folder of the dvsdk there should be some explanation of how to enable S-Video.

  • Thank you very much.

    I 'll try with this example.

    I succeeded in enabling the HW VENCTINT (with the on board loopback example) so that now I 'll try to place the processing code in the interrupt routine.

     

  • Just a comment on this, typically you would not place processing code in the interrupt routine, as this could cause real time issues by having the interrupts disabled for too long. In the case of the video drivers that come with the DVSDK you can simply put your processing code in the capture/display loop as shown in the example mentioned above. Essentially since the blocking FVID_exchange calls are driven by the VPSS interrupts, if you put the processing code in between the FVID_exchange calls in a loop your processing code ends up running just as if it was in the interrupt routine without the potential timing issues of having a large amount of code in an interrupt routine. The key is that the calls to FVID_exchange are blocking, so that when your processing is finished but before the next frame is available, code in other BIOS tasks can run.

  • Ok thank you for these advices.

    But I have some troubles when I build the video_preview project:

    During the Linking I have this error (in fact 31 errors):

    >>   error: can't allocate .IRAM$heap, size 00002000 (page 0) in IRAM (avail: 00001c40)

    It is the same with '.far', '.rtdx_tex', '.bss', '.hwi_vec' sections and so on.

    What does it mean?

  • This error is indicating that you have the memory map setup to put a code or data section into a particular memory segment that it cannot fit, in this case the data section .IRAM$heap is 0x2000 bytes and the IRAM memory segment it is assigned to only has 0x1C40 left available. If you go into your DSP/BIOS configuration and the memory section manager in particular and take some of these sections that are mapped to IRAM and put them in DDR2 than you should be able to get past this build error, as there is much more space in DDR2 to hold these sections. Have you made any changes to the video_preview project that may have led to this?

  • BetaBoy said:

    During the Linking I have this error (in fact 31 errors):

    >>   error: can't allocate .IRAM$heap, size 00002000 (page 0) in IRAM (avail: 00001c40)

    It is the same with '.far', '.rtdx_tex', '.bss', '.hwi_vec' sections and so on.

    What does it mean?

    This error means that your IRAM memory range is too small for all of your compiler sections (such as .far, .bss etc.) to fit. For example, if you defined IRAM to be 0x10000 bytes long but you try to fit 0x12000 bytes into it this naturally would not fit. To fix this you need to either increase the size of the defined IRAM unless it's already full, or place some of those sections into an external memory. You can do this inside your custom linker command file (something.cmd) or inside the DSP/BIOS configuration file inside the Memory Section Manager.

  • No I didn't make any changes! But I took the example from the installed files and put some of your code(download from the wiki) into it so  now it works!

    Now I'll try to do the process I want to do!

    Thank you very much for your help!