Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello Every one,

   

I am making a SPI master slave test program with certain conditions:

   

I want to do the following:

   

Master is sending an 8 bit data in order to start the communication.

   

At the same time slave will directly send some dummy value.

   

Then: if the master has send a value 0x02 then the slave should send 0x10u.

   

otherwise it will give 0x58u.

   

I write the program (please have a look at the attachment). But, some how its not working as it supposed to work! there must be something wrong.

   

I will look forward to hearing from you.

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please go through the component datasheet properly and see the API explaination too.

   

uint8 SPIS_ReadRxStatus(void):_
Description:
Returns the current state of the Rx status register. 

   

Return Value:
uint8: Current Rx status register value 

   


Bit:SPIS_STS_RX_FIFO_EMPTY
Description:Rx FIFO empty

   


Bit:SPIS_STS_RX_FIFO_NOT_EMPTY
Description:Rx FIFO not empty

   


Bit:SPIS_STS_RX_FIFO_OVERRUN
Description:Rx Buf overrun

   


Bit:SPIS_STS_RX_FIFO_FULL
Description:Rx FIFO full

View solution in original post

0 Likes
1 Reply
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Please go through the component datasheet properly and see the API explaination too.

   

uint8 SPIS_ReadRxStatus(void):_
Description:
Returns the current state of the Rx status register. 

   

Return Value:
uint8: Current Rx status register value 

   


Bit:SPIS_STS_RX_FIFO_EMPTY
Description:Rx FIFO empty

   


Bit:SPIS_STS_RX_FIFO_NOT_EMPTY
Description:Rx FIFO not empty

   


Bit:SPIS_STS_RX_FIFO_OVERRUN
Description:Rx Buf overrun

   


Bit:SPIS_STS_RX_FIFO_FULL
Description:Rx FIFO full

0 Likes