cancel
Showing results for 
Search instead for 
Did you mean: 

example: 3ADCs_DMA

csiusa
Associate II
Posted on October 07, 2008 at 19:17

example: 3ADCs_DMA

1 REPLY 1
csiusa
Associate II
Posted on May 17, 2011 at 12:47

Anyone have trouble with this example? I'm compiling with GNU & debugging using Chameleon. It compiles/links/loads fine. It dies in the NVIC_Init() function. Not sure if I'm following the assembly right but it appears to be placing the interrupt vector at zero, because within this function the processor gets vectored to location zero where I find the following:

0x00000000 ; PADDING

353: ADC2ConvertedValue = ADC_GetConversionValue(ADC2);

0x00000002 2000 DCW 0x2000 ; DATA SECTION

0x00000004 080001E5 DCD 0x080001E5 ; DATA SECTION

0x00000008 080005E9 DCD 0x080005E9 ; DATA SECTION

0x0000000C 080005ED DCD 0x080005ED ; DATA SECTION

0x00000010 080005F1 DCD 0x080005F1 ; DATA SECTION

0x00000014 080005F5 DCD 0x080005F5 ; DATA SECTION

354: }

0x00000018 080005F9 DCD 0x080005F9 ; DATA SECTION

Question: now why would the linker (or symbolic debugger) be telling me that source line 353 is in the data section at location 0x00000000?

Also, it gets there from executing the following branch (B)

instruction:

0x08000B2A F04F 0301 MOV R3,#0x1

0x08000B2E FA03 F304 LSL R3,R3,R4

0x08000B32 F845 3022 STR R3,[R5,R2,LSL #0x2]

0x08000B36 E011 B 0x8000b5c

0x08000B38 7803 LDRB R3,[R0,#0]

0x08000B3A EA4F 1253 LSR R2,R3,#0x5

0x08000B3E F003 031F AND R3,R3,#0x1f

Again, I don't see how this is sending it to loc. 0x0000000 either.

Thanks,

CC