alternate function settings for STM32F303

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
mukululul
Posts: 27
Joined: Thu Nov 28, 2013 4:22 pm

alternate function settings for STM32F303

Post by mukululul »

Hi,
this week I tried to compile my code for STM32F303 which compiles earlier for STM32F103.
Sofar I used this in order to remap AFIO->MAPR |= AFIO_MAPR_CAN_REMAP_REMAP2 my CAN.

What is the correct way to do it so I can compile the code for both platforms?

What is the intended way to do remap with chibios?

Thanks for your help.

Michael
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: alternate function settings for STM32F303

Post by Giovanni »

The AFIO is no more present in newer STM32s, the "remapping" is done using the GPIO registers, the PAL driver is able to do the remapping, see some F3 or F4 demos and look for palSetPadMode().
The documentation of the alternate functions is present in the Data Sheet.

Giovanni
mukululul
Posts: 27
Joined: Thu Nov 28, 2013 4:22 pm

Re: alternate function settings for STM32F303

Post by mukululul »

Hi Giovanni,
thanks for your help.

Michael
Post Reply