Skip to main content
Visitor II
September 23, 2003
Question

ST7 SPI in slave mode

  • September 23, 2003
  • 4 replies
  • 970 views
Posted on September 23, 2003 at 10:46

ST7 SPI in slave mode

    This topic has been closed for replies.

    4 replies

    Visitor II
    September 15, 2003
    Posted on September 15, 2003 at 02:07

    The main use of my st7lite09 is for the SPI port to receive a byte from my main HC11.

    I set slave mode:

    cpol=0 ,cpha=1

    SPICR = 0110 0100 or 01x0 01xx

    SPICSR =xxxx 0000 for /ss external cont

    the ST7 is slave2 , I want it to ignore all incoming data on MOSI while /SS is high

    otherwise the byte in the buffer is an old byte , possibly from slave1

    Is this how it works? Do the SPI buffers keep reading data in even when /SS goes high as a slave? Do the flags continue to be set and cleared also?

    *note: there appears to be a datasheet error page 66/122 , bit5=OVR line 6 SPICSR should be SPICR?
    Visitor II
    September 18, 2003
    Posted on September 18, 2003 at 03:36

    When the ST7 is used as SPI slave and the SS pin is high during

    reception then no data is read into the shift register.

    In the datasheet on page 66/122, bit5=OVR line 6 it is SPICSR. There is no error in that line.

    Visitor II
    September 22, 2003
    Posted on September 22, 2003 at 07:11

    Hi Ansh,

    I think Peter Mac was referring to the line where it says ''the SPIE bit in the SPICSR register.'' The SPIE bit is in the SPICR register, of course. Mmmm. Same error in MODF paragraph just below. Wheels are in motion at ST to get this corrected in future revs.

    HTH.

    Visitor II
    September 23, 2003
    Posted on September 23, 2003 at 10:46

    Hi John

    Thanks for pointing out the error.

    This will be corrected in the new version of the datasheet.

    Rgds