- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I want to set SPI flash function to my firmware.
so how can i dynamic configuration GPIO between SPI and fifo
i don't wnat using API to jump bootload or SPI programming mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
that is already discuessed a few times....
http://www.cypress.com/?app=forum&id=167&rID=90827
http://www.cypress.com/?app=forum&id=167&rID=85364
regards,
lumpi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi lumpi,
thank you tell me that, and i know setting SPI at UART pin.
but it not i want,
so the I/O can't dynamic switch between FIFO and SPI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do you want to use SPI in conjuction with 32-bit GPIF?
According FX3 datasheet this is not possible to use FX3 built-in SPI module in 32-bit GPIF mode. Workaround is to implement SPI yourself in FX3 software.
Br,
kalev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kalev,
i just want to do that,
1. firmware is running 32bit fifo function
2. chang GPIO from fifo to SPI (not SPI programming.img , still my firmware)
3. build new firmware through SPI flash
4. reset IC to running new firmware
so, i just change GPIO from fifo to SPI once when i want flash SPI ROM
is it possible ?
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you do not need 32-bit GPIF and SPI simultaneously, then you can reconfigure GPIF from 32-bit mode to 16-bit mode at runtime by calling CyU3PDeviceConfigureIOMatrix function again. Note that Cypress does not recommend such a dynamic reconfiguration (could it be that there may appear glitches on pins?), but at least in my application this works pretty well.
Br,
Kalev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kalve,
thank you a lot,
but i have other question, if i use 32 bit fifo, the SPIand UART pin are share,
so the circuit can share ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Facos,
See table 7 in CYUSB301X datasheet ( http://www.cypress.com/?docID=49087 ) and especially note 3 on page 15 there:
Note 3. When GPIF II is configured for the 32-bit data bus width, GPIO[50]-GPIO[52] may be configured as GPIOs or I2S, and GPIO[53] to GPIO[56] may be configured as GPIOs or UART interface only.
So, whatever the actual reason is, built-in SPI module can't be used in this mode. Reconfigure GPIF to 16-bit mode or implement SPI in software with using GPIOs.
br,
Kalev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kalve,
So, if i use 32bit fifo and i creat GPIO[53] to GPIO[56] are SPI like UsbGpioSpiMode
In hardware, I can't creat UART circuit and SPI circuit at the same time
is it right ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Facos,
I am not familiar with FX3 internal circuit. There might be that GPIOs 53...56 just can't be routed to built-in SPI module if GPIF is in 32-bit mode. Or, it might be that SPI module can't be powered. Or, ... .
Anyway, whatever the reason is, if datasheet tells that you can't use SPI module when you set GPIF to 32-bit mode, then you can't (I have no reason to doubt on this statement in dataseet).
If you need to know exact reason why SPI can't be used, create a Tech Case.
br,
Kalev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you a lot of