Skip to main content
Visitor II
August 22, 2008
Question

SSP0

  • August 22, 2008
  • 4 replies
  • 833 views
Posted on August 22, 2008 at 13:08

SSP0

    This topic has been closed for replies.

    4 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:55

    Hi there

    I tried to pass around this, reworking the functions of 91x_SSP, to work directly with registries, and this is working, except one register, the DR register, each time i try to write to it, it fills the bytes up with 0xFF!

    does any one know how to write to it?

    Thankx :o

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:55

    The DR register is tied to the transmit & receive FIFOs for the SSP. When you write to it, it loads the word into the transmit buffer. But when you read from it, it reads the next entry in the receive buffer. So you shouldn't expect to see the same value you just wrote to it when you read it.

    matt

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:55

    hi matt!

    Thanks again for the tip, but i've tried other prespective, and i've compiled and runned ST SSP example, once more the problem is the same!!! The doomed processor goes on looping in here and stay in there forever!!!

    code part:

    ...

    /* Master to slave transfer procedure */

    while(Tx_Idx

    {

    SSP_SendData(SSP0, SSP0_Buffer_Tx[Tx_Idx++]);

    :-Z while(SSP_GetFlagStatus(SSP1, SSP_FLAG_RxFifoNotEmpty)==RESET);

    SSP1_Buffer_Rx[Rx_Idx++] = SSP_ReceiveData(SSP1);

    }

    ...

    in this while loop.

    Thanks again

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:55

    Have you checked your HW connections?

    SSP0 MOSI -> SSP1 MOSI

    SSP0 MISO -> SSP0 MISO

    SSPO NSS -> pull high

    SSP1 NSS -> pull low