Hello there community,
Is there any possible solution to get PWM signal below 1Hz using FTM peripheral?
I need to change frequency from 0,001Hz (1mHz) to 10000Hz (10kHz). Is this achievable with FTM module using SDK (or at least part of it)?
Kind regard,
Piotr K.
I'm sorry for such late answer.
Requirements for this PWM generator changed a lot during this time. It stopped at 0,01-900[Hz]. This could be achievable with FTM with changing base CLKs for the FTM module. Unfortunately we had to use it for different thing and the rest of module where occupied.
I've decided to use LPIT timer (with 2 independent channels) and do a bit-banging software implementation.
It do a good job for low frequencies. I'm aware of that it will still burn a lot of CPU cycles, but have no idea of any other solution that would fit the requirements and it's better than just polling in main loop, which in our project need to have 2ms window.
FlexIO won't do the job here, because not every pin can make use of that.
Any way thank you for help.
Any suggestions will still be appreciated.
Kind regards,
Piotr K.
Hi,
Do you need to use FTM?
You can generate a low frequency PWM using FlexIO.
https://community.nxp.com/message/909619
BR, Daniel
Hi Piotr,
Supposing that 1 clock tick takes 0.00001s (I think this is possible only if you are using external clock source) the maximum value which can be measured by FTM timer is 0.65s due to 16 bit counter.
Taking into count that you are using relative large periods can you try to have a software implementation of the PWM?
Best regards,
Razvan