cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F429 ADC DMA

Manas_Gupta
Associate

Hi,

I am currently using NUCLEO-F429 for prototyping a medical product.

I am facing an issue while configuring ADC DMA as shown in attached image.

the address of DMABuff going in DMA register is different to the actual adress, hence i am not able to get proper data read out.

The values in DMAbuff are not updates as expected.

But if I hardcode the address the values are updated in DMAbuff

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

@Manas_Gupta Your buffer is declared as a static variable in .h file. Every .c file that includes the .h file gets its private copy of this buffer. Diagnosis: deficient C knowledge. Prescription: urgent intensive C course, 40 hours at least. Regular code reviews.

 

View solution in original post

4 REPLIES 4
TDK
Guru

Weird.

Can you show the definition of adc1ResultDMABuff?

What if you try "(uint32_t) adc1ResultDMABuff" instead?

If you feel a post has answered your question, please click "Accept as Solution".
Manas_Gupta
Associate

Hi,

DMAbuff is defined in header file  as:

#ifndef __ULADC_H__
#define __ULADC_H__

#ifdef __cplusplus
extern "C" {
#endif

#include "ULConfig.h"
#include "adc.h"


/*		ADC1		*/
static volatile uint16_t adc1ResultDMABuff[ADC1_TOTAL_COUNT_IN];

void ULAdc1Init();
void ULAdc1StartConv();


/*		ADC3		*/
static volatile uint16_t adc3ResultDMABuff[ADC3_TOTAL_COUNT_IN];

void ULAdc3Init();
void ULAdc3StartConv();


#ifdef __cplusplus
}
#endif

#endif /* __ULADC_H__ */

Also I have already tried "(uint32_t) adc1ResultDMABuff"  with same result.

TDK
Guru

Got me.

The compiler is usually not a problem but it's hard to see how it could be something else here. Might be worth pinging Keil for support.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

@Manas_Gupta Your buffer is declared as a static variable in .h file. Every .c file that includes the .h file gets its private copy of this buffer. Diagnosis: deficient C knowledge. Prescription: urgent intensive C course, 40 hours at least. Regular code reviews.