Hello everyone
I'm using a Renesas RA0 microcontroller. I would like to know if there is some example code showing how to use the SAU peripheral for SPI WITHOUT using interrupt. I use the SPI for both receiving and transmitting data in Master Mode.
Thanks in advance,
Br
Davide Petralia
Hi DAV_94,
I think the official SAU_SPI sample project can fit your requirement, although it use the interrupt of SPI but in the interrupt it just read the status of SPI and not handling any data in IRQ.
ra-fsp-examples/example_projects/fpb_ra0e1/sau_spi/sau_spi_fpb_ra0e1_ep at v5.3.0.example.3 · renesas/ra-fsp-examples (github.com)
BR,
NP_Renesas
Ok thanks, which bit in which register can I check to verify that trasmission/reception has been completed?
You can check the TSF register:
And one more thing, sorry for my miss, the SAU_SPI cannot disable the interrupt because the transmit and reception is based on IRQ of SAU, so the most easy way to check if the data is transmitted is that when transmitting is done it will trigger an irq.
So there is no other way to implement SPI without using interrupt and SAU:SPI Api? For the RA2 I was able to implement this
Yes, cause RA0 and RA2 are using different peripheral to implement SPI protocol, so on RA0 you have to enable the IRQ of SAU to implement the SPI function.
So there is no way to poll the SPI end-of-transimission neither start the SPI tx within a block that contains a __disable_irq( ); ?