CX3 GPIFII modify

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

cross mob
haxu_299926
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

Hello,

       I want to get the point of the frame start , at the moment , I want to send one package by CPU,and then use the dma send data,how can I get it? Wherher the GPIFII state machine can be modified?

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Your requirement can be achieved using override mode. Please refer to the below community thread:

cx3 use overridemode

Refer to Cypress response on Nov 22. Have a look at Project Cx3UvcOV5640.rar

CyU3PDmaMultiChannelSetupSendBuffer() API is used to commit the buffer which is independent of the allocated DMA buffers for the channel. In that example, an independent buffer is sent at the end of every frame.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
11 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

You can use CyCx3UvcAppAddHeader() in the cx3 firmware to add a special byte to first buffer of a new frame.

Regards,

Hemanth

Hemanth
0 Likes

Hello,

      I want to one independent buffer to send the header,the CyCx3UvcAppAddHeader() function add the leader with the image data buffer, not use an independent buffer.I want when the !FV->FV,I can commit the header,and when the FV->!FV,I can commit the leader,such as the example of U3V_on_Fx3.Re: FX3 application note for USB3 Vision

pastedImage_0.png

Re: The GPIF II module customization for cx3 ,this  community says that you can modfiy the gpif state machine,is it really?and what should I provide for you ?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Your requirement can be achieved using override mode. Please refer to the below community thread:

cx3 use overridemode

Refer to Cypress response on Nov 22. Have a look at Project Cx3UvcOV5640.rar

CyU3PDmaMultiChannelSetupSendBuffer() API is used to commit the buffer which is independent of the allocated DMA buffers for the channel. In that example, an independent buffer is sent at the end of every frame.

Regards,

Hemanth

Hemanth
0 Likes

Hello,

     At the end of the frame,stop the sensor and send a trailer is no problem,but I still want to send at the begin of the frame,and the start and stop the sensor and the state machine will affect the acquisition frame rate of sensor .

    I still want to modfiy the gpif state machine,Can you realize it?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

At the end of the frame, after you send trailer, can you also send the header without waiting for frame start? And regarding the project shared, you need not stop and start the sensor, you can instead stop the state machine and restart.

Regards,

Hemanth

Hemanth
0 Likes

Hi,

      I used the dma override mode for send the leader and trailer ,and this the ov5640 sensor can only run 35fps,the reset dma channel will need 20ms, We can't receive the time 20ms. so we still want to modify the gpif statemachine.The CX3 gpif statemachine is unsuited for u3vision.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Please try the following and me know the results.

When you call CyU3PDmaMultiChannelSetXfer(), currently you are passing 0 as the second argument. Can you pass exact frame size in bytes as the argument instead? - By doing so, after finishing one frame, before calling CyU3PDmaMultiChannelSetupSendBuffer() DMA channel reset is not required.

Can you please test it and let me know the result?

Regards,

Hemanth

Hemanth
0 Likes

Hi,

      What shoud I pass to the the second argument of CyU3PDmaMultiChannelSetXfer()?The image size?Then When dma channel have be sent the set value,it can calling CyU3PDmaMultiChannelSetupSendBuffer() without DMA channel reset ? CyU3PDmaMultiChannelSetupSendBuffer should be called in the configured state.

       I test it ,and CyU3PDmaMultiChannelSetupSendBuffer() will return the error code 0x47 .

Regards,

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

yes, pass the image size as the second argument. After the image is transferred, dma channel will go to configured state. If the second parameter is 0, then dma channel will be in active state always, and you cannot call CyU3PDmaMultiChannelSetupSendBuffer().

The sequence I am talking about is:

1. Call CyU3PDmaMultiChannelSetXfer() with image size as second parameter

2. Wait till the entire frame is transferred.

3. Now, the channel is expected to be in configured state. - You can use CyU3PDmaMultiChannelGetStatus() to check the same.

4. Now call CyU3PDmaMultiChannelSetupSendBuffer().

Regards,

Hemanth

Hemanth
0 Likes

Hi,

        The test results: after sending a frame of data, it stops. The tail packet is not sent out. Querying DMA channel status has not been configured.I still want to modify the gpif statemachine,please Tell me directly whether I can modify GPIF state machine

0 Likes
haxu_299926
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

Hello,

     At the end of the frame,stop the sensor and send a trailer is no problem,but I still want to send at the begin of the frame,and the start and stop the sensor and the state machine will affect the acquisition frame rate of sensor .

    I still want to modfiy the gpif state machine,Can you realize it?

0 Likes