自己DIY了一块STM32F042C6的DemoBoard。 一天突发奇想,想要把FreeRTOS移植到板子上。 头一次移植,苦恼于网上找不断Keil CM0 下移植的直接例程,程序调试也老是在xTaskCreate失败。 今天程序终于调好了,能够开始跑FreeRTOS了。 程序功能:0 t% e3 B: x! C7 d0 q 1.LED指示灯 2.USART1 & USART2 中断接收,轮询发送/ `( i8 O. ~3 a, _ 3.CAN 中断接收,轮询发送# Q' w; J0 I2 V, ? 4.RTC " C0 `, r) |( ~* l7 n7 ?9 F 献上代码,请多指点。 代码未经整理,比较乱,请各位看官见谅。(该文件可直接导入eclipse C/C++工程,方便浏览。)" f5 O$ j) d7 b6 |$ m |
STM32固件库分享,超全系列整理
三创电子(Tcreate)-STM32F030核心板代码
STM32F0 ADC(DMA中断)多通道,注释超详细
FreeRTOS在STM32F030上的移植
基于STM32移植而引发的疑问经验分享
分享STM32F051中文参考手册(重制书签版)
游名:STM32F0+Trinamic智能步进驱动芯片TMC5160(最高20A)参考原...
【MCU实战经验】+STM32F030的步进电机加减速
STM32F0的中文技术参考手册(标签处理过)
基于STM32F030硬件SPI经验分享
RE:FreeRTOS V8.1.2移植到Cortex-M0(STM32F042C6)
--------------------------------------8 e/ A6 h- y* a9 @
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0 ! u- Q& n7 A3 Y9 @% b& l, B
#define configCPU_CLOCK_HZ ( ( uint32_t ) 48000000 )
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) + ]8 J8 Y9 G+ u5 m7 H
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 10 ) " x0 y7 Q3 h: `
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3400 ) ) /* 计算入Keil-ZI. */+ S2 O8 C; R# K* s5 M
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0, c% ]. Z: p' g4 b& u) P A ?
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 8
#define configCHECK_FOR_STACK_OVERFLOW 0
#define configUSE_RECURSIVE_MUTEXES 1
#define configUSE_MALLOC_FAILED_HOOK 0; p+ h8 j- V {8 H( f- _
#define configUSE_APPLICATION_TASK_TAG 0
#define configUSE_COUNTING_SEMAPHORES 1) r0 k, Z+ [- i+ y3 W3 `, p8 X
#define configGENERATE_RUN_TIME_STATS 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0; w6 [2 c9 t& a3 m9 h! @# I# b
#define configMAX_CO_ROUTINE_PRIORITIES 2% v/ N5 g3 s# ?
/* Software timer definitions. */
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( 2 )7 u! ]/ c8 Z4 a, `5 x
#define configTIMER_QUEUE_LENGTH 5
#define configTIMER_TASK_STACK_DEPTH ( 80 )# f# m. b! d7 X! t |
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */7 n0 S/ [% Y$ z q3 ?/ D, H1 f
#define INCLUDE_vTaskPrioritySet 1! W/ P$ ` m9 o( N+ F8 Q% R
#define INCLUDE_uxTaskPriorityGet 1. X) n/ C, E* S# f6 U( W8 K
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 1: q0 C$ J3 o6 }
#define INCLUDE_vTaskSuspend 18 E t& N! e0 c" d
#define INCLUDE_vTaskDelayUntil 1! l" i2 j( L- q' F0 ?4 t
#define INCLUDE_vTaskDelay 1
% o6 G0 U3 m. y
/* Normal assert() semantics without relying on the provision of an assert.h8 O7 M3 {0 b& [ C9 p& g( S
header file. */
#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)