IOMUXC_SetPinMux(IOMUXC_GPIO_AD_00_FLEXIO2_D00, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_02_FLEXIO2_D02, 0U);
Later, I observed two signals on oscilloscope. I adjusted two pins as different freq and duty cycles as FLEXIO. My observation is as follows;
- When I set some freq values for my two pins, one of the signal is not set at programmed freq value, instead it produces different freq. Such as when I set freq to 13KHz, I see it on scope screen as 49KHz or something different. This is true for 15,10,12,18Khz. However when setting to 20Khz, it is set as correctly. So, some freq values are not programmed well. For another Flexio signal, it is always set to 50KHz and always correct during my observation.
- When I set only one of my signals, freq value is correctly programmed to 12,13,15,18,20,30Khz. No problem exists. Setting single pin works as expected. However, as I stated above, setting 2 pins yield unexpected results.Why?
- Lastly, whether setting single or both Flexio output pins; When I set freq value below 12Khz, the example in SDK, is not working because of below lines;
#define FLEXIO_MAX_FREQUENCY (DEMO_FLEXIO_CLOCK_FREQUENCY / 2U)
#define FLEXIO_MIN_FREQUENCY (DEMO_FLEXIO_CLOCK_FREQUENCY / 512U)
Even though I changed FLEXIO_MIN_FREQUENCY as DEMO_FLEXIO_CLOCK_FREQUENCY / 4096U value, I can not program freq value to flexio pins correctly. I tried that for only setting my single FLEXIO signal and both. However every time I saw the wrong freq setting on oscilloscope screen. Demo example and the .pdf link you sent, uses 48KHz pwm freq for only one output pin. I tried to change freq values lower than 12KHz, but it is not working as expected. Freq settings get wrong every time evn though I lowered FLEXIO_MIN_FREQUENCY macro.
- Is there any limitation with setting lower freq with using Flexio? Below 12Khz is possible? Such as 500Hz or 1Khz?
Wait your helps.Thanks