- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to make it work when CyU3PSpiSetConfig() called repeatedly to change the settings?
the example code as the following, but it not work.
example code:
CyU3PSpiConfig_t spiConfig;
spiConfig.wordLen = 10;
CyU3PSpiSetConfig (&spiConfig, NULL);
CyU3PSpiSetSsnLine (CyFalse);
CyU3PSpiTransmitWords (addr, addrbytecnt);
spiConfig.wordLen = 8;
CyU3PSpiSetConfig (&spiConfig, NULL);
CyU3PSpiTransmitWords (data, DataByteCount);
CyU3PSpiSetSsnLine (CyTrue);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes it is possible to change SPI configurations dynamically. PFA firmware which is used to change the SPI config wordlength using control center. You have to send the vendor command and use wIndex field to set the desired wordlength. Changes will be highlighted in the debug prints.
Thanks & Regards
Abhinav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Which transfer mode are you using.
If the DMA mode is used, the DMA channel(s) need to be reset after each fresh CyU3PSpiSetConfig API
call.
Please refer to the FX3API Guide section 5.32.4.7 for further reference.
Thanks & Regards
Abhinav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
using SPI reg mode.
How to do for SPI reg mode to fresh CyU3PSpiSetConfig API call?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Are you able to change the SPI configuration for the first time. I tried and changed the clock, it worked fine. I am sending the vendor command in which I am calling SpiInit2(), which is re-configuring the Spi clock.
I am attaching the firmware, you can take it as reference.
Thanks & Regards
Abhinav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Abhinav,
It's not work when call the CyU3PSpiSetConfig() repeatedly to change the SPI word length in a function call.
Could you provide the example code for changing different SPI Word length dynamically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Abhinav,
Any update?
Is the FX3 HW SPI not support for changing different SPI Word length in the SSL active interval dynamically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes it is possible to change SPI configurations dynamically. PFA firmware which is used to change the SPI config wordlength using control center. You have to send the vendor command and use wIndex field to set the desired wordlength. Changes will be highlighted in the debug prints.
Thanks & Regards
Abhinav