STM32F4 Pin-Remap
Posted: Fri Nov 15, 2013 6:41 pm
Hi,
I am an IT student and evaluating ChibiOS for a project.
We are using ChibiOS in version 2.6.1 and developing on the new STM32F429i DISCOVERY board.
We want to set up a little test with the Can-Hal and have some questions I don’t really find in the documentation.
We want to use PD0 and PD1 for the CAN1 on the board and now we have to remap this pins.
Solution(from other posts):
1) Configure the pins 0 and 1 from Port D in the board.h VAL_GPIOD_* ...
2) Remap the pins, so the OS knows what for pins CAND1 is using
Questions:
1) Is there any document related to remapping?
2) There was an additional configuration shown in a thread viewtopic.php?f=16&t=1307:
#define VAL_GPIODCRL 0x34B334B8 //0x34B33444 value before change
3) The code block about remapping can from the thread above was for the stm32f10x.h and we are using stm32f4xx.h .
The shown code is:
AFIO->MAPR|= AFIO_MAPR_CAN_REMAP_REMAP3;
And in the stm32f4xx.h file is nothing about AFIO_BASE, the AFIO_TypeDef or pin selection for the HAL driver.
Was it just a gimmick for the f10 and we have to do it manual?
regards
Tobias
I am an IT student and evaluating ChibiOS for a project.
We are using ChibiOS in version 2.6.1 and developing on the new STM32F429i DISCOVERY board.
We want to set up a little test with the Can-Hal and have some questions I don’t really find in the documentation.
We want to use PD0 and PD1 for the CAN1 on the board and now we have to remap this pins.
Solution(from other posts):
1) Configure the pins 0 and 1 from Port D in the board.h VAL_GPIOD_* ...
2) Remap the pins, so the OS knows what for pins CAND1 is using
Questions:
1) Is there any document related to remapping?
2) There was an additional configuration shown in a thread viewtopic.php?f=16&t=1307:
#define VAL_GPIODCRL 0x34B334B8 //0x34B33444 value before change
3) The code block about remapping can from the thread above was for the stm32f10x.h and we are using stm32f4xx.h .
The shown code is:
AFIO->MAPR|= AFIO_MAPR_CAN_REMAP_REMAP3;
And in the stm32f4xx.h file is nothing about AFIO_BASE, the AFIO_TypeDef or pin selection for the HAL driver.
Was it just a gimmick for the f10 and we have to do it manual?
regards
Tobias