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

USB superspeed peripherals Forum Discussions

jach_1279971
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Based on AN87216 (auto slave and auto master with 32 bit data bus), using Control Center to send 256 or 512 bytes from FX3's master to FX3's slave, all data can be received by slave.

When 32 bit data bus is reduced to 16 bit by modiying "#define CY_FX_GPIF_16_32BIT_CONF_SELECT (0)", relevant modification has been done in GPIF design, it seems there is problem. When master sends 512 bytes data to slave by Control Center, slave still can received 512 bytes.

However, when master sends 256 bytes data to slave, slave receive nothing. If master sends 4 more bytes, slave can received 260 bytes. That means all data can be received.

Please advise.

pastedImage_1.png

0 Likes
1 Solution

Hi,

-- BTW, master sends 8192 bytes to slave, the waiting interval between each segment of 512 bytes is much more long than the transferring time of 512 bytes, how to reduce the waiting interval?

You are talking about the delay incurred due to DMA buffer switching. After sending one buffer (512 bytes) master has to wait for the ready flags from the slave side and that takes time. Could you please probe the flags and check the delay.

Thanks & Regards

Abhinav

View solution in original post

0 Likes
4 Replies
jach_1279971
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Configure 16 bit data bus, when master sends 252 bytes to slave, PKTEND can be received by slave

pastedImage_0.png

When master sends 256 bytes to slave, error is happened in slave side.No PKTEND can be received.

pastedImage_1.png

When 4 more bytes are sent by master, 260 bytes can be received by slave.

pastedImage_2.png

I'm in urgent to fix it, please promptly advise, thanks.

0 Likes

Hi,

Could you please check the DMA buffer size? Change the DMA buffer size and then check the behavior.

Thanks & RegardsAbhinav

0 Likes

I have fixed the bug by adding the following codes into master side.

#if (CY_FX_GPIF_16_32BIT_CONF_SELECT == 1)

            CyU3PGpifInitDataCounter(0,127,0,1,1);

            CyU3PGpifInitAddrCounter(0,127,0,1,1);

#else

            CyU3PGpifInitDataCounter(0,255,0,1,1);

            CyU3PGpifInitAddrCounter(0,255,0,1,1);

#endif

BTW, master sends 8192 bytes to slave, the waiting interval between each segment of 512 bytes is much more long than the transferring time of 512 bytes, how to reduce the waiting interval? Thanks.

pastedImage_0.png

0 Likes

Hi,

-- BTW, master sends 8192 bytes to slave, the waiting interval between each segment of 512 bytes is much more long than the transferring time of 512 bytes, how to reduce the waiting interval?

You are talking about the delay incurred due to DMA buffer switching. After sending one buffer (512 bytes) master has to wait for the ready flags from the slave side and that takes time. Could you please probe the flags and check the delay.

Thanks & Regards

Abhinav

0 Likes