Can I use Piccolo peripherals as controlled generator for periodic pulse generation with frequency range from 8700 to 12000 Hz and with step 0.1Hz?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Can I use Piccolo peripherals as controlled generator for periodic pulse generation with frequency range from 8700 to 12000 Hz and with step 0.1Hz?
Hi Andrey,
Andrey Pokidyshev said:Can I use Piccolo peripherals as controlled generator for periodic pulse generation with frequency range from 8700 to 12000 Hz and with step 0.1Hz?
You can use the ePWM peripheral to achieve this. Do check this doc which is for F28027 mcu: 0601.ePWM.pdf
Regards,
Gautam
Hi, Gautam
Can show this numerically on the basis of datasheet, please?
Regards,
Andrey
Hi Andrey,
Gautam is correct, you can. However, you won't find this value directly in the datasheet, but I'll go through the calculations (from data in the datasheet/user's guide) so that you can double check your understanding.
The system clock (SYSCLK) speed for most Piccolo devices is 60MHz.
The ePWM clock and SYSCLK by default run at the same speed.
The ePWM submodule is based on a 16-bit timer.
---
So, the fastest that a 60MHz Piccolo ePWM can run is 60MHz. Because of IO buffer limitations, the real maximum is something more like 10MHz.
The slowest that the Piccolo ePWM can run is 60M/(2^16) = 915 Hz
Therefore the ePWM will be able to meet your frequency range requirements.
---
As far as resolution, the standard ePWM can vary the period in steps of 1/SYSCLK = 16.67ns => steps of ~3 Hz at 12kHz. This means the standard ePWM will not give you enough resolution to meet your application demands.
However, you can use the HR mode of the ePWM (if you buy a device with HRPWMs). Once configured correctly you can get resolution steps of ~150ps (the exact value can be found in the datasheet). If you work out the calculations then you'll find that you can generate steps of ~0.03Hz at 12kHz with the HRPWM.
---
Hopefully this helps.
Thank you,
Brett
Thank you for your direct prompt, Brett,
I found the exact answer, starting from