Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] Dont know meaning of instructions in C for MSP430F2619

Status
Not open for further replies.

jignesh doshi

Full Member level 2
Joined
Aug 11, 2011
Messages
131
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,112
I am using MSP430F2619 Microcontroller and doing programming in C..

I have seen below two instructions for DMA operation but i dont know meaning of those...

Please explain below two instructions...

DMA0SA = (void(*)())sample; // Source block address
DMA0DA = (void(*)())&DAC12_0DAT;
 

The syntax looks confused at first sight. We won't expect data addresses casted to function pointers.

I can hardly believe that this is the straightforward way to initialize MSP430 DMA registers. Instead of trying to reproduce possibly erroneous code, why don't you write the intended operation bottom-up, using the MSP430 datasheet and basic C operations?

Where did you pick up the code?
 

Actually i have tried to define register in simple way so many times and in so many ways, but i failed to initialize to define.

i got this code from TI's example code for DMA operation from TI website.

I have define one array and i have to pass first element's address of that array as a source address of DMA, so how i have to write code or simplify above code in simple basic C operation.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top