Using DMA to emulate ADC - AN4590 Codewarrior example for k60

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

Using DMA to emulate ADC - AN4590 Codewarrior example for k60

Jump to solution
2,297 Views
abdullahansari
Contributor III


Hello every one. I am trying to use the DMA to store the ADC results into a buffer and then to a file. I found AN4590 application note useful but its in IAR IDE. How ever I am working on Coderwarrior 10.5. Does any one know how to migrate from it? or suggest any likely example which could illustrate the configuration and use of DMA.

Regards

Abdullah

Labels (1)
1 Solution
1,519 Views
mjbcswitzerland
Specialist V

Abdullah

Binary (or SREC) files can be loaded using the Flash utility in CodeWarrior 10.x (look for the symbol with the flash of lightning in the menu bar). It is not necessary to import such files to the project.

Regards

Mark

View solution in original post

8 Replies
1,519 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Abdullah,

I've inculded the sample code base on CW10.4 about FTM+DMA in the reply. I think it should be useful for reference and please refer to it for details.

Have a nice day!

Best regards,

Ping

0 Kudos
1,519 Views
abdullahansari
Contributor III

Hi Ping,

As soon as i am running the code on my CW 10.5, the compiler is giving me cpu interrupt. However if i create the project once again with Process Expert in CW.10.5, its working but DMA isnot being enable that is DMA_flag is always zero.

I am just creating a new project in PE, and then copy your components to my one and Generating the code.

Any remedy?

Regards

Abdullah

0 Kudos
1,519 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Abdullah,

In your email you mentioned that the DMA_flag is always keep zero. I'd like to confirm that whether you had connected the TTA8 with PTC1 or PTC2 when you tested the democ code.

I'd like to suggest that you use the export and inport feature of PE which could make you create a new project easily and quickly and I''ve included the proceesor expert usr guide in the reply, so please refer to it.

That's all and I'm looking forward to your reply.

Have a nice day!

Best regards,

Ping

0 Kudos
1,518 Views
abdullahansari
Contributor III

Hi ping,

Thanks for the attachement. Could you tell me what TTA8 is?

Regards

Abdullah

0 Kudos
1,518 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Abdullah,

Thanks for your reply! The TTA8 should be PTA8. It's typing error and I'm sorry for bringing any inconvenient to you.

Have a nice weekwend!

Best regards,

Ping

0 Kudos
1,519 Views
mjbcswitzerland
Specialist V

Hi

See Application note on DMA driven ADC and DAC, using PDB as timebase

This implementation is compatible/works with IAR, Keil, GCC, Rowley Crossworks and CW10.x.

Regards

Mark

0 Kudos
1,519 Views
abdullahansari
Contributor III

Hi Mark!

Thanks for the info.

The software link you have given contains a .bin file. When importing it to codewarrior it expects .elf format or so. or if you can let me know the procedure for importing if i am wrong.

Waiting for your reply

0 Kudos
1,520 Views
mjbcswitzerland
Specialist V

Abdullah

Binary (or SREC) files can be loaded using the Flash utility in CodeWarrior 10.x (look for the symbol with the flash of lightning in the menu bar). It is not necessary to import such files to the project.

Regards

Mark