GPIF not working in 32bit mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
damc_1337896
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

using the example:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxgpiftousb

I've rebuild with the following changes added some GPIO as configurable to allow my attached hardware to operate, removed the stub cyfxgpif2config.h for another one from a WORKING project and added a define called CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT.

If this define is included in the project then the FX3 should be configured as a 32bit gpif bus, if not then it should be 16bit bus. Note the CyU3PDeviceConfigureIOMatrix is configured as isDQ32Bit = CyTrue either way, the define is only used in the cyfxgpif2config.h, the GPIF 2 designer tool shows that there should only be that one line change from 16bit to 32bit.

My attached hardware will always sent 32bit data into the FX3 what i am seeing is that when set to 16bit mode (define commented out) i can see that it is using 16bit mode half of the expected data is missing.

When the define is included im getting no data out of the endpoint at all. Counters in my hardware show that 8192* 32bit words have been sent to the FX3.

Ive attached my project so that you may compare it to the original.

Am i missing something or is there somewhere else that i have forgotten to configure?

thanks

0 Likes
1 Solution

After discovering another users problem linked below:

Slave Sync Fifo: unable to achive hi throughput with SDK v.1.1.1

As my hardware also runs at 32b @ 100Mhz the setSysClk400 should have been set to True.

This allows me to get data out of the GPIF interface using 32bit mode and the data is as expected.

Thank you for your help

View solution in original post

0 Likes
7 Replies
damc_1337896
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

The GPIF configuration im using is the cypress example gpif project:

sync_slave_fifo_2bit with the parameters data bus width set to 32bit, little endian and i2c enabled.

Ive just added the ifdef to allow switching between 16/32 bit data bus.

The SDK im building with is 1.3.3

0 Likes

Is there a newer version of the GPIF designer that we should be using?

The only installer that ive been able to fine is this one: cygpif2designer_B837.msi - version 1.0.837.1

But AN75779 shows that it used a newer version - 1.0.1198.2

Could you tell me if there is an installer somewhere and the change log?

this is to see if my 32bit mode is fixed in the newer version.

thanks

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Sorry for the late reply.

What is the error you are getting when configured GPIF II for 32 bit.

The changes you made seems fine for 32 bit configuration. I need some time for comparing both the firmware. I will get back with it by tomorrow.

Till then can you try with the newer version of GPIF II designer.It is available in the FX3 SDK itself. I am working with the GPIF™II Designer 1.0  (1.0.1198.2) version

Regards,

Rashi

Regards,
Rashi
0 Likes

The error message is a NAK on the bulk endpoint using the USB sniffer.

Ive installed the latest version of the SDK 1.3.4 and ive also ported my changes to the latest version of the gpiftousb example project. Just to make sure that it was the same behaviour as the previous 1.3.3 which it appears to be. (I did have to add referenced to stdint and stddef to get the project to build im assuming that a change in the underlying cypress headers caused this.)

As an extra test i modified the call back GpifToUsbDmaCallback just to print out when either a producer  or a consumer event had occured, actual code change was the following debug statement inside the call back.:

CyU3PDebugPrint (2, "DMA event=%x\r\n", type);

I also changed the dma size down to 1024 and the count down to 1 for the gpif dma channel.

when using 16bit mode and i start to transfer data i get the debug message getting generated, but using the GPIF set to 32bit mode no events are getting generated. I am assuming this is why im getting a NAK due to the FX3 not having a producer event getting generated it cant send it out of the endpoint?

From my hardware point of view we test FlagA to determine if buffers are avaliable in the FX3, if so it will send 1024 bytes out to the FX3 using the full 32bit bus and then it will wait a couple of clock cycles and re-test the FlagA to continue. this will just keep occuring while powered on. FlagA acts as our back pressure into our hardware.

Im using the cypress control center to manually transfer data over.

0 Likes

I've checked with the newer version of the GPIF 2 designer (1.0.1198.2) it shows the same behaviour, 16bit works correctly but 32bit does not.

Which is what i would expect due to the cyfxgpif2config.h file being produced being identical to the older version apart from the version number, data and ifndef name

0 Likes

After discovering another users problem linked below:

Slave Sync Fifo: unable to achive hi throughput with SDK v.1.1.1

As my hardware also runs at 32b @ 100Mhz the setSysClk400 should have been set to True.

This allows me to get data out of the GPIF interface using 32bit mode and the data is as expected.

Thank you for your help

0 Likes

Hello,

Thank You for updating.

Regards,

Rashi

Regards,
Rashi
0 Likes