Hello All,
My algorithm needs to use DAT_copy and DAT_wait in DM648.
As I notice that the edma3_lld_01_10_00_01 has some example for the DAT modules. When I run the demo, it runs fine.
But when I used it into my project, it always halts in DAT_wait. So I try to fix it.
I fount it has related to the _dat_critical_section_exit and _dat_critical_section_enter in the dat_edma3lld_biosAdapter.c.
My algorithm thread, which uses DAT_copy and DAT_wiat, is lower than the watchdog thread. It always runs in the wd thread, my wd thread
will call TSK_sleep(),but It doesn't return to the algorithm thread again.
So I remove the thread protection like this.
void _dat_critical_section_enter() {
// _tsk_state = TSK_disable();
}
void _dat_critical_section_exit() {
// TSK_enable(_tsk_state);
}
It works fine.But when I use serverl DAT_copy and then several DAT_wait,like this.
1=DAT_copy()
2=DAT_copy()
3=DAT_copy()
4=DAT_copy()
DAT_wait(1)
DAT_wait(2)、、、、
It will run down in the DAT_wait for several minutes. And the TransferCompleteL is always "1" in some bits.
So I think it maybe some cache reason. So I set the TransferCompleteL in NON_cachable zone. But It also will down.
I also call the BCACHE_wbInv to clean the TransferCompleteL. But it's no use.
I'm puzzled about the question.Pls give me some advice.
Thank you.!!!