- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i am trying to use SPI on the SN8000xUFL platform.
If I initialize the SPI with "SPI_NO_DMA" bit set, everything works as expected and I can see SPI transfers on the oscilloscope.
If I set the "SPI_USE_DMA" there are not transfers.
The code is pretty straightforward, I found it in one of the examples:
wiced_spi_device_t spi = {
.port = WICED_SPI_1,
.chip_select = WICED_GPIO_23,
.speed = 1500000,
.mode = (SPI_CLOCK_RISING_EDGE | SPI_CLOCK_IDLE_LOW | SPI_USE_DMA | SPI_MSB_FIRST),
.bits = 8
};
wiced_spi_init(&spi);
wiced_spi_message_segment_t segments[1];
uint8_t out[16];
uint8_t in[16];
segments[0].tx_buffer = out;
segments[0].length = 16;
segments[0].rx_buffer = in;
while(1){
// change the resistance on this channel from min to max:
wiced_spi_transfer(&spi, segments, 1);
}
Is there something I have missed or an extra peripheral I forgot to configure?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is this still an issue for you, if so, I can have someone from Murata help us look into this. Feel free to send me a PM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Here is Xinsi Lin from Murata. can you please us know which version of Wiced-SDK you are using, we will do a check.
Thanks.
Xinsi Lin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Xinsi,
I am using version 3.1.2.
Best regards,
Ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am actually not sure if is has something to do with the Murata module.
The SPI that I am trying to use is not connected to a module, it is an external SPI bus I am using to connect to an external ADC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the updates.
We use SPI DMA for our application which is working fine. You need also configure DMA if you want to use DMA. Your code sample doesn't show whether you have DMA configured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Should it be done at the WICED API level?
Is there any example of how to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is an example in WICED-SDK-3.1.2\WICED\platform\MCU\STM32F2xx\WWD\wwd_SPI.c.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you need any sample code for how to use DMA + SPI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There was an issue in another thread, which looks like it was deleted, where the TX and RX DMA definitions were reversed for SPI. There was also another problem, but I don't remember what it was.