- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I want to send byte stream on SPI.
I have to use SPI in a way where LSB (less significan bit) is transmitted before MSB (most significant bit).
I set SPI_LSB_FIRST but no results ...
spi_config_fpga.port = WICED_SPI_2;
spi_config_fpga.chip_select = WICED_GPIO_NONE; /* CS gestiti via SW */
spi_config_fpga.speed = 1e6; /* Massimo 40MHz, 25ns Hold Time */
spi_config_fpga.mode = SPI_CLOCK_RISING_EDGE | SPI_CLOCK_IDLE_HIGH | SPI_NO_DMA | SPI_LSB_FIRST | SPI_CS_ACTIVE_LOW; /* see Document Number 002-14829 Rev. *K page 22 */
spi_config_fpga.bits = 8;
/* init 'spi_config_fpga' spi */
status = wiced_spi_init ( &spi_config_fpga );
- Labels:
-
WICED Studio Wi-Fi Combo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you share your complete application code with us? Is data transfer happening at all? Can you share the terminal logs that you get when the application runs? I am not sure what do you mean by this -- I set SPI_LSB_FIRST but no results ...., is data transfer not happening at all or LSB bit isn't getting transmitted first?
Thanks
Aditi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Data is transferred but,
for example,
if I want to transfer byte 0xBA that is 10111010 in binary
I want that SPI put out bits in this way 01011101 ( = LSBit first) and not 10111010 (MSBit first)