Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 22625

Re: BF609 SPI Programming Example

$
0
0

Thanks!

 

Using the Example I managed to either read or write. However, I also want to read back data while transmitting. Unfortunately, it is not clear how to set the registers for that....

 

*pREG_SPI1_TWC = count;
*pREG_SPI1_TXCTL = ENUM_SPI_TXCTL_TX_EN | ENUM_SPI_TXCTL_TTI_EN | ENUM_SPI_TXCTL_TWC_EN;

// ???????

for (i = 0; i < count; i++)
{  while (*pREG_SPI1_STAT & BITM_SPI_STAT_TFF)     ;  *pREG_SPI1_TFIFO = output[i];

// ???????
  response[i] = *pREG_SPI1_RFIFO;     
}

 

Can you fill in the ???

 

Many Thanks.

 

Axel


Viewing all articles
Browse latest Browse all 22625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>