S1JA DTC Chain transfer

Hello,

 

Is there any example how to implement DTC chain transfer on S1JA microcontrollers?

 

Regards,

Peter

  • Hi Peter,

    Here is a thread about DTC transfer, though this is on S7G2, i still hope that this will give you some ideas.

    renesasrulz.com/.../41931

    Herald
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/
  • In reply to Herald:

    Hi Peter-
    Take a look at this DTC example, it should help.

    www.renesas.com/.../keyword-search.html
  • In reply to WarrenM:

    Hello Peter,

    S1JA_TB_DTC_CHAIN.zip

    Please find attached an example for the S1JA, written using SSP1.7.8.

    The example shows how chain transfer can be used to read multiple, none contiguous, ADC channels.

    The ADC is triggered by the AGT timer, triggered every 500ms.

    The ADC will scan the specified A/D channels. (in this example, AN000, AN001, AN002, AN003, AN006, AN007, AN016, AN017)

    The ADC Scan interrupt will trigger the DTC that will read the A/D results and store the data in the results array:

    adc_results_buffer[ADC_CHANNELS][BUFFER_DEPTH];

    where ADC_CHANNELS = 8, and the BUFFER_DEPTH = 8.

    The process of reading the ADC data via the DTC will either break after a specified number of triggers, or run forever, depending on the on which define is declared

    #define DTC_CHAIN_FOREVER   1
    //#define DTC_CHAIN_ESCAPE  1

    If #define DTC_CHAIN_FOREVER   1, then the DTC will use repeat mode and run forever,

    If #define DTC_CHAIN_ESCAPE  1, then after #define DTC_WAKE_UP_COUNT   10         /* ADC (DTC transfers) */ transfer, the DTC stops handling the ADC interrupt and it is handled by the CPU, and stops.

    Note, that if #define DTC_CHAIN_FOREVER   1 has been set, that pressing the user push button can stop the process.

     

    Hope this is of interest and that the worked example shows how to create DTC chained transfers.

     

    Regards,

    Richard

  • Hi Peter,

    Have you solved this already? Did you checked the replies of other members? Hope it will help you.

    Herald
    RenesasRulz Forum Moderator

    https://renesasrulz.com/
    https://academy.renesas.com/
    en-us.knowledgebase.renesas.com/
  • In reply to Richard:

    Thank you Richard, the example helped me to configure my DTC chain transfer.

    Regards,
    Piotr