BF514

Could you please help on below question:

I ported my custom BF531 board's code into my custom BF514 board but I never manege to run 2D PPI DMA receive interrupt.

 

Here below is my custom board's Blackfin pin connections;

 

PORT F

PF0 - PF15 -> PPI0 - PPI15 (16 bit)

 

PORT G

PG5 -> PPI CLK

PG6 -> PPI FS1

PG7 -> PPI FS2

 

I looked https://ez.analog.com forums but there is no solved issue or I could not have found it.

  

You can see my sample code in the attachment.

 

main.c.zip
  • 0
    •  Analog Employees 
    on Aug 11, 2017 5:36 AM

    Hello,

    Sorry for the delayed response. Can you please elaborate more about your set up, where the other end of PPI is connected to?

    Looking at your code, it seems like the program sequence is not correct. Can you please look at the 'Figure 20-12. PPI Flow Diagram' mentioned in the 'ADSP-BF51x Blackfin Processor Hardware Reference manual' and correct the sequence.

    Best Regards,

    Jithul

  • Hello Jithul,

    I also noticed your response a little bit late; yesterday. I tried new code with the points you noticed but again I stuck on the line;

    while(g_quitWaitLoop);

     

    It means there is no DMA PPI interrupt.

    I use my CMOS sensor in free run mode and I can see all data lines output (D0 - D15), VSYNC and HSYNC and pixel clock (PCLK) coming to BF514 on the oscilloscope. Every thing seem to be OK but there is no interrupt.

    Best regards,

    Bora

  • 0
    •  Analog Employees 
    on Aug 23, 2017 3:36 AM

    Hi Bora,

    Sorry for the delay in getting back on this. Let me check your modified code and update you.

    Thanks,

    Jithul

  • 0
    •  Analog Employees 
    on Aug 25, 2017 1:28 AM

    Hi Bora,

    I had a quick review on your code example and I found that the programming sequence is still not correct. I could see that you have enabled PPI first prior to enable DMA. Please note the general procedure for setting up DMA operation with the PPI follows.

    1. Configure DMA registers as appropriate for desired DMA operating mode.

    2. Enable the DMA channel for operation.

    3. Configure appropriate PPI registers.

    4. Enable the PPI by writing a 1 to bit 0 in PPI_CONTROL.

    5. If internally generated frame syncs are used, write to the TIMER_ENABLE register to enable the timers linked to the PPI frame syncs.

    PPI Flow Diagram (Figure 20-12) given in the HRM give you clear information about how to configure PPI correctly. In your 'main()', I would suggest you to call 'Init_Interrupts();' prior to call 'Init_DMA_and_PPI();'. Also, enable the PPI interrupt in the 'Init_Interrupts();' itself rather enabling in the while (1) loop.

     

    How are you confirming the interrupt occurrence? Can you put a break point in the start of ISR function and see if the that hits? 

     

    In case if you are still facing the problem can you give the screenshot of DMA and EPPI registers?

     

    Best Regards,

    Jithul


  • Dear Jithul,

     

    I solved the issue. It is not related with the flow but due to two points;

    1-) *pPORTG_FER |= 0x00E0; // Enable peripheral for PG5, PG6 and PG7, previous 0x0070 is wrong.

    2-) *pPPI_COUNT = FRAME_WIDTH*2 - 1; // this line was missing in the previous code.

     

    Thanks for your support,

    Bora