STM32F103 HAL库通过PWM+DMA驱动SW2812灯带(呼吸、跑马、水滴模式)

上传者: 42289734 | 上传时间: 2024-01-22 19:55:43 | 文件大小: 5.36MB | 文件类型: ZIP
包含SW2812的多种炫彩模式,比如呼吸灯,跑马灯,水滴灯等,驱动函数都是封装好的,只需要对函数的形参进行修改就可以设置好自己要点亮的RGB灯数,要点亮的颜色,呼吸、流水的速度等。 通过延时机器周期的方式去转换成SW2812的0、1码的方式虽然程序简单,但是会大量占用MCU线程,且会被中断打断,容易导致RGB显示出错。 该程序首先对要发送的RGB数据进行处理后通过指针存储在特定地址,再通过PWM+DMA的方式将RGB数据通过硬件PWM发送出去的同时,也不会占用了MCU的线程导致程序出现异常BUG,使MCU拥有大量线程资源去进行别的控制。

文件下载

资源详情

[{"title":"( 137 个子文件 5.36MB ) STM32F103 HAL库通过PWM+DMA驱动SW2812灯带(呼吸、跑马、水滴模式)","children":[{"title":"stm32f103 sw2812 RGB LED.axf <span style='color:#111;'> 534.32KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.c <span style='color:#111;'> 242.32KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.c <span style='color:#111;'> 79.24KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.c <span style='color:#111;'> 49.12KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.c <span style='color:#111;'> 36.27KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.c <span style='color:#111;'> 30.16KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.c <span style='color:#111;'> 29.55KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.c <span style='color:#111;'> 27.82KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.c <span style='color:#111;'> 21.06KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.c <span style='color:#111;'> 21.04KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.c <span style='color:#111;'> 20.43KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.c <span style='color:#111;'> 18.91KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.c <span style='color:#111;'> 15.40KB </span>","children":null,"spread":false},{"title":"SW2812RGB.c <span style='color:#111;'> 15.29KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.c <span style='color:#111;'> 14.80KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.c <span style='color:#111;'> 14.80KB </span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'> 10.60KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.c <span style='color:#111;'> 6.57KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.c <span style='color:#111;'> 5.71KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.c <span style='color:#111;'> 4.15KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.crf <span style='color:#111;'> 590.46KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.crf <span style='color:#111;'> 554.17KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.crf <span style='color:#111;'> 541.04KB </span>","children":null,"spread":false},{"title":"sw2812rgb.crf <span style='color:#111;'> 536.76KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.crf <span style='color:#111;'> 536.73KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.crf <span style='color:#111;'> 534.21KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.crf <span style='color:#111;'> 533.76KB </span>","children":null,"spread":false},{"title":"main.crf <span style='color:#111;'> 533.59KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.crf <span style='color:#111;'> 532.71KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.crf <span style='color:#111;'> 532.00KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.crf <span style='color:#111;'> 531.86KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.crf <span style='color:#111;'> 531.69KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.crf <span style='color:#111;'> 531.54KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.crf <span style='color:#111;'> 530.83KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.crf <span style='color:#111;'> 530.43KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.crf <span style='color:#111;'> 529.90KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.crf <span style='color:#111;'> 529.29KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.crf <span style='color:#111;'> 529.12KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.d <span style='color:#111;'> 2.88KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.d <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.d <span style='color:#111;'> 2.82KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.d <span style='color:#111;'> 2.82KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.d <span style='color:#111;'> 2.82KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.d <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_msp.d <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.d <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.d <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.d <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.d <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.d <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.d <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.d <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"system_stm32f1xx.d <span style='color:#111;'> 2.69KB </span>","children":null,"spread":false},{"title":"sw2812rgb.d <span style='color:#111;'> 2.66KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.d <span style='color:#111;'> 2.62KB </span>","children":null,"spread":false},{"title":"main.d <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"startup_stm32f103x6.d <span style='color:#111;'> 71B </span>","children":null,"spread":false},{"title":"stm32f103_sw2812_RGB_LED_STM32F103C6_1.0.0.dbgconf <span style='color:#111;'> 2.35KB </span>","children":null,"spread":false},{"title":"stm32f103 sw2812 RGB LED_stm32f103 sw2812 RGB LED.dep <span style='color:#111;'> 46.77KB </span>","children":null,"spread":false},{"title":"stm32f103x6.h <span style='color:#111;'> 823.13KB </span>","children":null,"spread":false},{"title":"stm32_hal_legacy.h <span style='color:#111;'> 208.93KB </span>","children":null,"spread":false},{"title":"core_cm33.h <span style='color:#111;'> 171.48KB </span>","children":null,"spread":false},{"title":"core_armv8mml.h <span style='color:#111;'> 164.96KB </span>","children":null,"spread":false},{"title":"core_cm7.h <span style='color:#111;'> 145.11KB </span>","children":null,"spread":false},{"title":"core_cm4.h <span style='color:#111;'> 120.71KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim.h <span style='color:#111;'> 119.66KB </span>","children":null,"spread":false},{"title":"core_cm3.h <span style='color:#111;'> 109.23KB </span>","children":null,"spread":false},{"title":"core_sc300.h <span style='color:#111;'> 107.93KB </span>","children":null,"spread":false},{"title":"core_cm23.h <span style='color:#111;'> 102.18KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc_ex.h <span style='color:#111;'> 99.01KB </span>","children":null,"spread":false},{"title":"core_armv8mbl.h <span style='color:#111;'> 95.70KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_rcc.h <span style='color:#111;'> 66.65KB </span>","children":null,"spread":false},{"title":"cmsis_gcc.h <span style='color:#111;'> 60.88KB </span>","children":null,"spread":false},{"title":"cmsis_armclang.h <span style='color:#111;'> 55.17KB </span>","children":null,"spread":false},{"title":"core_cm0plus.h <span style='color:#111;'> 49.28KB </span>","children":null,"spread":false},{"title":"core_sc000.h <span style='color:#111;'> 46.14KB </span>","children":null,"spread":false},{"title":"core_cm1.h <span style='color:#111;'> 42.44KB </span>","children":null,"spread":false},{"title":"core_cm0.h <span style='color:#111;'> 41.22KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash_ex.h <span style='color:#111;'> 36.11KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio_ex.h <span style='color:#111;'> 35.38KB </span>","children":null,"spread":false},{"title":"cmsis_iccarm.h <span style='color:#111;'> 27.75KB </span>","children":null,"spread":false},{"title":"cmsis_armcc.h <span style='color:#111;'> 27.55KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma.h <span style='color:#111;'> 17.79KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_cortex.h <span style='color:#111;'> 17.14KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_conf.h <span style='color:#111;'> 15.65KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_dma_ex.h <span style='color:#111;'> 12.54KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_exti.h <span style='color:#111;'> 12.02KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_pwr.h <span style='color:#111;'> 11.81KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_gpio.h <span style='color:#111;'> 11.77KB </span>","children":null,"spread":false},{"title":"mpu_armv7.h <span style='color:#111;'> 11.44KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal.h <span style='color:#111;'> 11.35KB </span>","children":null,"spread":false},{"title":"mpu_armv8.h <span style='color:#111;'> 10.70KB </span>","children":null,"spread":false},{"title":"stm32f1xx.h <span style='color:#111;'> 10.32KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_tim_ex.h <span style='color:#111;'> 9.65KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_flash.h <span style='color:#111;'> 9.11KB </span>","children":null,"spread":false},{"title":"cmsis_compiler.h <span style='color:#111;'> 8.80KB </span>","children":null,"spread":false},{"title":"stm32f1xx_hal_def.h <span style='color:#111;'> 7.59KB </span>","children":null,"spread":false},{"title":"tz_context.h <span style='color:#111;'> 2.69KB </span>","children":null,"spread":false},{"title":"main.h <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"stm32f1xx_it.h <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"......","children":null,"spread":false},{"title":"<span style='color:steelblue;'>文件过多,未全部展示</span>","children":null,"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明