I am interfacing Wi-Fi module (RS-WC-201) with bf525 through SPI interface, is their C code available for spi read write..? to transmit and receive data from host(BF525) to module(RS-WC-201) using spi...?
I am not sure if we have any sample code to demonstrate the SPI interface between RS-WC-201 and BF525.
The datasheet of RS-WC-201 I found on web-site does not provide all details of required to understand the slave protocol and it's requirement. If you can tell us exact setting required for our master SPI, then perhaps we can guide you.
The only things I can suggest-
- you should use mode-0 (CPOL=CPHA=0) of communication.
- since you need both transmit and receive operations, you should use TIMOD as either 00 or 01 (core mode)
- since the slave (RS-WC-201) supports 12.5MHz max; so for 100MHz Blackfin SCLK, the SPI_BAUD register can be configured to 4.
Attached is the simple code to show SPI programming for full-duplex operation in core mode (for BF592 processor though). You can use that as reference to understand how SPI is configured.
Retrieving data ...