- From your description what I understand is that - whenever the external peripheral sends a pattern like 0xAAAAAAAA to FX3, you need to trigger a GPIO.
If above is your requirement you can try CMP_DATA action in GPIF designer. For example, see below:
In the above state machine, when the data sampled is 0xAAAAAAAA then the state transition happens from STATE1 to STATE0. In STATE0, a GPIO is driven high and data is also sampled on the DQ bus. Note that in the above state machine, STATE1 is executed repeatedly until the data match happens.
Please modify your state machine accordingly to try CMP_DATA
Sorry if my issue explanation was not clear, I meant the situation when on input FlagA rising edge was detected I want to insert a one specific word 0xAAAAAAAA to dma data stream and after this word data stream from 32-bit data bus should be continued until new rising edge on FlagA appeared. In other words I want to add 0xAAAAAAAA to buffer which is used for data traslation from 32-bit bus to DMA Channel.
One way I could think of is:
- Configure your dma channel in such a way that you leave 4 bytes footer. (And the channel should be Manual)
- In a normal scenario when there is no Flag input assertion, as you get the producer events you just commit the buffer with size dmaBuffer.count (Note that you are not filling in the footer)
- When GPIF sees the trigger on a input pin, INTR_CPU action can be used to transfer the control to the firmware and in the firmware you can add footer and commit the buffer.
- After this GPIF state machine resumes which resumes sampling data.
But the limitation with this approach:
Your data stream will be as below:
clock3 to clock15 (for example)
So, will you have some time between data2 and data3 to do the above operation.
OR if you are using counters in your GPIF state machine while sampling data (like AN75779 firmware) then I can suggest one more method which can be tried. Please let me know which state machine are you using.