Open nikitax75 opened 2 years ago
Hello! Can you please show your settings in .h file? What connection type do you use?
Hey, thanks for the reply!
Sure, settings in the header are:
/**
*******************************************
* @file ARGB.h
* @author Dmitriy Semenov / Crazy_Geeks
* @version 1.31
* @date 21-November-2021
* @brief Header file for ARGB (Adreassable RGB)
*******************************************
*
* @note Repo: https://github.com/Crazy-Geeks/STM32-ARGB-DMA
* @note RU article: https://crazygeeks.ru/stm32-argb-lib
*/
#ifndef ARGB_H_
#define ARGB_H_
#include "libs.h"
/**
* @addtogroup ARGB_Driver
* @brief Addressable RGB LED Driver
* @{
* @addtogroup User_settings
* @brief LED & Timer's settings
* @{
*/
#define WS2812 ///< Family: {WS2811S, WS2811F, WS2812, SK6812}
// WS2811S — RGB, 400kHz;
// WS2811F — RGB, 800kHz;
// WS2812 — GRB, 800kHz;
// SK6812 — RGBW, 800kHz
#define NUM_PIXELS 1 ///< Pixel quantity
#define USE_GAMMA_CORRECTION 1 ///< Gamma-correction should fix red&green, try for yourself
#define TIM_NUM 2 ///< Timer number
#define TIM_CH TIM_CHANNEL_1 ///< Timer's PWM channel
#define DMA_HANDLE hdma_tim2_ch1 ///< DMA Channel
// DMA channel can be found in main.c / tim.c
The LEDs are WS2812, connected to the F411RE nucleo board through breadboard cables. The Logic Analyzer capture above was a direct connection F411RE<->Logic Analizer to rule out any cabling issues
@nikitax75 Try to set NUM_PIXELS to 2 or 3 For LED connection type I meant: Logic Translator / Open Drain / Direct
Hi there,
Thanks for all the work in putting this together, very clear code & instructions. I am trying to use this lib on an STM32F411 (Nucleo STM32F411RE) and the output signal is incorrect:
This is the signal supposed to be sent for to clear a strip of one pixel:
I have checked all the CubeMX configuration which is as per your instructions and really don't understand what's happening. Any idea?
For reference, here is my clock configuration:
Timer configuration:
RCC configuration: