cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 RM0440 error: TIM16/17_OR1 register at wrong address

In the STM32G4 reference manual, section 30.8.15 has TIM16 and TIM17 OR1 at address offset 0x50. This register is used to enable the HSE/32 input to TIM16/17 for measuring the frequency of the HSE clock. In section 30.8.22, the register map summary, OR1 isn't even listed and offset 0x50 is marked as reserved.

Trying to use offset 0x50 doesn't do anything; writes to this address don't seem to "take". Going through the HAL code, it appears that the correct address offset for OR1 is 0x68; treating that as the correct address does enable HSE/32 and allows the HSE crystal to be measured, so it would be great if the reference manual could be updated.

6 REPLIES 6
Imen Ezzine
ST Employee

Hi Terry Greeniaus,

Thank you for your feedbacks!

It would be helpful if you can mention in which version for the RM0440 did you notice this incompatibility?

Meanwhile I will try to highlight this problem internally hoping it will be fixed.

Thank you,

-Imen

Hi @Imen Ezzine​,

Thanks for the reply. I see the problem in RM0440 rev 4 which appears to be the latest version available on the ST website.

TG

Hi Imen,

Is there any newer RM0440 than rev.4?

0693W000003C5S1QAK.png

Additionally, TIM16/17_OR1 is missing from the registers table, too:

0693W000003C5SfQAK.png

JW

And, to increase the mess, the CMSIS-mandated header files don't have OR1 register in TIM_TypeDef (they call it OR).

ST, please be meticulously consistent. These things might seem minor, but they hinder users' work. @Vincent Onde​ 

JW

Imen Ezzine
ST Employee

Hi,

Yes I confirm that the latest available version today for RM0440 - stm32G4 is  rev.4.

I also did check that the correct offset for OR1 register is 0x68.

This error has been reported internally in order to take necessary actions.

Meanwhile we did fix in the SVD files for the G4 family in order to be replaced in different tools.

Thank you for your feedbacks!

-Imen

Imen Ezzine
ST Employee

Hi,

One more update, we fixed the seen behavior and you can find the new OFFICIAL release on the ST web site for STM32G4 with the fixed SVD files on the following link in the HW Model, CAD Libraries & SVD ==> system view description section.

-Imen