AnsweredAssumed Answered

Cortex M0 Memory Allocation to Store ADC Results in Assembly

Question asked by Johnson.Mark.001 on Dec 15, 2015
Latest reply on Dec 17, 2015 by Johnson.Mark.001

I am reaching out to see if someone can provide an assembly language example or preferred method on how to allocate or reserve 12 - 1/2 words in memory (RAM). My application requires the use of the internal ADC (12-Bit conversion) to convert and store 6-1/2 words of data every 2uSec, delay for 100uSec, the convert and store another 6-1/2 words of data without the use of the DMA. Then perform various processing functions on the 12 stored 1/2 word data (16 bits).

Right now I have the following Area statements I'm using for other parts of the algorithm.

  AREA vars, READWRITE   

 

FREQ DCB 0xE   

FRQPT DCB 0xE

FLAGS DCB 0x2   

      AREA asm, CODE, READONLY

        

FMIN EQU 0x4

FMAX EQU 0x1A

FTST EQU 0xE ;0x4(7.6MHz), 0xE(8.1MHz), 0x1A(8.7MHz)           

   

    EXPORT asmfunc

    

asmfunc

               Assembly code starts here...

Outcomes