CyU3PSpiTransmitWords SDK 1.34 version

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

cross mob
Anonymous
Not applicable

After transferring the project from SDK 1.33 version to SDK 1.34 version, the Cyclone IV FPGA download stopped working in PS(Passive Serial ) mode

via the function CyU3PReturnStatus_t CyU3PSpiTransmitWords (uint8_t * data, uint32_t byteCount)

When you roll back to the SDK 1.33 library through build variables FX3SDKVERSION, the download resumed.

With a detailed comparison of the source code, Cyu3spi.c detected a common bug (1.33 1.34) for the static "timeout" variable.

It is initialized once before entering the loop, and it is used several times in the loop.

In version 1.33, there is a check for the flag CY_U3P_LPP_SPI_TX_SPACE, in version 1.34 is not available(not check).

Konstantin.

0 Likes
1 Solution

Hi,

-- the flag CY_U3 P_LPP_SPI_TX_DONE check in version 1.3.3 occurs in the loop every time, and in version 1.3.4 only once after the exit from the loop

This change is done only to speed up the SPI transfer.

You can increase the timeout value by calling CyU3PSpiSetTimeout() function. We are only using 0xFFFFF, and the value can be increased up to 0xFFFFFFFF.

Please try and update.

Thanks & Regards

Abhinav

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

P.S

CY_U3P_LPP_SPI_TX_SPACE read as CY_U3P_LPP_SPI_TX_DONE

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Konstantin,

I compared the source code of CyU3PSpiTransmitWords (uint8_t * data, uint32_t byteCount) in both versions of FX3 SDK 1.3.3 & 1.3.4. I didn't find much difference between the two. 

Regarding your query about the "timeout" variable, it is initialized only once in both the implementations, so I don't think it is creating any issue.

There is a check for the flag CY_U3P_LPP_SPI_TX_DONE in both the versions(Please see the attached image)

Thanks & Regards

Abhinav Garg

0 Likes
Anonymous
Not applicable

Hi !

I do not agree with you.

First, the variable "timeout"  check will not be affected if the data length is short, about 256 bytes.

With a long data size ( > 1024), an error occurs.

Secondly, the flag CY_U3 P_LPP_SPI_TX_DONE check in version 1.3.3 occurs in the loop every time, and in version 1.3.4 only once after the exit from the loop.

0 Likes

Hi,

-- the flag CY_U3 P_LPP_SPI_TX_DONE check in version 1.3.3 occurs in the loop every time, and in version 1.3.4 only once after the exit from the loop

This change is done only to speed up the SPI transfer.

You can increase the timeout value by calling CyU3PSpiSetTimeout() function. We are only using 0xFFFFF, and the value can be increased up to 0xFFFFFFFF.

Please try and update.

Thanks & Regards

Abhinav

0 Likes