S32K312 - ADC-BCTU with DMA major loop destination address writing problem.

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

S32K312 - ADC-BCTU with DMA major loop destination address writing problem.

Jump to solution
974 Views
BrK_
Contributor III

BrK__0-1704702875710.png

Since my posts were detected as spam, I explained the problem with a screenshot.

0 Kudos
Reply
1 Solution
935 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you really want to modify driver code, which is not recommended indeed, below changes should be enough to fill buffer 10times

LocTransferList[7].Value = (uint32)(10U);  // 10 minor loops
LocTransferList[8].Value = ((uint32)(~(10*(uint32)(LocTransferList[6].Value)) + 1U)); // final dest address adjustment -(10*24)

BR, Petr

View solution in original post

0 Kudos
Reply
3 Replies
955 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so BCTU triggers 6 conversions, DMA is used to read it from data register/FIFO, and you want to repeat that 10times to fill 60 values buffer? Am I right.
It could be great you share a config you have and code used, to check that. 
I assume, if BCTU driver is configuring DMA transfer somehow then you should not modify it. For example in RTD 3.0.0, such repetitive transfer is not configurable, I think, unless driver is modified.

BR, Petr

0 Kudos
Reply
950 Views
BrK_
Contributor III

Hi @PetrS,

Yes, you're right. BCTU configurations:

bctu-1.png

bctu-2.png

And bctu's DMA configurations: (BCTU uses the Bctu_FifoSetupDma function)

bctu-fifodma-1.png

bctu-fifodma-2.png

As I said, just changed major loop count to 10. Also, I update the destination address and hw request enable configuration at every major loop interrupt.

0 Kudos
Reply
936 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you really want to modify driver code, which is not recommended indeed, below changes should be enough to fill buffer 10times

LocTransferList[7].Value = (uint32)(10U);  // 10 minor loops
LocTransferList[8].Value = ((uint32)(~(10*(uint32)(LocTransferList[6].Value)) + 1U)); // final dest address adjustment -(10*24)

BR, Petr

0 Kudos
Reply