Timer, setting it to initially expire at the given time. Subfield is nonzero), then timer_settime() arms (starts) the If new_value->it_value specifies a nonzero value (i.e., either These time values are measuredĪccording to the clock that was specified when the timer was Timespec(3) structure that allows a time value to be specified in The itimerspec structure is described inĮach of the substructures of the itimerspec structure is a Specifies the new initial value and the new interval for the The new_value argument is pointer to an itimerspec structure that SYNOPSIS top #include int timer_gettime(timer_t timerid, struct itimerspec * curr_value ) int timer_settime(timer_t timerid, int flags, const struct itimerspec *restrict new_value, struct itimerspec *_Nullable restrict old_value ) įeature Test Macro Requirements for glibc (seeĭESCRIPTION top timer_settime() arms or disarms the timer identified by timerid. Timer_settime, timer_gettime - arm/disarm and fetch state of Hopefully, this may be useful to some people.Timer_settime(2) System Calls Manual timer_settime(2) NAME top It is part of the FreeRTOS repository and can be found under the FreeRTOS/doc directory This document describes all drivers that are provided with the FreeRTOS distribution for the i.MX7D. ![]() FreeRTOS_BSP_i.MX_7Dual_API_Reference_Manual.pdf.i.MX 7Dual Applications Processor Reference Manual.Useful documentation for those who want to play around with peripherals in FreeRTOS: ![]() 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.Īs mentioned in imx7-m4-timers-in-freertos, GPT1 is NOT used by the Linux kernel and can be used in your application. I got GPT1 running but only via the M4 processor.Īfter 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. They may have code samples and such lying around as they did for the i.MX6 as seen in the other forum post.Īs promised, here’s how I got timer do what I wanted. Perhaps inquiring NXP about i.MX7 GPT on their forums may yield more information. This is the information I was able to find publicly. Though the information is a bit higher level and doesn’t include many actual code examples. Both these documents can be downloaded from NXP and contain some information on GPT. Other than this there’s also the i.MX7 reference manual and the i.MX Linux Reference manual.Perhaps this is something that can be asked/requested from NXP: Solved: iMX6 General Purpose Timer - NXP Community Strangely enough I could not find a public firmware guide for the i.MX7. While similar there’s for sure some differences here and there. However this was for the i.MX6 not the i.MX7. NXP forum post with attached code and firmware guide regarding GPT.Nevertheless here’s what I was able to find: Here’s the actual source code for the GPT driver for i.MX devices: timer-imx-gpt.c « clocksource « drivers - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modulesĪs for user-space examples of using GPT, information was more scarce.Here’s the in-kernel documentation regarding the device-tree bindings for the GPT: fsl,imxgpt.txt « timer « bindings « devicetree « Documentation - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules.In the Linux kernel source itself we have the following: ![]() Greetings GPT sub-system isn’t something we have a whole lot of experience with ourselves, but I did some research on this and here’s what I was able to find.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |