2019-08-20 12:20 AM
Hello,
we use STM32H7 in our new development. I was excited about the announcement of the new revision V because it promises an increase of speed from 400MHz to 480 MHz. My distributor told me that except for that, the devices were hard- and software compatible.
Now I set a rev V STM32H742 into our prototype and after hours found out that there are a number of differences in ADC alone.
Now some questions in detail:
I think we really need solutions for that because we can't stick to rev Y, it will not be produced anymore I guess (??)
So any help especially from ST members is greatly welcome
Thanks a lot
Martin
Solved! Go to Solution.
2020-08-19 01:12 AM
Hi,
I'm having the same problem. Needed a high sample rate/precision ADC. To my surprise I only got half of the expected sample rate. I could not figure out what was wrong until I saw that strange /2 clock divider in the reference manual.
For my project I minimally need an ADC doing 4 Msps/12 bit. For this I need to set fADC at 64 MHz (2*32) which CubeMX doesn't like (it automatically selects an ADC prescale factor of 2). I can override this in my code but I hesitate. I do not know what the maximum safe (not /2 divided) clock frequency of the ADC is. Can anyone shed some light on this?
Kind regards,
Rob.
2020-08-19 02:21 AM
We use STM32H7 ADC with Y and V in somehow "compatible mode". As far as I remember, the main thing is that we HAVE to use the BOOST mode, then it worked with both versions nicely with identical settings (but no high-speed requirements in our application, and without "stupid CubeMX / HAL", just pure register programming).
2020-08-19 06:46 AM
Investigated the strange /2 ADC clock divider a bit further and inside the ADC_ConfigureBoostMode function I came across the following code:
else /* STM32H7 silicon Rev.V */
{
freq /= 2U; /* divider by 2 for Rev.V */
if (freq <= 6250000UL)
{
MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, 0UL);
}
else if (freq <= 12500000UL)
{
MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_0);
}
else if (freq <= 25000000UL)
{
MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_1);
}
else /* if(freq > 25000000UL) */
{
MODIFY_REG(hadc->Instance->CR, ADC_CR_BOOST, ADC_CR_BOOST_1 | ADC_CR_BOOST_0);
}
The /2 prescaled frequency seems to have the same range as Rev Y. So, I think it's safe to simply double fADC to get the correct sample rate. CubeMX does not know this, and sets the wrong ADC clock prescale every time I use it :-(.
I think the /2 divider was not added to limit the ADC sample rate, they probably needed a clock signal with double the frequency inside the ADC circuit.