Technology Sharing

Blue Bridge Cup Development Board STM32G431RBT6 High-level HAL Library Learning FreeRtos——Complete the first small project lighting

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

1. Configure LED pins (note that the pins are all configured as high level)

insert image description here

2. Create two new tasks, one for dynamic creation and one for static creation (dynamic creation will be used in most cases in the future) // Set the two priorities to the same

insert image description here

insert image description here
Replenish:

1. The advantages and disadvantages of creating static tasks and dynamic tasks in FreeRTOS

静态任务和动态任务的区别,就是一个需要自己建立堆栈,一个不需要自己建立堆栈。
稳定肯定是静态创建高,但是耗内存!任务删除以后这段内存没法释放掉,就只能浪费掉!
动态创建方法可能因为内存不足或者碎片话的情况下导致任务创建失败。