Skip to main content
markjohnson9
Associate III
December 15, 2015
Question

Cortex M0 Memory Allocation to Store ADC Results in Assembly

  • December 15, 2015
  • 2 replies
  • 732 views
Posted on December 15, 2015 at 18:10

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...

#cortex-m0-memory-allocation
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    December 15, 2015
    Posted on December 15, 2015 at 18:20

    ADCBUFX FILL 12, 0, 2

    ADCBUFY SPACE 24

    ADCBUFZ DCW 0,0,0,0,0,0,0,0,0,0,0,0

    http://www.keil.com/support/man/docs/armasm/armasm_dom1361290007914.htm

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    markjohnson9
    Associate III
    December 17, 2015
    Posted on December 17, 2015 at 13:59

    Thanks for your technological savvyness!