- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have any chance to set the clock rate to 10MHZ for FX2LP?
Use GPIF or any other method ?
Or how can operate the IO in high speed toggle For FX2LP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
FX2LP GPIO can be manually toggled at a maximum frequency of 4MHz when CPU is running at 48MHz. How to do it?
>> You can repeatedly toggle bit corresponding to respective GPIO in "IOx" register. As a register write in FX2LP takes 12 clock cycle and CPU is running at 48MHz, so at max you can toggle GPIO at 250ns interval.
We have bitbanging implementation of SPI (https://www.cypress.com/file/125791/download#:~:text=Both%20FX2LP%20UARTs%20have%20a,UART0%20as%20an....) not I2C but you can definitely not do it at 10MHz using this approach.
We do not have I2C sample implementation using GPIF.
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
CPU in FX2LP can run at 12, 24 or 48MHz. There is no way to run it at 10MHz. However the GPIF/ Slave FIFO can be made to run at 5 - 48MHz but inputting corresponding clock through IFCLK pin.
FX2LP GPIO can be manually toggled at a maximum frequency of 4MHz when CPU is running at 48MHz.
Can you please elaborate on your exact requirement so that I can help you better?
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a customize device, it can operate the max clock frequency 10mhz at I2C protocol.
The build-in I2C in FX2 just support 400KHZ.
May I have any change to use GPIF or GPIO to make a faster I2C to control my component?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi :
I have a customize device, it can operate the max clock frequency 10mhz at I2C protocol.
The build-in I2C in FX2 just support 400KHZ.
May I have any change to use GPIF or GPIO to make a faster I2C to control my component?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FX2LP GPIO can be manually toggled at a maximum frequency of 4MHz when CPU is running at 48MHz.
How to do it?
Have any sample code for this high speed GPIO to implement high speed I2C protocol?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
FX2LP GPIO can be manually toggled at a maximum frequency of 4MHz when CPU is running at 48MHz. How to do it?
>> You can repeatedly toggle bit corresponding to respective GPIO in "IOx" register. As a register write in FX2LP takes 12 clock cycle and CPU is running at 48MHz, so at max you can toggle GPIO at 250ns interval.
We have bitbanging implementation of SPI (https://www.cypress.com/file/125791/download#:~:text=Both%20FX2LP%20UARTs%20have%20a,UART0%20as%20an....) not I2C but you can definitely not do it at 10MHz using this approach.
We do not have I2C sample implementation using GPIF.
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I test the first GPIO
I got toggle GPIO at 250ns interval,it's right.
But I try the bitbanging methode, it's around 3MHZ (around 165ns ~ 170ns), how can I speed up to reach your mention 4MHZ?
thx..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
250ns toggling is the ideal scenario where there is no conditional/ looping overheads. If you add some other code along with writing to IOx registers it would add some extra delay.
I would like to correct myself, 250ns toggling would result in clock pulse of 2MHz instead of 4MHz as I mentioned earlier. Apologies for the mistake.
Is short, Maximum speed of GPIO (Only IOx register writes and no other code) is approx 2MHz. There will definitely some overhead code that reduces it even further.
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The GPIO is approx 2MHZ, I will implement the I2C in it.
Another method is 8051 UARTs, it seems more faster to 12MHZ
But the I2C protocol need to check for ACK, the 8051 UART use the Buffer send out data, not use IO. Is any possible to implement the I2C protocol to use 8051 UART to speed up the clock rate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
UART and I2C protocols implementations are fairly different, therefore it would be difficult to implement I2C protocols using UART commands. We currently do not have any such implementation readily available
Pranava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
SPI master for Serial Port Mode 0, RxD0OUT / MOSI PORTE.3
I want to know where to set the related between PORTE.3 and RxD0OUT.
void SPIByteWriteU (BYTE d)
{
TI = FALSE; //Clear flag
SBUF0 = swap1[d]; //Write byte
while (!TI); //Wait until transmit done
}
Why SBUF0 can send out data through PORTE.3 ?
If I want to use serial Port1 the SNUF1 will send out the data through which pin?