For the kinetis K10 DMA peripheral, will a DMA minor loop be started if an HRS bit is set but the relevant ERQ bit is not?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

For the kinetis K10 DMA peripheral, will a DMA minor loop be started if an HRS bit is set but the relevant ERQ bit is not?

Jump to solution
636 Views
nurichard
Contributor III

Hello,

I am trying to understand one of the intricacies of the DMA peripheral in the MK10DN512V10 4N22D

I have managed to confirm that if a DMA channel is disabled (ERQ bit cleared) then another peripheral cannot request a DMA transfer (i.e. the HRS bit never appears set when debugging and no DMA memory transfer occurs).

It is also easy to confirm that if the START bit is set by software that the DMA transfer does happen even if the DMA channel is 'disabled' (ERQ  bit cleared).

The situation I am trying to understand (but have not been able to cause on demand to check) is:

The DMA0 channel is enabled (ERQ0 bit set)

A peripheral requests a DMA channel 0 operation from that channel (HRS0 bit is set) but higher priority channels also waiting on arbitration

The DMA0 channel is disabled by SW (ERQ0 bit cleared) while the DMA0 channel is still pending arbitration (HRS0 bit was set)

The SW immediately attempts to modify the in memory TCD

What happens next:

a) has the HRS0 bit been cleared automatically by the hardware when the ERQ0 bit was cleared?

b) does the DMA0 minor loop execute as soon as arbitration allows it (i.e. ignoring the HRS0 bit), potentially using a corrupt TCD?

c) does the HRS0 bit stay set but no DMA transfer occur until the ERQ0 bit is set once again?

The datasheet does not appear to explicitly say which of a), b) or c) will happen.

I am guessing b) due to the start bit behaviour and some odd wording in the datasheet but I can't confidently test if this is correct.

Does anyone know for certain?

Labels (1)
0 Kudos
1 Solution
418 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

I think the result shoudl be a)The HRS0 bit be cleared automatically by the hardware when the ERQ0 bit was cleared. As RM states "These bits reflect the state of the request as seen by the arbitration logic. Therefore, this status is affected by the ERQ bits.".

Hope that helps,

B.R

Kan

View solution in original post

0 Kudos
2 Replies
419 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

I think the result shoudl be a)The HRS0 bit be cleared automatically by the hardware when the ERQ0 bit was cleared. As RM states "These bits reflect the state of the request as seen by the arbitration logic. Therefore, this status is affected by the ERQ bits.".

Hope that helps,

B.R

Kan

0 Kudos
418 Views
nurichard
Contributor III

Kan,

This logic sounds good so I've marked it as correct.  Thanks for your help.

Richard

0 Kudos