- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm new to this product so I apologize in advance if I'm missing something obvious.
I have an application where I need a period interrupt at around 1 KHz, (1 ms or so). I don't see an obvious way to generate this. The fine-time timer provided by the ble_ interface seems to have 12.5 ms resolution.
To take a step back, as there may be another approach: I'm trying to generate a couple PWM waveforms with a period of 25 Hz, (40 ms). The slowest clock to the PWM hardware seems to be 128 KHz, and the PWM hardware has only a 10 bit counter...which gets me a 5 ms period. Not quite slow enough!
Any thoughts are greatly appreciated.
Or a dope slap, that's even better, actually.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi damaiano,
please refert to following the code to generate about 25Hz PWM.
aclk_configure(25500, ACLK1, ACLK_FREQ_24_MHZ);
pwm_start(PWM2, PMU_CLK, 0x200, 0);
gpio_configurePin((GPIO_PIN_LED) / 16, (GPIO_PIN_LED) % 16, (2 << 4), 0);
BTW, the ACLK_FREQ_24_MHZ will no function when 2073x is sleep, so you must use the function devlpm_registerForLowPowerQueries to let 2073x keep awake.