Synchronous UART. SCK clock.

Hello all! I'm new in the forum and new with Renesas MCUs.

I'm working with an S124 and peripheral SCI9 in SYNCHRONOUS UART/SIMPLE SPI mode:

 - P109 --> MOSI

 - P110 --> MISO

 - P111 --> SCK

It is working well, but I need to synchronize one more pin. I need to raise or low a digital pin after a certain number of SCK pulses. My question is: Is there any way of counting SCK pulses? Or maybe could I use any interrupt?

Thanks in advance!

  • Hi AlfonsoV,

    AGT can count external events, please refer to S124 User's Manual (section 20.3.5). You may need to configure AGT using registers, because the SSP driver does not currently support this.

    Regards,
    adboc

  • In reply to adboc:

    Thanks for your response adboc.

    So, the only way of doing it is using external events?
    Are there no internal counters to do that?

    Regards
  • In reply to AlfonsoV:

    Hi AlfonsoV,

    Based on S124 user's manual, I don't think that SCI exposes any interface to read SCK state internally.

    Regards,
    adboc
  • In reply to adboc:

    Is there any example of this use of AGT (or something similar) in the RENESAS web site or somewhere else?

    Thanks

  • In reply to adboc:

    One more question.
    Why does not AGT SSP driver support it? Do you know if will be possible to do it in the future?

  • In reply to AlfonsoV:

    Hi AlfonsoV,

    Unfortunately I don't know when it will be added. But SSP is actively maintained and developed so for sure there is a chance one of the future release will include updated AGT driver.

    Regards,
    adboc