cancel
Showing results for 
Search instead for 
Did you mean: 

F3 Discovery Analog not configuring DMA correctly

shorai
Associate III

I am trying tio use DMA on 3 different channels under DMA. The cube configurator seems to be incorrect

a) It does not see that an ADC is configured and make it green

b) The code produced does not clear the DMA Half Complete interrupt

c) The IDE configurator blocks some valid configurations

d) The IDE does not switch cleanly from .ioc to .c files, one has to click., click OK twice under Ubuntu

e) UM1570 user manual no longer provides ADC information in the pin tables. ADC is the primary reason one wants to use this (F3) device

f) There are no longer any examples using the magnetometer

g) Intermittent HARD FAULT errors on this, F4 Disco0 and F4 Discovery boards. e.g. The BSP example causes a Hard Fault on the F4Disco0 on every startup BEFORE geting to the star of main.

h) Very few of the examples provide a working example with an .ioc file that can then be built on.

i) F4Disco0 new project does not offer to initialise all peripherals as the F3 Disocvery board does and previous versions of the IDE did.

I downloaded the IDE into a new PC this morning

I want to configure

PB11 as analog in ADC1_11

PC3 as analog in ADC1_9

PC5 as analog in ADC2_11

PB11 remains orange even after being configured. It runs a single conversion, then keeps re-entering the half complete interrupts.

I have written a handlers for

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) 

void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc) 

as well as registered handlers

HAL_DMA_RegisterCallback(&hdma_adc1, htd, &HAL_DMA_H1Callback);

The channels are configured 61.5 cycles, 12 bit, Scan disabled, Continuous conversion enabled, DMA continuous enabled, EndoF COnversion single, Overrun overwrites

When I run the code, I get the half complete callbacks being called and re-called, stoppping the application from continuing. This is consistent with the interrupt not being cleared

I have used a similar configuration for many years without problems. I am writing test code to to give me insight into a new board I am developing

0 REPLIES 0