pcnt_chan_config_t chan_config = { .edge_gpio_num = EXAMPLE_EC11_GPIO_A, .level_gpio_num = -1, // No level GPIO used }; pcnt_channel_handle_t pcnt_chan = NULL; ESP_ERROR_CHECK(pcnt_new_channel(pcnt_unit, &chan_config, &pcnt_chan)); ESP_LOGI(TAG, ...
int16_t counter_h_lim; /*!< Maximum counter value */ int16_t counter_l_lim; /*!< Minimum counter value */ pcnt_unit_t unit; /*!< PCNT unit number */ pcnt_channel_t channel; /*!< the PCNT channel */ } pcnt_config_t; #ifdef __cplusplus } #endif©...
* @param pcnt_config Pointer of Pulse Counter unit configure parameter * * @return * - ESP_OK Success * - ESP_ERR_INVALID_STATE pcnt driver already initialized * - ESP_ERR_INVALID_ARG Parameter error */ esp_err_t pcnt_unit_config(const pcnt_config_t *pcnt_config); /** * @brief Ge...
我在esp32-c3开发板上测试pcnt,编译报错找不到相关的函数,查看sdk源码发现要配置CONFIG_SOC_PCNT_SUPPORTED才会编译pcnt.c,查看examples里面的项目也说了只支持ESP32 和ESP32-S2,请问是不支持ESP32-C3吗?为什么不支持?ESP_Yake Posts: 109 Joined: Mon Mar 06, 2017 12:23 pm Re: esp32-c3不支持pcnt吗?
第一个实验最简单,直接连接 因为要设置PWM引脚,这里就是使用16引脚 PWM的初始化 可以使用的...
ARM Cortex-M0+ Zero Gecko Microcontroller IC 32-Bit 24MHz 16KB Flash TQFN48 TQFP48 最小包装量:250 世强先进(深圳)科技股份有限公司 原厂认证 世强自营 供货保障 研发推荐 授权代理 一支起订 单价¥ 16.4439 现货250 仓库东莞仓 预计交期1. 预计交期为预估时间,不含国家法定节假日,不作为订单或合同约...
It doesn't seems to work, if i use 0 i got the same error (driver not initialized). To make it work, i had to move the pcnt_isr_service_install call after the first call to pcnt_unit_config... Strange... Sorry, something went wrong. ...
< Hold current count value */ } pcnt_channel_level_action_t; /** * @brief PCNT channel action on signal edge */ typedef enum { PCNT_CHANNEL_EDGE_ACTION_HOLD, /*!< Hold current count value */ PCNT_CHANNEL_EDGE_ACTION_INCREASE, /*!< Increase count value */ PCNT_CHANNEL_EDGE_ACTION...