Thank you for that useful reply JerryChang,
One thing I want to point out is that the example referenced above is only operating in user space (application-level). This is not DMA access to the GPIO registers in Kernel space (custom driver level).
As I have specified, this target for this request is CNC machine control. As such a very short path from physical IO state to code is REQUIRED, and it must be allowed to operate with a higher system interrupt level than a user application - the user applications will talk to this driver I will have to write.
As an example of what specifically I’m requesting, when hardware is set up after boot, the mode of what the GPIO pin does is set somewhere in a function block mux (SPI, I2C, PWM, etc…) - when set as a GPIO rather than a special function, there will be registers that define whether pull-ups and pull-downs are used, whether edge detection is used (if the hardware supports it), whether the pin is configured as a driven output, what state the output should be set to (high/low), and then a register to read the measured level of the pin (when the pin is not actively driven by the Tegra chip, it is effectively an input and the level reflects what external circuitry is doing to the pin).
Normally in hardware this will be a collection of memory registers. For example with the RaspberryPi, a C-library is publically available that can access these registers directly (here is a link to that author’s page discussing it). This C-file can be included in other user-space applications for improved speed (>20MHz GPIO toggle rates at driver-level) and lower latency (<1uS delays from command to execute/response in meat-space).
This low level is the same space we need to be able to access in order to suitably use the GPIO for high-speed IO required in CNC and Robotic Motion Control. Effectively we need to be able to write a driver that operates in kernel space directly on the IO (GPIO Direct Memory Access [DMA]), without passing through a sysfs abstraction that is provided in the Jetson examples.
Imagine if you will about how long you want your delay to be from when you push an E-STOP button to when software is aware of it, or if a 2,000kg gantry is moving to the end of its travel and activates a limit switch - we don’t want that to crash, as it could break things or hurt/kill people.
Is there a register programming manual available for the Jetson DevKit for developers? Usually this will have a base address register (BAR) function provided by the kernel to where the memory for GPIO has been allocated/randomized (if the hardware does that), and then a register offset for each of the GPIO function registers (mux, special mode, pull-ups, pull downs, output active, output state, measured value, etc…).
Thank you and Nvidia for your continued insight and replies