hi support team,
our customer is trying to use gpio to simulate interface for external device communication.
and i tested our 5340dk pin 28 and pin 29, find out that gpio speed is not stable as below:

i have added source code as below:
hi support team,
our customer is trying to use gpio to simulate interface for external device communication.
and i tested our 5340dk pin 28 and pin 29, find out that gpio speed is not stable as below:

i have added source code as below:
It is likely that the I/O pin is using the PCLK16M 16MHz clock, so will only transition edges at 62.5nSec intervals. However, I don't see where this is defined in the product spec, or indeed if the PCLK32 or PCLK64 are available for i/o port pin peripheral operation. I/O port pins and PWM may both be limited to 16MHz, whereas TIMER/COUNTER and SPI (for example) can use faster clocks
hi,
actually the clock is not 16M when i disable cpu at 128M(which means 64M cpu speed), and this gpio speed is as below:

Regards,
William.
Hello William,
I have reproduced the issue and I also have jitter (not stable toggling) for each duty cycle. Since the pins are set with no delay, so we cannot expect stable toggling. To toggle a GPIO without using the CPU, we need to use GPIOTE. CPU and peripheral are on different buses, at different speeds. the peripheral bus is here at 16Mhz, while the CPU is either 128 MHz or 64 MHz.
You need to use either DPPI+TIMER+GPIOTE peripheral or use the PWM peripheral.
You can look at this nrfx sample in zephyr to do that https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/boards/nrf/nrfx/src/main.c .
In prj.conf file, you need to add this CONFIG_NRFX_TIMER2=y also.
Thanks.
Regards,
Kazi
Hello William,
I have reproduced the issue and I also have jitter (not stable toggling) for each duty cycle. Since the pins are set with no delay, so we cannot expect stable toggling. To toggle a GPIO without using the CPU, we need to use GPIOTE. CPU and peripheral are on different buses, at different speeds. the peripheral bus is here at 16Mhz, while the CPU is either 128 MHz or 64 MHz.
You need to use either DPPI+TIMER+GPIOTE peripheral or use the PWM peripheral.
You can look at this nrfx sample in zephyr to do that https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/boards/nrf/nrfx/src/main.c .
In prj.conf file, you need to add this CONFIG_NRFX_TIMER2=y also.
Thanks.
Regards,
Kazi