cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Philip
New Contributor II

Hello,

I'm trying to develop a custom module.

The module has embedded data but I cannot receive the data that I expected.

In order to check EMB data, I modified a BulkLoop example to print some logs as below.

Philip_0-1618463861878.png

I expected "Phase Idx" 0, 1, 2, and 3 should be repeated but they didn't.

At first, I thought I'm able to use "CyU3PDebugPrint()" function.

However when I added that function to DMA callback function which names CyCx3UvcAppDmaCallback(), the firmware didn't work.

 

I want to check the DMA buffer to make sure that the firmware is no problem.

In this case, how can I access the DMA buffer to check values?

or Is there any way to check the EMB data?

Thank you.

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator

Hello,

It is not recommended to use blocking calls like debug prints inside DMA callback functions.

I have modified the SDK example project cyfxbulklpmanual for meeting your requirement. The modifications done are mentioned below:

1. Used the API CyU3PDmaBufferAlloc() for allocating the required amount of buffer memory.

2. Copied the DMA buffer contents inside the DMA callback to the buffer allocated in step 1.

3. Printed the contents of the buffer allocated in step 1 in the infinite for loop.

The modified project is attached along with this response. I have tested this modified project at my end and it works as expected. Please try this at your end and let me know if it helps.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
1 Reply
JayakrishnaT_76
Moderator
Moderator

Hello,

It is not recommended to use blocking calls like debug prints inside DMA callback functions.

I have modified the SDK example project cyfxbulklpmanual for meeting your requirement. The modifications done are mentioned below:

1. Used the API CyU3PDmaBufferAlloc() for allocating the required amount of buffer memory.

2. Copied the DMA buffer contents inside the DMA callback to the buffer allocated in step 1.

3. Printed the contents of the buffer allocated in step 1 in the infinite for loop.

The modified project is attached along with this response. I have tested this modified project at my end and it works as expected. Please try this at your end and let me know if it helps.

Best Regards,
Jayakrishna

View solution in original post

0 Likes