cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

New Contributor II

Hi All,

How to intialize SPI to communicate with sflash in wiced. How we can generate different clock frequencies on the clk pin.

Please let me know how i can do this?

Thanks,

Basavanagouda.

0 Likes
Reply
1 Solution
Moderator
Moderator

if 43907 is used  now,  we often modify SPI_CLOCK_SPEED_HZ to change the SPI clock.

#ifdef USE_SPI0_DEVICE

static const wiced_spi_device_t spi0_device =

{

.port        = WICED_SPI_1,

.chip_select = WICED_GPIO_22,

.speed       = SPI_CLOCK_SPEED_HZ,

.mode        = SPI_MODE,

.bits        = SPI_BIT_WIDTH

};

#endif

static const wiced_spi_device_t spi1_device =

{

.port        = WICED_SPI_2,

.chip_select = WICED_GPIO_NONE,

.speed       = SPI_CLOCK_SPEED_HZ,

.mode        = SPI_MODE,

.bits        = SPI_BIT_WIDTH

};

View solution in original post

0 Likes
Reply
4 Replies
New Contributor

Might I suggest that you open TopDesign.cysch then mouse over the SPI symbol and right click on configure. You  should then see many options to configure the parameters.

Mike

0 Likes
Reply
New Contributor II

Hi Mike,

I'm using sdk 6.2. I want to change it in the source code. Please let know where i can change it?

Thanks,

Basavanagouda.

0 Likes
Reply
Moderator
Moderator

hello:

    which chip are you using now?  and better to tell which physical SPI interface .

0 Likes
Reply
Moderator
Moderator

if 43907 is used  now,  we often modify SPI_CLOCK_SPEED_HZ to change the SPI clock.

#ifdef USE_SPI0_DEVICE

static const wiced_spi_device_t spi0_device =

{

.port        = WICED_SPI_1,

.chip_select = WICED_GPIO_22,

.speed       = SPI_CLOCK_SPEED_HZ,

.mode        = SPI_MODE,

.bits        = SPI_BIT_WIDTH

};

#endif

static const wiced_spi_device_t spi1_device =

{

.port        = WICED_SPI_2,

.chip_select = WICED_GPIO_NONE,

.speed       = SPI_CLOCK_SPEED_HZ,

.mode        = SPI_MODE,

.bits        = SPI_BIT_WIDTH

};

View solution in original post

0 Likes
Reply