I.MX93 TRGMUX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.MX93 TRGMUX

449 Views
Dev75
Contributor I

Hello,

I am a new developer using a Compulab MCM-IMX93 development system.  This ARM module and carrier board runs on a Yacto built kernel and incorporates the Freescale device tree and other.  I am trying to use the ADC to utilize the hardware trigger function to minimize measurement latency between start of conversion and signal rising edge on input.  I think the TRGMUX function and related registers is what I need for configuring this.  I am using Eclipse and GCC to develop the code.  Is there and help on knowing if the Freescale device tree drivers include this register mapping?  the device tree code is here:  https://github.com/compulab-yokneam/linux-compulab/blob/linux-compulab_v6.6.3/arch/arm64/boot/dts/co...

I suspect this functionality is in there, but I can't find info for actually trying to use it.

I suppose it would look something like this:

Dev75_1-1721299289530.png

 

Can someone please provide sample code for this or guidance?

Thanks,

 

0 Kudos
Reply
4 Replies

430 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Dev75 

 

Maybe you should refer to the i.mx93 adc driver, in your case as you are using a Compulab board, the driver should be under:

linux-compulab/drivers/iio/adc/imx93_adc.c

 

Unfortunately this  ADC driver  only provides the basic functions. The following features are supported:
• Four external inputs for each ADC controller channel
• 12 bit ADC
• Single conversion
• Hardware average
• Low power mode of ADC
• Sample rate changes in the available sample rate group

 

You should modify the driver or make a custom to your necessities , but i believe you can refer to the i.MX93 as start point.

 

I hope this can helps to you.

 

Best regards,

--... ...--

Salas.

0 Kudos
Reply

413 Views
Dev75
Contributor I
Hi Salas, Two quick clarifications: 1) There is another post from Compulab tech support asking forum about how to change the sample rate and what are valid values, as the firmware is rejecting my arguments as invalid even though one try was the same setting it was using. Not sure what is going on there but since you mentioned a valid group setting I thought I would ask. 2). Are you sure the adc.c driver is where the TRGMUX gpio manipulations would be, as it would seem to me it would be in a different source. As I mentioned I want to try the hardware trigger option for removing OS overhead delay. I'm sort of surprised that it seems not many have tried this as I see very little out there. Thank you for your support.
0 Kudos
Reply

409 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Dev75 

Unfortunately I am not sure if the compulap kernel and module works in the same way that the EVK (ADC driver), I assume Compulap based the kernel in i.MX93EVK kernel.

One can refer to chapter 4.1 ADC of the Linux Reference Manual.

There is described the driver location in kernel and capabilities.

In your case I believe you should contact compulab for your specific question because NXP does not support other boards, just NXP boards, in this case the EVK.

 

Best regards,

--... ...--

Salas.

0 Kudos
Reply

386 Views
Dev75
Contributor I
BTW, Can you confirm the FreScale adc library contains this functionality, as it may be already abstracted in the kernel build and the device tree may be limited in the scope as well as the adc.c driver. So if I know I can get there with the fsl library I have a target to then evolve into. Also, can you at least how provide sample code for how your EVK software is done for using TRGMUX for hardware adc trigger operation. Even though I may need to update my drivers seeing a real example will be very helpful. Thank you. BTW I have on-going queries with Compulab on this as well but it seems they come back to NXP forum for answers anyway. This is one reason why I think Freescale's adc driver is embedded at some level within their kernel build. Thanks very much and if you post an example of a working hardware adc trigger many others will be helped as I don't see any code posted on this. Thank you.
0 Kudos
Reply