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.
Solved! Go to Solution.
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
};
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
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.
hello:
which chip are you using now? and better to tell which physical SPI interface .
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
};