STM32F37x ADC vs SDADC clocks Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

STM32F37x ADC vs SDADC clocks

Post by dflogeras »

Hi,

I'm using ChibiOS-16.x.y on a stm32f372. I'm currently using the SDADC to perform conversions, but this requires me to set HAL_USE_ADC.

The side effect I'm noticing is that I cannot scale the APB2 clock tree down as far as I'd like because it is requiring me to stay within the acceptable range for the ADC peripheral. Could this be addressed in a future version? Is there a technical reason I shouldn't be able to do this?

Thanks,
Dave
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F37x ADC vs SDADC clocks

Post by Giovanni »

Hi,

Moving this in "bug reports", this limitation is not intentional, probably the check should be modified.

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

Re: STM32F37x ADC vs SDADC clocks

Post by Giovanni »

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

Re: STM32F37x ADC vs SDADC clocks

Post by Giovanni »

Hi,

I committed a change in trunk about this. Will backport if requested.

Giovanni
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Re: STM32F37x ADC vs SDADC clocks

Post by dflogeras »

Hey Giovanni, thanks for this patch

It looks like you may have a copy/paste error in 12060, you repeated SDADC1 three times, I bet you meant SDADC1 | SDADC2 | SDADC3.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F37x ADC vs SDADC clocks

Post by Giovanni »

Where exactly? I cannot find that.

Giovanni
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Re: STM32F37x ADC vs SDADC clocks

Post by dflogeras »

Sorry about that, lines 856 and 862 of os/hal/ports/STM32/STM32F37x/hal_lld.h

https://sourceforge.net/p/chibios/svn2/12060/
dflogeras
Posts: 232
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 8 times
Been thanked: 22 times

Re: STM32F37x ADC vs SDADC clocks

Post by dflogeras »

patch.zip
proposed fix
(600 Bytes) Downloaded 593 times
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F37x ADC vs SDADC clocks

Post by Giovanni »

Hi,

Fixed as bug #974. There was also another small problem.

Giovanni
Post Reply