当前位置:网站首页>Devkit mpc5744p configuring RTOS
Devkit mpc5744p configuring RTOS
2022-07-18 03:20:00 【Tritium】
DEVKIT-mpc5744p To configure rtos
Software :S32 Design Studio for Power Architecture Version 2.1
New project , Configure and generate code
ref: Wildfire 《FreeRTOS Actual combat of Kernel Implementation and application development — be based on STM32》
You can download it at yehuo University or Download link
To configure
- stay
component libraryDouble click Addrtosmodular
- And then
componentsDouble click this module , Enter the configuration interface , Complete the configuration
- To configure 3 individual led The interface is output

ctrl+spreservation , The generated code
- add to
Task/task_start.c task_start.h task_led.c task_led.h( Can be created elsewhere , Drag into project folder )
- stay
main.cAdd include header file in , The clock , Pin , rtos initialization#include "task_start.h" CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT); CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT); PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr); RTOS_Start(); task_start.h#ifndef TASK_START_H #define TASK_START_H #include "FREERTOS.h" #include "task.h" #include "FREERTOS.h" #include "queue.h" #include "semphr.h" #include "task_led.h" #include "task_swt.h" #include "Cpu.h" extern void StartTask(void * pvParameters); extern void RTOS_Start(void); #endiftask_start.c#include "FREERTOS.h" #include "queue.h" #include "semphr.h" #include "task_start.h" TaskHandle_t StartTask_Handle; void StartTask(void * pvParameters) // initialization 3 individual led Mission { taskENTER_CRITICAL(); // Enter the critical area FCCU_DRV_Init(INST_FCCU1, fccu1_Control0, fccu1_NcfConfig0); SWT_DRV_Init(INST_SWT1, &swt1_Config0); PINS_DRV_ClearPins(PTC,(1 << 11)); PINS_DRV_SetPins(PTC,(1 << 12)); xTaskCreate(vLEDTaskG,(const char * const)"vLEDTaskG", configMINIMAL_STACK_SIZE, (void*)0, 2, NULL); xTaskCreate(vLEDTaskB,(const char * const)"vLEDTaskB", configMINIMAL_STACK_SIZE, (void*)0, 2, NULL); taskEXIT_CRITICAL(); // Exit critical region vTaskDelay(1000); taskENTER_CRITICAL(); // Enter the critical area xTaskCreate(vLEDTaskR,(const char * const)"vLEDTaskR", configMINIMAL_STACK_SIZE, (void*)0, 2, NULL); PINS_DRV_ClearPins(PTC,(1 << 13)); xTaskCreate(vSwtTask,(const char * const)"vSwtTask", configMINIMAL_STACK_SIZE, (void*)0, 4, NULL); vTaskSuspend(StartTask_Handle); // Suspend the start task after initialization taskEXIT_CRITICAL(); // Exit critical region } void RTOS_Start(void) { xTaskCreate(StartTask, ( const char * const )"Start Task", 300, NULL, 10,&StartTask_Handle); /* Start the tasks and timer running. */ vTaskStartScheduler(); }task_led.h#ifndef TASK_LED_H #define TASK_LED_H #include "FREERTOS.h" #include "task.h" #include "FREERTOS.h" #include "queue.h" #include "semphr.h" #include "Cpu.h" extern void vLEDTaskR( void *pvParameters); extern void vLEDTaskG( void *pvParameters); extern void vLEDTaskB( void *pvParameters); #endiftask_led.c#include "task_led.h" void vLEDTaskR( void *pvParameters) { while (1) { vTaskDelay( 1500); PINS_DRV_TogglePins(PTC, (1<<11)); } } void vLEDTaskG( void *pvParameters) { while (1) { vTaskDelay( 500); PINS_DRV_TogglePins(PTC, (1<<12)); } } void vLEDTaskB( void *pvParameters) { while (1) { vTaskDelay( 1500); PINS_DRV_TogglePins(PTC, (1<<13)); } }- compile , debug
- Here's a rgb Flickering alternately , The function of displaying six colors

边栏推荐
- 上云精品 | 云商店助力慧科 推动校企联合,共育人才发展
- 【流放之路-第一章】
- Fighting landlords includes robbing landlords
- [live review] openharmony knowledge empowerment phase 6 lesson 3 - control panel function implementation of openharmony smart home project
- 558. Quadtree intersection / Sword finger offer II 118 Redundant edge
- Hcip notes (1)
- Two years ago, how were the leading players and blue chips in defi?
- 想成为精英级开发者?请逼自己养成这10个习惯
- 558. 四叉树交集 / 剑指 Offer II 118. 多余的边
- 数据传输:同构异IP数据源批量抽取实践
猜你喜欢

Robotframework advanced (III) integrated Jenkins operation automation use case

【开发教程17】AI语音人脸识别(会议记录仪/人脸打卡机)-AI人脸注册认证与识别

阈值PSI代码

Detailed explanation of thread interrupt method

麦肯锡:未来十年,十大顶尖技术趋势将影响投资和研究方向

仓储系统亮灯分拣

【visdom绘图】深度学习中Visdom绘图的总结

Hcip notes (1)

Slow SQL analysis and optimization

Recurrence of two CVE vulnerabilities
随机推荐
騰訊大咖分享 | 騰訊Alluxio(DOP)在金融場景的落地與優化實踐
mysql(三)路由器、MHA高可用
GRE, mGRE experiment
Hcip notes (4)
中國人力資源數字化生態圖譜-靈活用工市場
马斯克为何终止收购Twitter?
2022年7月11日-2022年7月17日(ue4视频教程和文档)
Differences and relations among RDD, dataframe and dataset in spark
解决中小型机房动环状态综合监控方案
【流放之路-第一章】
B树与B+树的区别
知乎高赞:数据中台——风起阿里,成于DaaS
DEVKIT-mpc5744p配置rtos
vite 中配置@表示访问src下的文件
什么是主动元数据?为什么Gartner预测它是元数据管理的新方向
The US Treasury Department approved the transaction of chemical fertilizers and agricultural products with Russia
马斯克中止推特收购,分手费10亿美元
元宇宙大爆发是谁在“跑马圈地”?
Carte écologique numérique des ressources humaines en Chine - marché flexible de l'emploi
DevSecOps研发安全实践——开发篇