dma memory left control for CX3

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

cross mob
leda_289486
Level 5
Level 5
10 sign-ins 5 sign-ins 100 replies posted

Hi,

Is there a way to check how many memory is left for dma buffers in CX3 codes ?

I'm experiencing a weird behavior with CyU3PMultiChannelDestroy, returning an error code 16 (memory).

I would rather expect this to happen at creation of dma channel, not at  deletion... However after I reach this error code, there is no way to get dma creation working after.

So second question is : do you have a snippet code for resetting completly the dma memory buffer ?

Thank you for your help,

best regards.

0 Likes
4 Replies
leda_289486
Level 5
Level 5
10 sign-ins 5 sign-ins 100 replies posted

well,

the error code is not 0x10 but 0x1D. Bad display.

So this is an error mutex failure. Weird too but not related to memory

BR.

0 Likes

Hi,

what can cause a mutex error on destroy exactly ? When Destroy is requested, nothing can happen after so why is mutex not "freeable" anyway ?

Best Regards

0 Likes

Globally, I find that CX3 firmware and or hardware include some cases that once reached, device is dead and only solution is to unplug. That is painfull and not very reliable.

I'd like to have a feature where device is "resetted" COMPLETLY BUT not disconnected.

For example : EP0 error, dead no more EP0 communication after (hardware error), can't do nothing. here , impossible Mutex to get, dead, no more dma use even for destroying the current one.

Any solution or workaround ? BR

0 Likes

Please post the snippet in which you called the DMADestroy.

0 Likes