cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with stm32l4 tim16

Rsu.1
Associate II

I have use stm32l412cbt6 PB9 to input function and i can get the input data,then i configure PB9 to alternate function GPIO_AF14_TIM16 and i can not get the input data.Under the same configuration,PA3 alternate function GPIO_AF1_TIM2 can get the input data.Please give me some advice.

1 ACCEPTED SOLUTION

Accepted Solutions

Maybe there's an error in the the 'L412 datasheet, the AF14 column for PB (and PC) compared to other 'L4 appears to be shifted down one position.

TIM16_CH1 appears to be at PB8 AF14. See also the pin definitions table.

@Imen DAHMEN​ , can you please check if this is the case?

Thanks,

JW

View solution in original post

11 REPLIES 11

Maybe there's an error in the the 'L412 datasheet, the AF14 column for PB (and PC) compared to other 'L4 appears to be shifted down one position.

TIM16_CH1 appears to be at PB8 AF14. See also the pin definitions table.

@Imen DAHMEN​ , can you please check if this is the case?

Thanks,

JW

Rsu.1
Associate II

I reread the manual from ST official website,the table show that PB9 alternate function AF14 

> I reread the manual from ST official website,the table show that PB9 alternate function AF14 

I see that that's in the AF table; however, as I said above I believe this is an error, because

  • it's shifted when compared to other 'L4, and ST usually tries to keep things pin compatible
  • the pin definitions table in the same DS also indicates TIM16_CH1 to be on PB8:

0693W0000000FxHQAU.png

JW

Uwe Bonnes
Principal III

This is what I get from the device database XML files:

ethernut/nut/include/arch/cm3/stm/generated> grep TIM16_ stm32l41x_pinmux.h

#define TIM16_BKIN_FUNC         58

#define TIM16_CH1_FUNC          59

#define TIM16_CH1N_FUNC         60

       ((gpio == PA06) && (func == TIM16_CH1_FUNC          )) ? 14 : \

       ((gpio == PB05) && (func == TIM16_BKIN_FUNC         )) ? 14 : \

       ((gpio == PB06) && (func == TIM16_CH1N_FUNC         )) ? 14 : \

       ((gpio == PB08) && (func == TIM16_CH1_FUNC          )) ? 14 : \

Hi Uwe, ,

If you have a 'L412 board on hand, can you please try, which one is the case?

JW

@Uwe Bonnes​ 

i have try a 'l412board and confirm that PB8 alternate AF14

Hello,

You are right, TIM16_CH1 should be at PB8 alternate function AF14 instead of PB9.

We will correct this typo in the coming release of the Datasheet.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Thanks, Imen.

Please note, that's not only PB8, but the whole PB and PC in column AF14 are shifted down by one cell.

Jan

@Imen DAHMEN​ 

Yes, well noted. Thank you Jan.

This is raised internally to the appropriate team for correction.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen