Hi, what is the main purpose of this changes between these 2?
Left side is RT1064 code, it is quite old I can't recall which version is that.
Right side is iMX8ulp latest version.
When I use the right side code, I always went into if condition and return channel busy. Clearing the TCD_CITER_ELINKNO seems can solve the busy issue.
I did try to replace
with
Solved! Go to Solution.
"Comparing the driver versions, I do think that the change to EDMA_SubmitTransfer() checking for CITER != BITER makes sense, but I see how that cause an issue when there is an aborted transfer. I think the correct fix is to change the EMDA_AbortTransfer function so that it clears BITER and CITER along with the CSR. This will prevent an aborted transfer from looking like a major loop in progress to the submit transfer function."
"Comparing the driver versions, I do think that the change to EDMA_SubmitTransfer() checking for CITER != BITER makes sense, but I see how that cause an issue when there is an aborted transfer. I think the correct fix is to change the EMDA_AbortTransfer function so that it clears BITER and CITER along with the CSR. This will prevent an aborted transfer from looking like a major loop in progress to the submit transfer function."
Hi,
I apply this changes to my code, seems to works. thanks!
Hi,
Thanks for the feedback. I will try this change at my side and get back to you
Hello @abdrhmn
It appears is a bug. What processor are you using? RT1064 or iMX8ulp?
Best regards.
Salas.
Hi @Alejandro_Salas ,
I'm using iMX8ulp
I have tested SDK example(SDK_2_14_1_EVK-MIMX8ULP\boards\evkmimx8ulp\driver_examples\edma\memory_to_memory), and it is working fine without any issue.
H/W: iMX8ULP EVK
May I know which example are you testing?
Hi,
The SDK example is working for me too.
The error I faced is not from the example.. it is a customly developed for my organization.
I can't share the full code here but, the scenario is like this.
It's a console like application which using lpuart with edma.
1) It will print a welcome screen (using Lpuart_SendEdma)
2) It will need input from user. (Lpuart_receiveEdma) For example "?" to display help message
3) Use IdleLineInterrupt to process the data.
- if the interrupt flag is set, will clear the interrupt flag
- check status by calling LPUART_TransferGetReceiveCountEDMA()
- if success, will call LPUART_TransferAbortReceiveEDMA().
it run in a while loop, somehow maybe the next receiving, when it run LPUART_ReceiveEDMA() again
it will always return fail
From what I observed, it is because EDMA_GetRemainingMajorLoopCount() return non-zero that make the channel busy.