iam new software engineer and developing the driver for ksz8851snli iam getting little confusion with clock diagram of ksz8851snli which is spi to ethernet
data sheet link of ksz8851snli page no:22
my requirement is to send the txfifo register address first then then i need write data to the txq fifo for this iam getting two things on mind
1) first i have to make all data to be in an single array like
tx register address + data
for example if i have => register address has 0x80 and data as 0x1234
int arr[10];
arr[0]= 0x80;
arr[1]=0x1234;
lpspi_transfer_t fifo_write;
fifo_write.txData=arr;
fifo_write.rxData=NULL;
fifo_write.dataSize=10;
fifo_write.configFlags=kLPSPI_MasterPcs1 | kLPSPI_MasterPcsContinuous | kLPSPI_SlaveByteSwap;
LPSPI_MasterTransferBlocking(LPSPI4,&fifo_write);
OR
2)
for example if i have => register address has 0x80 and data as 0x1234
int arr[10];
arr[0]= 0x80;
lpspi_transfer_t fifo_write;
fifo_write.txData=arr;
fifo_write.rxData=NULL;
fifo_write.dataSize=10;
fifo_write.configFlags=kLPSPI_MasterPcs1 | kLPSPI_MasterPcsContinuous | kLPSPI_SlaveByteSwap;
LPSPI_MasterTransferBlocking(LPSPI4,&fifo_write);
arr[0]=0x1234;
lpspi_transfer_t fifo_write;
fifo_write.txData=arr;
fifo_write.rxData=NULL;
fifo_write.dataSize=10;
fifo_write.configFlags=kLPSPI_MasterPcs1 | kLPSPI_MasterPcsContinuous | kLPSPI_SlaveByteSwap;
LPSPI_MasterTransferBlocking(LPSPI4,&fifo_write);
NOTE: In this api chip select line be low when data starts transmitting after data transmitted chip select line will be high
as per the txq fifo write clock diagram can write both the ways i.e 1 and 2 or else i have to write only 1st one or else please suggent is there any way of choosing seperate chip select line low and high when ever i required it means sending all the data i need to make high
its required urgent reply
Thank you and regards
Sandeep C