You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kaidegit 6d660e0d96 [demo]添加demo的说明 3 years ago
..
.settings [demo]添加基于stm32cubemx的例程 3 years ago
Components/EasyLogger_Port [demo]添加基于stm32cubemx的例程 3 years ago
Core [demo]添加基于stm32cubemx的例程 3 years ago
Drivers [demo]添加基于stm32cubemx的例程 3 years ago
Middlewares/Third_Party/FreeRTOS/Source [demo]添加基于stm32cubemx的例程 3 years ago
.cproject [demo]添加基于stm32cubemx的例程 3 years ago
.mxproject [demo]添加基于stm32cubemx的例程 3 years ago
.project [demo]添加基于stm32cubemx的例程 3 years ago
README.md [demo]添加demo的说明 3 years ago
STM32G070RBTX_FLASH.ld [demo]添加基于stm32cubemx的例程 3 years ago
nucleo-g070rb Debug.launch [demo]添加基于stm32cubemx的例程 3 years ago
nucleo-g070rb.ioc [demo]添加基于stm32cubemx的例程 3 years ago

README.md

NUCLEO-G070RB(基于STM32G070RBT6) FreeRTOS demo

1、简介

使用STM32CubeMX创建FreeRTOS工程实现异步log输出的demo

2、使用方法

导入STM32CubeIDE连接开发板下载使用。使用NUCLEO自带的STLinkV2-1的串口配置115200 8 1 N可观察到3种不同等级和颜色的HelloWorld。

3、文件说明

  • Components/EasyLogger_Port文件夹下为移植参考适配文件。
  • Core/Src/main.c添加了串口发送完成回调函数和elog初始化。
  • Core/Src/app_freertos.c中默认线程每间隔1秒发送一次log。

4、其他说明

  • 对于NUCLEO-G070RB的默认Cube工程大致进行了如下修改修改了系统时钟为64M修改系统时钟源为TIM1开启FreeRTOS添加了log异步输出线程添加了信号量使能 USE_NEWLIB_REENTRANT 选项串口数据字节改为8添加串口发送DMA打开串口中断。
  • 对于异步输出的线程本demo中为elog线程和需要使用elog的线程推荐stack大小大于256word使用Cube默认的128word可能会造成栈溢出。
  • 需要打开串口2的中断而不仅仅是默认打开的DMA中断才能在DMA传输完成后正常进入HAL_UART_TxCpltCallback()回调函数。