As promised, here’s how I got timer do what I wanted.
I got GPT1 running but only via the M4 processor.
After having disabled it in the device tree, I configured the IO-Mux for the GPT_CLK1 and GPT1_COMPARE1 signals to be present on the associated pads of the i.MX7D.
Using the ‘driver’ code in gpt.c under FreeRTOS/platform/drivers/src
I managed to output a signal with the required frequency based on the external 4MHz input in GPT_CLK1.
As mentioned in imx7-m4-timers-in-freertos, GPT1 is NOT used by the Linux kernel and can be used in your application.
Useful documentation for those who want to play around with peripherals in FreeRTOS:
- i.MX 7Dual Applications Processor Reference Manual
- FreeRTOS_BSP_i.MX_7Dual_API_Reference_Manual.pdf
This document describes all drivers that are provided with the FreeRTOS distribution for the i.MX7D.
It is part of the FreeRTOS repository and can be found under theFreeRTOS/doc
directory
Hopefully, this may be useful to some people.
Best regards,
Jeroen