February 23rd, 2018 Week 8th Friday

时间:2022-03-02 18:13:32

It takes a strong man to save himself, and a great man to save another.

强者自救,圣者渡人。

When you are not strong enough to save others, just concentrate on self-improvements and self-promotion.

For many of us, the best thing we can do to save others is to ensure we are capable of doing our businesses perfect so that we don't need to trouble others.

But how to become a capable man? How to save ourselves from the deep grooves of life?

That needs willpower, planning, and resolve.

It is your life, you don't need someone's permission to live the life you want.

生活是你自己的,想过什么样的生活,你不需要得到别人的许可。

From Roy T. Bennett.

I have been very busy programming for a can-bus device using STM32F407VG, a MCU from the Cortex-M4 family.

The microchip has two can-bus interface, a master which can directly access the hardware, and a slave which only can indirectly access the hardware with the help of the master interface.

According to the datasheet, the two interfaces, named bxCan, which means the Basic Extended CAN peripheral, can support the CAN protocols version 2.0A and B.

It has been designed to manage a high number of incoming messages efficiently with a minimum CPU load, for the hardware in it can tackle the incoming messages first using FIFOs.

However, after I realized some basic functions, many problems arose when I tried to optimize my code in order to meet the design requirements.

Maybe I am lack of enough knowledge about the microchip, especially the knowledge needed to tackle the interrupts in it.

Do not be a coder who just knows copy and paste, please spend some time reading the datasheet and do some experiments to make the code work efficiently and faultlessly.