The difficulty is probably the /ss signal. The master needs to generate a /cs pulse that is active for each transfer (x8 or x16 bit) You cannot use the master /ss signal for this. when the SPI is in master mode, the /ss has some special feature to do with error detection. The /cs pulse (from master to slave /ss) needs to be implemented with a separate gpio pin. Other connections look correct. (didn't look at your code). See reference manual section 11 for more details.
I too have some problems regarding ?BSPI modules in STR71x. The programme supplied by ST in their site is for BSPI0 master and BSPI1 as slave. and the connection specified is (S0.MISO)P0.0<-->P0.4(S0.MISO) (S0.MOSI)P0.1<-->P0.5(S0.MOSI) (S0.SCLK)P0.2<-->P0.6(S1.SCLK) (S1.SS)P0.7==GND (what about so.ss???) BUT WHEN I CHECKED THE CORRESPONDING CONNECTION ON THE DEVELOPMENT BOARD (STD710B)I FOUND IT INCORRECT.ARE THE CONNECTION RIGHT IN THE MENTIONED DEVELOPMENT BOARD.kINDLY REPLY BECAUSE WE ARE STUCK WITH THIS PROBLEM FOR THE PAST 4 DAYS.OUR FURTHER DEVELOPMENT DEPENDS ON ITS SOLUTION. THANKS 'n' REGARDS
So I think the connections for BSPIO0 as master and BSPI1 as slave is surely as below????!!!!
BSPI0.MOSI (P0.1)<-> BSPI1.MOSI (P0.4) BSPI0.MISO(P0.0) <-> BSPI1.MISO (P0.4) BSPI0.SCLK(P0.2) <-> BSPI1.SCLK (P0.6) BSPI1.SSN <--> GND s0.ss<--> Vcc(+3.3V) wE ARE USING THE BOARD stdv710b AND THE FLASH IS M25P32... rEGARDS ajsndd
On 25-09-2006 at 10:38, Anonymous wrote: The SS pin of the master should be high. Read the Reference Manual... table 41 and page 236, BERR Yes ok But if I don't set ''Alternate Function'' for this pin (p0.7) why not work fine, if i use this for gpio, in master mode ? tnx Beppe use: STR71x with raisonance kit