Dear Sir,
We have a question that how to change the GPIO output frequency ?
If any sample code available, kindly share it with us.
Thank you.
Dear Sir,
We have a question that how to change the GPIO output frequency ?
If any sample code available, kindly share it with us.
Thank you.
Hi
I would suggest using the PWM peripheral and the PWM example projects in the SDK for this. You can check out this case where my colleague Sigurd made a bare-metal example to set the output to 1.6MHz. It should be possible to edit this to 1kHz for instance without much trouble.
Best regards,
Simon
Hi Simonr,
Thanks, I have gone through this example before creating this ticket. But not getting that for 1kHz instance what will be the exact changes?
Can you once discuss with your colleague Sigurd on this?
Regards,
Megha Choudhari
Hi
In the app_pwm.h header file the APP_PWM_DEFAULT_CONFIG_1CH (or _2CH) functions are defined, and here you can set the period of your PWM in us. It is used in the pwm_library example in the nRF5 SDK. Setting the period here to 1000us would result in an output of 1kHz.
Best regards,
Simon
Hi,
Thanks for quick reply, I will test & let you know the result.
Regards,
Megha Choudhari
Hi,
I have tested, the output comes exactly 1KHz.
Thanks for your support
Regards,
Megha Choudhari