4 Replies Latest reply on Dec 14, 2016 7:37 AM by jirec_1873026

    ISR on DMA causes CyDsFit problem

      I'm building an application in PSoC creator 3.3 on a pioneer board with cy8c-4248-LQI-BL583. I've been able to get interrupts working for all kinds of other applications without a problem.


      But when I take the ADC SAR Seq block and hook its eoc to a DMA block, tr_in, check "generate interrupt" and hook tr_out of the DMA block to an ISR, I get the error "Failed to place fixed-function blocks, see the report file for details" and sjplacer.exe failed 0xFFFFFFFF.


      I tried the Cypress demo project CE97089, and it works -- but they set up the ISR using code rather than the GUI and generated code. If I attach an ISR to the tr_out pin of the DMA there, I get the exact same errors. I'd really rather set up the ISR via the GUI and the modern CY_ISR macro like the rest of my code, for readability's sake if nothing else. But it looks like it's just not possible to use the ISR block with the DMA block?


      When I look at the .rpt file, it's not obvious what went wrong. It says it's having trouble placing the DMA, but there are no other DMA devices contending for slots, so I don't know why that would fail. The Analog code generation phase says :


      Error: plm.M0046: E2806: Failed to place fixed-function blocks. See the report file for details.
      "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\bin/sjplacer.exe" --proj-name "CE97089_ADC2Buffer_DMA" --netlist-vh2 "CE97089_ADC2Buffer_DMA_p.vh2" --arch-file "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\dev/arch/p4_udb2x2.ark" --rrg-file "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\dev/psoc4/3/256dma/route_arch-rrg.cydata" --irq-file "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\dev/psoc4/3//256dma/irqconn.cydata" --drq-file "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\dev/psoc4/3//256dma/triggerconn.cydata" --dsi-conn-file "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\dev/psoc4/3//256dma/dsiconn.cydata" --pins-file "pins_56-QFN.xml" --lib-file "CE97089_ADC2Buffer_DMA_p.lib" --sdc-file "CE97089_ADC2Buffer_DMA.sdc" --io-pcf "CE97089_ADC2Buffer_DMA.pci" --outdir .
      <CYPRESSTAG name="Detailed placement messages">
      I2659: No Constrained paths were found. The placer will run in non-timing driven mode.
      I2807: The following instances could not be placed: DMA_1
      DMA placement:
      DMA 0: <empty>
      DMA 1: <empty>
      DMA 2: <empty>
      DMA 3: <empty>
      DMA 4: <empty>
      DMA 5: <empty>
      DMA 6: <empty>
      DMA 7: <empty>


      E2806: Failed to place fixed-function blocks. See the report file for details.
      Error: plm.M0046: "C:\Program Files\Cypress\PSoC Creator\3.3\PSoC Creator\bin/sjplacer.exe" failed (0xFFFFFFFF)


      Everything else in the RPT file looks normal, plenty of resources, no UDB resources used at all, etc. Help!

        • 1. Re: ISR on DMA causes CyDsFit problem

          The reason is that there is already a DMA connected to the eoc of the sequencing ADC. Results get transferred into an array which you may read out. When you want the ADC outputs transferred to a different destination you might try to change that.





          • 2. Re: ISR on DMA causes CyDsFit problem

            Hi, Bob -- always appreciate your participation here.


            What I'm trying to do isn't hooking up to the eoc -- I have the DMA hooked up there. I'm trying to hook an ISR up to the tr_out line of the DMA so I can be notified when the DMA transfer has completed.


            In the example (CE97089), the tr_out line of the DMA is left disconnected, and the completion interrupt gets hooked up via lower level calls like:


            DMA_1_Start((void *) ADC_SAR_Seq_SAR_CHAN0_RESULT_PTR, ADCBuffer);


            Although I got my system working fine via lower level calls like this, the rest of my system is built using ISR blocks and higher level calls and auto-generated API code. I'd love to be consistent. But to do that, I'd need to connect an ISR block to the tr_out port of the DMA, which causes sjplacer to freak out.

            • 3. Re: ISR on DMA causes CyDsFit problem



              The tr_out is specifically meant to connect to another DMA as the trigger for chained operation. For isr on DMA tr_out you need to place a Global Signal Reference component and select DMAInt. The tr_out is different from the post completion action. tr_out will get triggered after one data element transfer whereas software interrupt will get triggered when the complete data elements get transferred.





              • 4. Re: ISR on DMA causes CyDsFit problem

                Got it -- thanks!