[DONE][STM32F30x] ADC configuration

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO][STM32F30x] ADC configuration

Post by Giovanni »

Tec,

Does you application need continuous or discontinuous mode (see RM)?

The driver apparently enforces the continuous mode and this means that once the trigger is received the conversions continues without interruptions. Enabling both continuous and discontinuous bits is forbidden (this is the driver limitation).

I think that the driver requires a change in adc_lld_start_conversion() in order to allow discontinuous mode. You may make a quick test there.

Giovanni
tecnologic
Posts: 124
Joined: Tue Jan 10, 2012 8:42 am
Has thanked: 21 times
Been thanked: 5 times

Re: [TODO][STM32F30x] ADC configuration

Post by tecnologic »

for me disabling the interrupts of DMA works, cause i trigger the Adc to sample one sequence of my channels in sync with the pwm. I only hold 2 sets of measurements in the samples buffer. With the Half and full ints of dma i would know the exact new samples. but my control algorithim is rebust enough to handle this.

if there is any idea to clean this, i can try this.

Regards

Tec
tecnologic
Posts: 124
Joined: Tue Jan 10, 2012 8:42 am
Has thanked: 21 times
Been thanked: 5 times

Re: [TODO][STM32F30x] ADC configuration

Post by tecnologic »

i re checked the rm and disabled contious mode of the adc, i only disabled the CONT bit and it works. Stupid, i thought i checked that.

Thanks

Giovanni

PS: maybe let the CONT bit free, to set by the user in config?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO][STM32F30x] ADC configuration

Post by Giovanni »

Yes, exactly what I thought.

Giovanni
Post Reply