You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alignement of (1) ESP Zero Code Matter examples and (2) ESP-Matter repository examples => Repo Light example not configured for light PMW driver (CON-1590)
#1321
Open
besbar opened this issue
Mar 10, 2025
· 0 comments
After few years working on Bluetooth Mesh and esp32, I am getting interested in Matter.
My first move was to burn a ESP32 feather with the light example (PWM driver) from Esp Zero Code. I then commissionned this device with Alexa and could control the RGB red led connected on PIN13 (power on/off and brightness from 0% to 100%).
Then I installed the ESP-Matter repository and setup my VS code (with ESP IDF extension, and esp-idf 5.2.3 installed, as it is recommanded) to access to the light example code and starting my education on Matter. Second move, I burn the light example from the repository (with 1 GPIO led on pin13 configured) on a another esp32 feather., commission in Alexa. But I was unable to control the led.
Looking at the logs/code, I understand that the LEDC mode enabling controlling the led with PMW driver is not defined.
==> From menuconfig LED options, LED_LEDC_MODE (i.e. PMW driver) in function led_indicator_create() below is never attainable.
So by adding some code below, I now can control the led, exactly as with the light example from esp zero code.
So my point of view is that it would be better if examples between repo and zero code platform could be better aligned.
#elif CONFIG_BSP_LED_TYPE_LEDC
{
.mode = LED_LEDC_MODE,
.led_indicator_ledc_config = &bsp_leds_ledc_config,
.blink_lists = bsp_led_blink_defaults_lists,
.blink_list_num = BSP_LED_MAX,
},
with (hard coded) definition of bsp_leds_ledc_config
#if CONFIG_BSP_LED_TYPE_LEDC
static led_indicator_ledc_config_t bsp_leds_ledc_config = {
.channel = LEDC_CHANNEL_0, // Exemple de canal LEDC
.gpio_num = 13, // Numéro GPIO associé à la LED
.timer_num = LEDC_TIMER_0, // Timer LEDC
.is_active_level_high = true, // Niveau actif haut
};
#endif // CONFIG_BSP_LED_TYPE_LEDC
and just adding this to KCONFIG
choice
prompt "LED type"
default BSP_LED_TYPE_GPIO
help
Select a LED type: GPIO or LEDC
config BSP_LED_TYPE_GPIO
bool "GPIO LED"
config BSP_LED_TYPE_RGB_CLASSIC
bool "Classic RGB LED"
config BSP_LED_TYPE_LEDC
bool "LEDC LED"
config BSP_LED_TYPE_RGB
bool "Addressable RGB LED"
endchoice
Thanks in advance for your remarks
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Alignement of (1) ESP Zero Code Matter examples and (2) ESP-Matter repository examples => Repo Light example not configured for light PMW driver
Alignement of (1) ESP Zero Code Matter examples and (2) ESP-Matter repository examples => Repo Light example not configured for light PMW driver (CON-1590)
Mar 10, 2025
Hi !
After few years working on Bluetooth Mesh and esp32, I am getting interested in Matter.
My first move was to burn a ESP32 feather with the light example (PWM driver) from Esp Zero Code. I then commissionned this device with Alexa and could control the RGB red led connected on PIN13 (power on/off and brightness from 0% to 100%).
Then I installed the ESP-Matter repository and setup my VS code (with ESP IDF extension, and esp-idf 5.2.3 installed, as it is recommanded) to access to the light example code and starting my education on Matter.
Second move, I burn the light example from the repository (with 1 GPIO led on pin13 configured) on a another esp32 feather., commission in Alexa. But I was unable to control the led.
Looking at the logs/code, I understand that the LEDC mode enabling controlling the led with PMW driver is not defined.
==> From menuconfig LED options, LED_LEDC_MODE (i.e. PMW driver) in function led_indicator_create() below is never attainable.
There is indeed no led_indicator_config_t *config with config.mode = LED_LEDC_MODE available in esp_bsp_devkit.c.
So by adding some code below, I now can control the led, exactly as with the light example from esp zero code.
So my point of view is that it would be better if examples between repo and zero code platform could be better aligned.
Thanks in advance for your remarks
The text was updated successfully, but these errors were encountered: