Skip to main content
JennyDigital
Associate
August 22, 2026
Solved

STM32C092FCP6 FDCAN remapping issue.

  • August 22, 2026
  • 5 replies
  • 17 views

I designed a board with a layout that I was very happy with, but this meant remapping FDCAN1_TX to PC14, which CubeMX dutifully created code for...

However, the code wouldn't compile.  I needed to get my board order in that day so I simply adjusted the pin arrangement and modified the layout, but it looks for all the world as though there are some missing defines.  I say this because the datasheet quite clearly states this as a valid remapping.

Just thought I'd put this out there.

Maybe the fix is as simple as:-

#define GPIO_AF13_FDCAN1 13

I may revisit this in the near future and I am aware there are some other remapping issues others have tripped up on.  I guess it's because this is a relatively new part.  It only came out in Feb 2025.

Does anybody else know anything about this issue?

Best answer by mƎALLEm

Hello  @JennyDigital  and thank you for raising that issue.

That doesn't seem to be an issue in CubeMx but rather a missing definition in the HAL.

CubeMx is just using HAL as is.

The current definitions on AF13 in stm32c0xx_hal_gpio_ex.h are as following:

/**
* @brief
AF 13 selection
*/ #define GPIO_AF13_TIM14
((uint8_t)0x0D)  /*!< TIM14 Alternate Function mapping */ #define GPIO_AF13_TIM3
((uint8_t)0x0D)  /*!< TIM3 Alternate Function mapping */

Indeed GPIO_AF13_FDCAN1 is missing in the definition list.

I'll escalate the issue internally for check and fix.

Edit: after checking:

In the GitHub link, FDCAN1 AF13 is defined at line 259:

/**
* @brief
AF 13 selection
*/ #define GPIO_AF13_TIM14
((uint8_t)0x0D)  /*!< TIM14 Alternate Function mapping */ #define GPIO_AF13_TIM3
((uint8_t)0x0D)  /*!< TIM3 Alternate Function mapping */ #if defined(FDCAN1) #define GPIO_AF13_FDCAN1
((uint8_t)0x0D)  /*!< FDCAN1 Alternate Function mapping */ #endif /* FDCAN1 */

And I think there is a mismatch between Github and the C0 Cube (V1.4.0) zip file here.

Internal ticket: CDM0062895 to check the propagation of the fix in the zip file.

5 replies

Associate
August 22, 2026

Updating CubeMX packages may eventually resolve everything automatically.. 

JennyDigital
Associate
August 22, 2026

I agree, though there are literally thousands of STM32 parts, so I'll give them extra time before just fixing it myself.  That's totally fair.

JennyDigital
Associate
August 22, 2026

It just occurred to me... The speed and manner with which this is being handled is AWESOME!  Thank you ??

mƎALLEm
ST Technical Moderator
August 27, 2026

You're welcome

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
August 27, 2026

Hello  @JennyDigital  and thank you for raising that issue.

That doesn't seem to be an issue in CubeMx but rather a missing definition in the HAL.

CubeMx is just using HAL as is.

The current definitions on AF13 in stm32c0xx_hal_gpio_ex.h are as following:

/**
* @brief
AF 13 selection
*/ #define GPIO_AF13_TIM14
((uint8_t)0x0D)  /*!< TIM14 Alternate Function mapping */ #define GPIO_AF13_TIM3
((uint8_t)0x0D)  /*!< TIM3 Alternate Function mapping */

Indeed GPIO_AF13_FDCAN1 is missing in the definition list.

I'll escalate the issue internally for check and fix.

Edit: after checking:

In the GitHub link, FDCAN1 AF13 is defined at line 259:

/**
* @brief
AF 13 selection
*/ #define GPIO_AF13_TIM14
((uint8_t)0x0D)  /*!< TIM14 Alternate Function mapping */ #define GPIO_AF13_TIM3
((uint8_t)0x0D)  /*!< TIM3 Alternate Function mapping */ #if defined(FDCAN1) #define GPIO_AF13_FDCAN1
((uint8_t)0x0D)  /*!< FDCAN1 Alternate Function mapping */ #endif /* FDCAN1 */

And I think there is a mismatch between Github and the C0 Cube (V1.4.0) zip file here.

Internal ticket: CDM0062895 to check the propagation of the fix in the zip file.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.