pwm_init bug or lack of documentation?

Andrzej
Posts: 3
Joined: Fri May 29, 2015 9:53 am

pwm_init bug or lack of documentation?

Postby Andrzej » Fri May 29, 2015 10:36 am

Im trying to initialize PWM in new SDK esp_iot_sdk_v1.1.0_15_05_26

In file pwm.h I found definion
void pwm_init(uint32 period, uint32 *duty,uint32 pwm_channel_num,uint32 (*pin_info_list)[3]);

but in documentation is definion
void pwm_init(uint16 freq, uint8 *duty)

I can't find definion of pin_info_list and all my attempts end in looped restarting module.

Could you send me a sample code for using PWM in new SDK?

Thank you in advance and best regards.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: pwm_init bug or lack of documentation?

Postby costaud » Fri May 29, 2015 11:38 am

Andrzej wrote:Im trying to initialize PWM in new SDK esp_iot_sdk_v1.1.0_15_05_26

In file pwm.h I found definion
void pwm_init(uint32 period, uint32 *duty,uint32 pwm_channel_num,uint32 (*pin_info_list)[3]);

but in documentation is definion
void pwm_init(uint16 freq, uint8 *duty)

I can't find definion of pin_info_list and all my attempts end in looped restarting module.

Could you send me a sample code for using PWM in new SDK?

Thank you in advance and best regards.


Would you please check the USER_LIGHT.C & USER_LIGHT_ADJ.C in IOT DEMO code in SDK V1.1.0.

We updated and improved the PWM functions and resolution in this SDK.

Andrzej
Posts: 3
Joined: Fri May 29, 2015 9:53 am

Re: pwm_init bug or lack of documentation?

Postby Andrzej » Mon Jun 01, 2015 6:29 am

Thanks,

It helped me, 4 channel PWM work perfectly but the next question how to set up more PWM channels.
In our application we would like to use the 2x RGBW because the number of ports on the module is sufficient and in the documentation is written:
"It is possible to increase the number of PWM outputs, but it is beyond the scope of this document."

Could you tell me if is it possibe and could you send me a sample code for config additional 4 PWM ports?

Best regards.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: pwm_init bug or lack of documentation?

Postby costaud » Mon Jun 01, 2015 12:02 pm

Andrzej wrote:Thanks,

It helped me, 4 channel PWM work perfectly but the next question how to set up more PWM channels.
In our application we would like to use the 2x RGBW because the number of ports on the module is sufficient and in the documentation is written:
"It is possible to increase the number of PWM outputs, but it is beyond the scope of this document."

Could you tell me if is it possibe and could you send me a sample code for config additional 4 PWM ports?

Best regards.


1. add GPIO config register in pwm_init()
2. define PWM_CHANNEL to 8.

but you need to change the code in user_light_adj.c,
However , in our latest demo, not released yet , we make it more friendly to modify.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: pwm_init bug or lack of documentation?

Postby costaud » Mon Jun 01, 2015 12:30 pm

Send a mail to support-product@espressif.com to apply for the demo code

berkutta
Posts: 15
Joined: Tue Mar 15, 2016 6:30 pm

Re: pwm_init bug or lack of documentation?

Postby berkutta » Sat Apr 09, 2016 6:52 pm

Had sent a E-Mail to you. But haven't got any response. Still waiting to get PWM working in my Product.....

Who is online

Users browsing this forum: No registered users and 6 guests