2024-06-20 08:29 AM
Specifically, I require a timer for creating a clock to a peripheral. I chose PH5 (Timer12 Channel 2) because of the allocation capability in CubeMX, however, the datasheet for the STM32H757 does not show that as an alternate function.
I have confirmed that both the CubeMX software and datasheets are the latest versions...
My question is, which resource is correct and if the Alternate function is available for PH9, which AF code do I use? It is not listed anywhere.
2024-06-20 09:25 AM - edited 2024-06-20 09:25 AM
When I make a search with TIM12 wording in the pinout menu I get only Four GPIOs options PB14/PB15/PH6/PH9 which is inline with the datasheet.
No PH5 is highlighted:
2024-06-20 09:33 AM
@Tesla DeLorean: reported internal ticket 184676 regarding the miss of TIM12 AFs in the "alternate functions tables"
2024-06-20 09:40 AM
Appreciate your comment, I usually trust the datasheet, however, some of the related chips, i.e. STM3274x have very similar layouts and do document the AF codes for PH9 to Timer12, this is what gives me hope. It's just another trace but the re-design is a pain. Hopefully SofLit can find something.
2024-06-20 09:41 AM
The post actually pertains to PH9.
2024-06-20 09:46 AM - edited 2024-06-20 09:56 AM
Hopefully SofLit can find something.
H743 datasheet is the reference (TIM12 AFs are mapped on AF2) and CubeMx from my side (at least with TFBGA240) is not showing an issue. It's inline with H743 datasheet. Knowing that H757 datasheet TIM12 AFs are well shown in Table 8. STM32H757xI pin/ball definition.
2024-06-20 11:45 AM
In H745 ds it is on PH9 :
2024-06-20 11:51 AM
>> I chose PH5 (Timer12 Channel 2) ... Alternate function is available for PH9
Ok, if you in fact used PH9 that would make a lot more sense
2024-06-20 12:55 PM - edited 2024-06-20 01:19 PM
So if you generate the setup with Cube , but it (wrong) gives you PH5 for TIM12ch2 , generate code,
then modify in xxx_hal_msp.c -> TIMxx init the H 5 pin to H 9 , looks like here for PA0 + TIM5 (on my H743) :
And check/set AF is AF2 .
Try...and then check: TIM12 signal on PH9 there ?
+
OR :
update your Cube...maybe newest version doing all correct...as SofLit shows.
2024-06-20 01:27 PM
Right, Table8, pin shows:
but AF shows nothing about TIM12, it forgotten here :
So Table 16 needs little correction.
2024-06-21 12:46 AM
@AScha.3 wrote:
Right, Table8, pin shows:
but AF shows nothing about TIM12, it forgotten here :
So Table 16 needs little correction.
Seems you didn't see my comment