|
自己DIY了一块STM32F042C6的DemoBoard。: @: {$ i, n' {: e5 o. ~! @( ` 一天突发奇想,想要把FreeRTOS移植到板子上。- w6 _5 i9 \9 s- t- a 头一次移植,苦恼于网上找不断Keil CM0 下移植的直接例程,程序调试也老是在xTaskCreate失败。9 E4 j/ G8 S9 u$ C 今天程序终于调好了,能够开始跑FreeRTOS了。; Z0 n5 K7 J5 ~0 F 程序功能: 1.LED指示灯 2.USART1 & USART2 中断接收,轮询发送7 D1 I( B$ g& r$ u 3.CAN 中断接收,轮询发送 , k% N6 ^: y3 U( w8 [, c 4.RTC 献上代码,请多指点。 [, F6 [2 f8 y* K 代码未经整理,比较乱,请各位看官见谅。(该文件可直接导入eclipse C/C++工程,方便浏览。)
FreeRTOS-STM32CM0-Demo.rar
(592.1 KB, 下载次数: 855)
|
DMA 原理从 0 到 1:为什么它能解放 CPU?一文讲透 DMA 的工作流程
小白也能明白的STM32的低功耗与唤醒机制
STM32系统中2种数据掉电保护的方法
分享STM32F051中文参考手册(重制书签版)
AI工具训练营-用ChatGPT解决HID Keyboard实现的问题
STM32固件库分享,超全系列整理
STM32小白入门指南:从基础到OTA实现方案
STM32超详细学习笔记
新手必看!STM32单片机应该怎么学?
如果你解决了这些问题,就可以直接学STM32
微信公众号
手机版
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
--------------------------------------; P$ d. U j# r& s
#define configUSE_PREEMPTION 16 _- F) U7 O2 K, z& }# Z$ Z: Y3 I! @9 N; `
#define configUSE_IDLE_HOOK 0 : {: V+ O/ R, N5 k( c9 x
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( uint32_t ) 48000000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) 4 V, }. p2 C8 K+ q( G
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 ) I3 b9 x6 l7 c6 }6 _
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) , K) C: }3 N1 J- Z; \' v) M- c
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3400 ) ) /* 计算入Keil-ZI. */: }9 S; j" o- K
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1& U; u% e3 a( h% K
#define configUSE_16_BIT_TICKS 05 i- Q9 e& v+ F7 Y& G6 @: Y
#define configIDLE_SHOULD_YIELD 10 Y( {" o1 g' D$ ~& H W
#define configUSE_MUTEXES 1& S1 i7 P) h( L8 H( S7 `. k
#define configQUEUE_REGISTRY_SIZE 89 X- t( I# D3 Z' }# d! J
#define configCHECK_FOR_STACK_OVERFLOW 0
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 0( G2 M/ }! H$ E4 d8 c; G
#define configUSE_APPLICATION_TASK_TAG 0
#define configUSE_COUNTING_SEMAPHORES 1
#define configGENERATE_RUN_TIME_STATS 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES 2
/* Software timer definitions. */; V% e6 W' S X
#define configUSE_TIMERS 18 L0 M* N8 l. n, [
#define configTIMER_TASK_PRIORITY ( 2 )) {0 b5 Y" W9 m6 [* m& ~ m1 ^
#define configTIMER_QUEUE_LENGTH 5
#define configTIMER_TASK_STACK_DEPTH ( 80 )# `9 R# R3 q. N# x& A
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */( K5 \, ^$ G+ N l9 y1 M
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1) Y8 n' _$ I/ z+ U5 |* W
#define INCLUDE_vTaskCleanUpResources 1+ ]# C) R0 Z1 [
#define INCLUDE_vTaskSuspend 1" a# U) `4 e) A8 e
#define INCLUDE_vTaskDelayUntil 1; |6 q6 v- H9 A- F9 P2 j9 |7 ~
#define INCLUDE_vTaskDelay 10 } x6 H0 N8 Z1 I) y* I* s
/* Normal assert() semantics without relying on the provision of an assert.h
header file. */7 X [. B! ?7 z! ~* _! P8 M3 |0 \
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)