2018-10-28 04:32 AM
I'm trying to program the STM32F446 using the CubeMX code generator and the uVision 5 IDE on Windows 10 in order to use the CAN bus.
I've configured my CubeMX project for the STM32-F446RE Nucleo board. I have PA12 configured as CAN1TX and PA11 configured as CAN1RX. The rest of the pins are on default for the STM32-F446RE Nucleo board. I've generated the code for the uVision 5 IDE.
To get started, I'm trying to follow the instructions on how to use the HAL and driver by following the instructions in the comments of stm32f4xx_hal_can.c as well as the instructions on page 120 of the HAL documentation DocID025834 Rev 5. This page gives the following instructions:
To my further confusion, I've looked at various youtube videos and none of them seem to mention the steps above mentioned in the HAL manual.
I have installed on my IDE the following, amongst others: Generic: ARM::CMISS-Driver version 2.3.0 and 2.2.0, ARM::CMISS version 5.4.0 and version 5.3.0. Device Specific info: Keil::STM32F4xx_DFP version 2.13.0. Keil::STM32NuceloBSP version 1.6.0.
I've been looking around for information but without success, and would very much appreciate your help.
Solved! Go to Solution.
2018-10-28 07:56 AM
"x" in "__HAL_RCC_GPIOx_CLK_ENABLE" stands for 'A', 'B','C', etc. as in GPIOA, GPIOB, GPIOC, etc. - use the one you need for initialization of the pins you intend to use.
__GPIOx_CLK_ENABLE() is an older, deprecated form, aliased to __HAL_RCC_GPIOx_CLK_ENABLE() in [Cube]\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h
JW
2018-10-28 07:56 AM
"x" in "__HAL_RCC_GPIOx_CLK_ENABLE" stands for 'A', 'B','C', etc. as in GPIOA, GPIOB, GPIOC, etc. - use the one you need for initialization of the pins you intend to use.
__GPIOx_CLK_ENABLE() is an older, deprecated form, aliased to __HAL_RCC_GPIOx_CLK_ENABLE() in [Cube]\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h
JW
2018-10-30 07:41 AM
Thanks very much for your help! the IDE recognizes the function!
2019-02-13 11:31 PM
hi ,
i m new user of this board using Nucleo-f207zg. can you give steps to follow instruction for how to start CAN bus . Already i know about the logic of CAN protocol. But i am new using of CubeMx i just started cubeMx just enable pin and generate code in Keil version 5.the page was apper with hal library file.
i studied each library and one library give steps for this lib-> stm32fxx_hal_can.h .
the work is still pending from this area ..after what can i do?pls tell procedure and quick start..
thanking you
sirnajeevi