A more friendly way to create a chip select with SPI ?
Posted: Mon May 05, 2008 9:46 pm
Dear all,
I'm trying to do a very simple thing : send some SPI to a peripheral (see model attached). The thing is that the peripheral needs its CS to be pulled down just before the transfer and pulled back up at the end. To do this, I used the block ordering function, but I had to introduce a lot of NOPs. The SPI block orders the next block as soon as it has transmitted the send request to the SPI peripheral, it does not wait for the transfer to be effectively over.
The current method works, but I wondered if there was a more CPU friendly way, as this is quite ressource consuming.
Thanks,
Martin
I'm trying to do a very simple thing : send some SPI to a peripheral (see model attached). The thing is that the peripheral needs its CS to be pulled down just before the transfer and pulled back up at the end. To do this, I used the block ordering function, but I had to introduce a lot of NOPs. The SPI block orders the next block as soon as it has transmitted the send request to the SPI peripheral, it does not wait for the transfer to be effectively over.
The current method works, but I wondered if there was a more CPU friendly way, as this is quite ressource consuming.
Thanks,
Martin