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.

66AK2H14: EDMA and DDR3A interface

Part Number: 66AK2H14
Other Parts Discussed in Thread: TMS320C6678, , CDCLVP1212

Hi,

I am currently testing a DDR3 interface on our custom board , the purpose being to get a correct setup for controller and phy registers (based upon the "keystone II register calculation" EXCELsheet)

The software I am using has been validated for several years on TMS320C6678, and adapted to 66AK2H14 (compiler, linker)

Basically this software makes uses of  AB type EDMA (DSP core 0 only activated) (only one DMA at a time) (BCNT=32K and ACNT=16K) (read or write EDMA) to go through the entire memory bank.

The issue we are facing is that EDMA are quickly stuck (let say  between the first and 50th trig) :  CORE_0 is indefinitely waiting for "IPR" register set...

(Also note that note only the DMA stopped but it becomes impossible to CCS to recover access to the component)

I admit that my Phy/controller setup could be wrong in some points, or DDR3 hardware not optimum but how can this stop the EDMA after a while ?

1) My setup is as follow :

- external SYSCLK input : 250 Mhz ; internal core clock : 250*(48/5)/2 = 1.2 Ghz

- external DDR clock input : 250 Mhz ; internal DDR clock : 250*(12/5)/2 = 300 Mhz ; external clock output : 300*2 = 600 MHz (and frequency verified with a scope)

2) in a secondary setup I trageted the DDR output clock to 500 Mhz, with the phy/controler setup as well and the test becomes OK

3) in a third setup I changed the external SYSCLK  and DDR_CLK to 100 MHz, and retargeted the DDR3 interface to 600 MHZ ==> the test is also OK

core clock = 100*(24/1)/2 ; internal DDR clock : 100*(12/1)/4 = 300 Mhz ; external clock output : 300*2 = 600 MHz (frequency verified with a scope)

Would you have some ideas/suggestions that could explain this phenomenon ?

With best regards,

Bruno

  • Hi,

    I can't see your attached picture. >>>>>>>>(Also note that note only the DMA stopped but it becomes impossible to CCS to recover access to the component)>>>>

    • Do you mean that you loss the JTAG and can't connect to the K2H anymore? what is the error message? 
    • What core (A15, DSP) you run the test?
    • How big is your DDR3A memory? In case it is bigger than 2GB, do you use MPAX to map the 36-bit physical address to logical address?  
    • Will CPU read and write the full DDR3A range always pass?
    • When using EDMA, do you see a fixed failure pattern? E.g, some memory region or some byte lane always has error? Or it is random?
    • Several cases:
      • 1.2G CPU, 1200MT/s DDR, with external 250MHz clock, failure, is the same clock source input to sys clock and ddr3a? 
      • 1.2G CPU, 1000MT/s DDR, external ???? MHz clock, working
      • 1.2G CPU, 1200MT/s DDR, with external 100MHz clock, working,  is the same clock source input to sys clock and ddr3a? 

    Regards, Eric

  • Hi Eric,

    The picture was a snapshot of the C routine waiting for end of DMA once lanched

    In response to your questions :

    1) as explained in my original post, only DSP CORE_0 is running

    2) XMC is initialized as per the GEL file :

    3) external DDR3A is 4GB

    4) when in the stuck waiting state, it is still possible to halt the process, execute step-by-step disassembly (actually pooling the IPR register), watch internal register, and so. But as soon as we try to open a DDR3 memory view window, CCS access to that core0 fails. Yes we loose JTAG access to the K2H. It is the same if we manually change the Bxx internal register so that to end the waiting loop and go back to the main() pgm (stll in step-by-step disassembly) : CCS loose access to CORE0 upon the first encountered CPU access to external DDR3.

    But since we have modified (hardware) our board to input 100MHz instead of 250MHZ I can not reproduce the phenomenon and give you back the corresponding CCS red message. (at least it was not related to power failure detection,

    4) as explained earlier , when in the stuck configuration it is no more possible to get any view of the DDR3 (by CCS itself, or by executing CPU access in step-by-step disassembly mode) content without "crashing" CCS

    5) in every scenario, both external DDR3_CLK input and SYSCLK (actually ALT_CORE_CLOCK input is used)  input are from the same source through an CDCLVP1212 fanout buffer)

    6)  your question about my secondary setup "????" was corresponding to an external input of 250MHz, targeting an output DDR clock of 500 MHz

    Last information : K2H revision is 3.1

    Regards,

    Bruno

  • Hi,

    A quick question on your run_dma() code, you used the channel 2, and I saw you ESR = 0x1 << 2; Question is why you pull the IPR bit 0 instead of bit 2 for  completion? In the OPT register there is a TCC field, do you use TCC = 0 instead of 2 in your channel setup? I want to confirm that you pull the right bit for EDMA completion. 

    It looked that the EDMA transfer never finish. And when you access the DDR3A, the DSP core hang. Some questions:

    • If you access EMIF config 0x2101_0000 region, hang or still accessible?
    • What is the EDMA source and destination? You read DDR or write DDR or both? 
    • Do you see any error in EDMA ERRSTAT and ERRDET registers?
    • Use CPU for DDR3A test work or not?

    Regards, Eric

  • Hi Eric,

    - I confirm that we use DMA channel 2, PARAM SET 2, TCC=0, and Queue 0

    - EDMA source is L2, destination is DDR3 for write access.

    - EDMA source is DDR3, and destination is L2 for read access.

    - we do both EDMA write, and EDMA reads

    - attempting CPU access to DDR3A when in DMA stuck situation results in stopping any access to the device through JTAG.

    - Unfortunately as I told you, I can not redo the same setup and therefore not able to tell you about ERRSTAT, and ERRDET.

    I just can add that this week  we validated the DDR3 interface , running at 800 MHz during 24 hours, which give us some confidence into external hardware.

    With best regards,

    Bruno

  • Bruno,

    Thanks for the info! As the problem was resolved, the failure and working is 250MHz vs 100MHz reference clock, with the same core PLL and DDR3A PLL. Maybe there is some clock issue on 250 MHz input, and the DDR3A timing is not well maintained, so DDR3A is not accessible in high throughput test, and caused the EDMA hang. Does this explain your question or you need more into it?

    Regards, Eric 

  • Hi Eric,

    My first concern was to know if this kind of miss-interaction between DDR3 and EDMA would have already been experienced.

    Secondly It seemed to me quite strange that a DMA could hang even in case of DDR3 bank badly initialized. I consider (may be wrong) EDMA as an autonomous master mechanism and the DDR3 controller as a slave  How can a slave definitively stop a master is the question. I was expecting that your answer could explain which adherence exist between the 2 modules. But may be it is not only the DMA that is stuck.

    Anyway since I am no more able to redo new experiment, and provided you have no other information to give (do you?) I agree to close the post for now.

    With best regards,

    Bruno