cancel
Showing results for 
Search instead for 
Did you mean: 

BSPI0 and 1

christophe239955
Associate II
Posted on November 03, 2006 at 03:20

BSPI0 and 1

2 REPLIES 2
christophe239955
Associate II
Posted on November 02, 2006 at 10:33

Hello,

I'm using BSPI0 and BSPI1:

the BSPI1 is working well : we see MOSI / clck / MISO

P0.4 : MISO

P0.5 : MOSI

P0.6 : CLCK

P0.7 : not used in master = 1

P2.4 : CS equipment

GPIO_Config(GPIO0,0x70,GPIO_AF_PP);

BSPI_Init(BSPI1);

BSPI_Enable(BSPI1);

BSPI_MasterEnable(BSPI1,ENABLE);

BSPI_ClkActiveHigh(BSPI1,DISABLE);

BSPI_ClkFEdge(BSPI1,DISABLE);

BSPI_8bLEn(BSPI1,ENABLE);

GPIO_Config(GPIO0,1<

GPIO_BitWrite(GPIO0,0x7,1);

BSPI_TrFifoDepth(BSPI1,8);

BSPI_RcFifoDepth(BSPI1,8);

GPIO_BitWrite(GPIO2,0x4,0);//CS

BSPI_BufferSend(BSPI1,buffer_send,8);

while(BSPI_FlagStatus(BSPI1,BSPI_RFF))==0);

GPIO_BitWrite(GPIO2,0x4,1);//CS

BSPI_BufferReceive(BSPI1,buffer_receive,8);

and with the same configuration for BSPI0 we don't have the clck but we have the MOSI?

P0.0 : MISO

P0.1 : MOSI

P0.2 : CLCK

P0.3 : not used in master = 1

P1.8 : CS equipment

GPIO_Config(GPIO0,0x7,GPIO_AF_PP);

BSPI_Init(BSPI0);

BSPI_Enable(BSPI0);

BSPI_MasterEnable(BSPI0,ENABLE);

BSPI_ClkActiveHigh(BSPI0,DISABLE);

BSPI_ClkFEdge(BSPI0,DISABLE);

BSPI_8bLEn(BSPI0,ENABLE);

GPIO_Config(GPIO0,1<

GPIO_BitWrite(GPIO0,0x3,1);

BSPI_TrFifoDepth(BSPI0,8);

BSPI_RcFifoDepth(BSPI0,8);

GPIO_BitWrite(GPIO1,0x8,0);//CS

BSPI_BufferSend(BSPI0,buffer_send,8);

while(BSPI_FlagStatus(BSPI0,BSPI_RFF))==0);

GPIO_BitWrite(GPIO1,0x8,1);//CS

BSPI_BufferReceive(BSPI0,buffer_receive,8);

I see that the spi clck can also be a i2c : is it from this?

Is the clck of BSPI0 is working on the str710?

thanks

christophe239955
Associate II
Posted on November 03, 2006 at 03:20

I found why : I forgot for BSPI0 the configuration of PCU->BOOTCR