cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

Can AUTO SIGNAL DMA be used for data inspection?

In FX3 programming manual, it is said

"Used if the application wants to track statistics about the data being forwarded"

, but there is also comment

"This is a produce event notification to the CPU. This notification is received upon reception of every buffer. The DMA transfer will not wait for the commit from CPU"

It is possible the DMA buffer get overwritten by new data while CyFxBulkLpDmaCallback is still inspection the previous data.

But if the inspected data is very few, this may be possible. The remaining problem is :

What priority of thread is CyFxBulkLpDmaCallback executed? How to ensure it is executed on a thread with high priority? At least higher priority then other application tasks which may consume 100% CPU time.

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi,

1. Yes, the buffer contents may change before even the callback exits. In AUTO_SIGNAL mode, sniffing/ modifying data is not expected.

2. dma callback runs on a thread with priority 2 which is already higher than others which consume more CPU time.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
Reply
2 Replies
New Contributor II

Experiment shows if you read/write the data in DmaCallback with AUTO SIG mode, the device will be dead.

0 Likes
Reply
Moderator
Moderator

Hi,

1. Yes, the buffer contents may change before even the callback exits. In AUTO_SIGNAL mode, sniffing/ modifying data is not expected.

2. dma callback runs on a thread with priority 2 which is already higher than others which consume more CPU time.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
Reply