2015-07-14 12:48 AM
2015-07-14 01:47 AM
Probably negative voltage / Offset
try:volatile int16_t Buffer[12];2015-07-14 02:57 AM
no its not working when i change it ...its even getting worse values...
2015-07-14 04:25 AM
Try
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;2015-07-14 04:25 AM
Hello,
I would suggest you to Have a look at the ADC_DMA example in the STM32F4 Standard Peripherals Library.You can download it from thishttp://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/LN1939/PF257901
I hope this helps,Syrine.2015-07-14 09:37 AM
The left shift is definitely going to produce large values. It's important to read and understand the documentation.
With ADC measurements, you often want to test by looking at the values in decimal and hex, for inputs tied to GROUND and then VREF. If you get surprising values, review the documentation again.2015-07-15 12:33 AM
thank you clive.
yes, it does. i have look at the documentation and calculated according to that. i am getting proper values when i calculate for the first time. but i need to reset to calculate again. if i dont do reset then it gives value 0.why its is like that?2015-07-15 06:08 AM
Ok, you have an array with 12 elements, you tell the DMA controller it has 24, and then print 20. You need to pick something and apply it consistently.
If you program the DMA in Normal mode you'll need to reinitialize it each time. Circular mode will keep repeating. I would not use EOC, but rather the DMA HT/TC flags to determine if the array was filled. I've posted working examples, perhaps a careful review of those would help.2015-07-15 06:59 AM
clive, can you tell me how the dma is 24?... according to my knowledge, the buffer size is the dma size... if not correct can u tell me how its 24.
2015-07-22 10:35 AM
clive, can you tell me how the dma is 24?... according to my knowledge, the buffer size is the dma size... if not correct can u tell me how its 24.