hallo,
I use Kinetis K64, and I need to send command to ADC by DMA.
I found some app note and quick guide that explain how to do:
If the command buffer is in RAM, it seems that DMA can access it and correctly transfer those commands in ADCx_SC1A.
Instead, if that buffer is in flash (ie. const declaration) it doesn't works:
I cannot figure out why.
any suggestion?
best regards
Max
Hi Max,
I've modified the edma demo which be included in the KSDK 1.2 for transfer the data from the Flash to SRAM by through the DMA mechanism.
And this demo can run on the FRDM-K64F board well. So I was wondering if you can share your demo, then I can reproduce this issue on the FRDM-K64 board.
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I also have FRDM-K64F board.
code is here
I use kds 3.0.0 with ksdk 1.3.0
if you go in main.c line 52
you can try to change
static const uint8_t svett[ADC_CH_TOT] = { 20, 1 };
with
static uint8_t svett[ADC_CH_TOT] = { 20, 1 };
best regards
max
Hi Max,
When you debug the demo, I'd like to suggest that you can open the memory window to check what address the svett[ADC_CH_TOT] locates.
Hope it helps.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Massimiliano
There may be another application note of interest here: http://www.utasker.com/docs/uTasker/uTaskerADC.pdf
Your DMA bus master should have authority to access Flash by default but check that you haven't taken it away by modifying FMC_PFAPR.
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
K64: http://www.utasker.com/kinetis/FRDM-K64F.html / http://www.utasker.com/kinetis/TWR-K64F120M.html / http://www.utasker.com/kinetis/TWR-K65F180M.html
For the complete "out-of-the-box" Kinetis experience and faster time to market
:smileyinfo: Out-of-the-box support for 46 Kinetis boards and 10 IDEs (460 combinations from a single code source with no porting required)
I tried modifing FMC_PFAPR in this way:
FMC->PFAPR |= 0xFFFF;
without any cange in the behaviour
best regards
max