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.

TMS320F28069: XINT1-3 - associated 16-bit counter - DMA transfer

Part Number: TMS320F28069

Tool/software:

Hello experts!

Our actual situation:

We want to use XINT1 and XINT3 as external interrupt sources, without (!) firing the respective interrupts. No problem, this surely works.

On page 192 of spruh18i.pdf we found the following information:

For XINT1, XINT2, and XINT3, there is also a 16-bit counter that is reset to 0x000 whenever an interrupt edge
is detected. These counters can be used to accurately time stamp an occurrence of the interrupt. XINT1CTR
through XINT3CTR are identical except for the interrupt number; therefore, Figure 1-106 and Table 1-131
represent registers for the external interrupts as XINTnCTR, where n = the interrupt number.

Question: How to get the value of each 16-bit counter? Can we use DMA? If yes, how to do this?

As we can see in the following picture (taken from pdf page 172), there seems to be DMA support.

Is it possible to transfer the 16-bit counter to RAM via DMA? If not, how to get the result, if the "accurately time stamp"

is reset on every interrupt edge? Please remember: no ISR can be used ...

Thank you in advance!

Atti

  • Hi Atti,

    Let me look into this and get back to you.

    Best Regards,

    Delaney

  • Hi Atti,

    Apologies for the delay. The question you need answered here is: does XINT have DMA access? According to the below diagram, the answer is no since the DMA bus does not have a connection to the External interrupts. The XINT can however trigger a DMA channel, which I believe is why there is an arrow to DMA in the diagram you've shown.

    Can you explain the needs of your application more in depth and maybe I can offer a different suggestion? Also, have you looked into the eCAP module on this device? It can detect different rising/falling edge events on GPIO pins and could be used depending on what you are looking for.

    Best Regards,

    Delaney

  • Hello Delaney,
    thank you for the given responses.

    Please let me re-explain our need, respectively our (possible) goal:

    1.)
    There is no eCAP module available, because the hardware in use can't be modified (thousands of pieces rolled out into the field).

    2.)
    We want to read the 16-bit counter associated to XINT1. In our case, this MUST occur offline, because no more interrupts can be used (timing!).

    How to read this 16-bit counter associated to XINT1, if "that is reset to 0x000 whenever an interrupt edge is detected" (please see the

    above colored blue text)? Does this controller use a type of shadow register to maintain the counted value?

    That's why we primarily thought to use a DMA channel triggered by XINT1.


    Best regards,
    Atti

  • Hi Atti,

    Let me look into this and get back to you.

    Best Regards,

    Delaney

  • Hi Atti,

    Apologies, I'm a little confused - is your question how to check this register value with the debugger since the firmware cannot be modified?

    By "occurring offline" do you mean with no debugger attached? Or you mean in the main loop so that no interrupts are triggered (I will assume this)?

    To read this counter value in the main loop, you can do a polling approach to continuously check the XINT interrupt flag. Once the flag goes high, you can read the correlating XINTx_CR register into a variable. Have you tried this in software? I'm assuming the counter itself shouldn't actually get cleared until the XINT conditional flag is cleared, however I'm not sure.

    Best Regards,

    Delaney