Skip to main content
jiazi.1
Associate
October 13, 2020
Question

I use stm32h745 MCU cortex-m4. When I increase fdcan initialization, why is the execution time of the program twice as slow? But When I blocked line 608, the program execution time returned to normal.

  • October 13, 2020
  • 3 replies
  • 1418 views

..

This topic has been closed for replies.

3 replies

Amel NASRI
ST Technical Moderator
October 14, 2020

Hi @jiazi.1​ ,

In order to be able to bring you some help, it is required to provide some more details.

So, could you please tell us:

  1. what do you mean by "I increase fdcan initialization"?
  2. do you have other peripherals than FDCAN running on your application?
  3. When, in your program, is HAL_FDCAN_DeInit called?

-Amel

PS: STM32H745 is a Dual core Arm Cortex-M7+ Cortex-M4 MCU.

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
jiazi.1
jiazi.1Author
Associate
October 16, 2020

Hi Amel,

Thank you for your reply,I add as follows.

-jiazi

jiazi.1
jiazi.1Author
Associate
October 16, 2020

1�?To develop CAN communication function, it is necessary to initialize the FDCAN peripheral

2�?The peripheral devices used in M4 core are shown in Figure 1,At the same time, the peripheral devices used in M7 core are shown in Figure 2.

Figure 1

0693W000004JylfQAC.pngFigure 2

0693W000004JylkQAC.png3�?As shown in Figure 3, the peripheral initialization function is called when the program initializes. As shown in Figure 4, the initialization function of the CAN communication is called in the initialization of the peripheral, and the function of the HAL_FDCAN_DeInit is called in this function, as shown in Figure 5.

Figure 3

0693W000004JymEQAS.pngFigure 4

0693W000004JymJQAS.pngFigure 5

0693W000004JymOQAS.pngPS: I know that stm32h745 is a dual core arm cortex-m7 + cortex-m4 microcontroller. We use cortex-m7 and cortex-m4 at the same time. After adding can communication function program into the normal running time program, it is found that the running speed of the program becomes slower in the debugging process. Then find out the cause and find out that after shielding 608 line, the program running time returns to normal.