MCXA153VLH ADC trigger

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

MCXA153VLH ADC trigger

Jump to solution
1,207 Views
_Ferrari_
Contributor V

I am developing a project based on the MCXA153VLH microprocessor and I need to sample an analog signal at regular time intervals.

I thought about using a timer to act as a trigger to start the conversion. At the end of the conversion, the analog-to-digital converter should generate an interrupt to signal the end of the conversion and the availability of the data to be converted.

I have already used a similar technique with the LPC5526 microprocessor with excellent results. In that project, I used timer 4, associating the start of the conversion with trigger 9.

Unfortunately, I cannot find which trigger number is associated with a timer that starts the AD conversion on the MCXA153VLH microprocessor.

Could you provide me with detailed information?

Thank you and have a good day.

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
868 Views
Alice_Yang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
5 Replies
1,152 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @_Ferrari_ 

There is also a timer-triggered ADC on the MCXA153; please refer to it.

MCXA153 RM ->

 13.5.1.11 ADC Trigger input connections (ADC0_TRIG0 - ADC0_TRIG3)

Alice_Yang_0-1755771953163.png

 

BR

Alice

 

0 Kudos
Reply
1,140 Views
_Ferrari_
Contributor V

Thank you very much for your answer.

Just another question: what is the correct number to put in the ADC trigger configuration 

_Ferrari__1-1755778454494.png

to have CTimer0_MAT0 as ADC input trigger ?

Thank you for your help and cooperation,

regards

 

Tags (3)
0 Kudos
Reply
1,099 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @_Ferrari_ 

The MCXA153 features four ADC trigger input registers, namely ADC0_TRIG0 to ADC0_TRIG3. You can utilize any one of these registers, meaning you can input values 0, 1, 2, or 3.

 

Thank you.

 

BR

Alice

 

0 Kudos
Reply
1,080 Views
_Ferrari_
Contributor V

Thank you for your answer!

I need to write a number from zero to 3, which identifies one of the registers:
0 for ADC0_TRIG0
 1 for ADC0_TRIG1
2 for ADC0_TRIG2
3 for ADC0_TRIG3

If I've understood correctly, into one of these registers, for example ADC0_TRIG0, I need to write the TRIGIN data, which should be 00_1001b (CTimer0_MAT0 input is selected).

I can't figure out how to write the 00_1001b data into the ADC0_TRIG0 register using the Peripherals tool in MCUXpresso IDE.

Could you please explain how to do it?
Thanks, and have a good day.

Tags (3)
0 Kudos
Reply
869 Views
Alice_Yang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2155041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCXA153VLH%20%20ADC%20trigger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2155041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20developing%20a%20project%20based%20on%20the%20MCXA153VLH%20microprocessor%20and%20I%20need%20to%20sample%20an%20analog%20signal%20at%20regular%20time%20intervals.%3C%2FP%3E%3CP%3EI%20thought%20about%20using%20a%20timer%20to%20act%20as%20a%20trigger%20to%20start%20the%20conversion.%20At%20the%20end%20of%20the%20conversion%2C%20the%20analog-to-digital%20converter%20should%20generate%20an%20interrupt%20to%20signal%20the%20end%20of%20the%20conversion%20and%20the%20availability%20of%20the%20data%20to%20be%20converted.%3C%2FP%3E%3CP%3EI%20have%20already%20used%20a%20similar%20technique%20with%20the%20LPC5526%20microprocessor%20with%20excellent%20results.%20In%20that%20project%2C%20I%20used%20timer%204%2C%20associating%20the%20start%20of%20the%20conversion%20with%20trigger%209.%3C%2FP%3E%3CP%3EUnfortunately%2C%20I%20cannot%20find%20which%20trigger%20number%20is%20associated%20with%20a%20timer%20that%20starts%20the%20AD%20conversion%20on%20the%20MCXA153VLH%20microprocessor.%3C%2FP%3E%3CP%3ECould%20you%20provide%20me%20with%20detailed%20information%3F%3C%2FP%3E%3CP%3EThank%20you%20and%20have%20a%20good%20day.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2155041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2159087%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXA153VLH%20%20ADC0%20TRIGGER%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2159087%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202847%22%20target%3D%22_blank%22%3E%40_Ferrari_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDetail%20steps%20please%20refer%20to%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCUXpresso-Config-Tools%2FLPC553x-configure-ADC-hardware-trigger-sources%2Fm-p%2F1731393%23M1731%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCUXpresso-Config-Tools%2FLPC553x-configure-ADC-hardware-trigger-sources%2Fm-p%2F1731393%23M1731%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Alice_Yang_0-1756289139928.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Alice_Yang_0-1756289139928.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F354365i33F54ADA622C7AAA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Alice_Yang_0-1756289139928.png%22%20alt%3D%22Alice_Yang_0-1756289139928.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EAlice%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156786%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3EMCXA153VLH%20%20ADC0%20TRIGGER%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156786%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20your%20answer!%3C%2FP%3E%3CP%3EI%20need%20to%20write%20a%20number%20from%20zero%20to%203%2C%20which%20identifies%20one%20of%20the%20registers%3A%3CBR%20%2F%3E0%20for%20ADC0_TRIG0%3CBR%20%2F%3E%26nbsp%3B1%20for%20ADC0_TRIG1%3CBR%20%2F%3E2%20for%20ADC0_TRIG2%3CBR%20%2F%3E3%20for%20ADC0_TRIG3%3C%2FP%3E%3CP%3EIf%20I've%20understood%20correctly%2C%20into%20one%20of%20these%20registers%2C%20for%20example%20ADC0_TRIG0%2C%20I%20need%20to%20write%20the%20TRIGIN%20data%2C%20which%20should%20be%2000_1001b%20(CTimer0_MAT0%20input%20is%20selected).%3C%2FP%3E%3CP%3EI%20can't%20figure%20out%20how%20to%20write%20the%2000_1001b%20data%20into%20the%20ADC0_TRIG0%20register%20using%20the%20Peripherals%20tool%20in%20MCUXpresso%20IDE.%3C%2FP%3E%3CP%3ECould%20you%20please%20explain%20how%20to%20do%20it%3F%3CBR%20%2F%3EThanks%2C%20and%20have%20a%20good%20day.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156464%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXA153VLH%20%20ADC%20trigger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156464%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202847%22%20target%3D%22_blank%22%3E%40_Ferrari_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20MCXA153%20features%20four%20ADC%20trigger%20input%20registers%2C%20namely%20ADC0_TRIG0%20to%20ADC0_TRIG3.%20You%20can%20utilize%20any%20one%20of%20these%20registers%2C%20meaning%20you%20can%20input%20values%200%2C%201%2C%202%2C%20or%203.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EThank%20you.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3EBR%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAlice%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156067%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3EMCXA153VLH%20%20ADC%20trigger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156067%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20very%20much%20for%20your%20answer.%3C%2FP%3E%3CP%3EJust%20another%20question%3A%20what%20is%20the%20correct%20number%20to%20put%20in%20the%20ADC%20trigger%20configuration%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22_Ferrari__1-1755778454494.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22_Ferrari__1-1755778454494.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353519i4C9E5146EDC9B2E0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22_Ferrari__1-1755778454494.png%22%20alt%3D%22_Ferrari__1-1755778454494.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eto%20have%26nbsp%3BCTimer0_MAT0%20as%20ADC%20input%20trigger%20%3F%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help%20and%20cooperation%2C%3C%2FP%3E%3CP%3Eregards%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156004%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCXA153VLH%20%20ADC%20trigger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156004%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202847%22%20target%3D%22_blank%22%3E%40_Ferrari_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThere%20is%20also%20a%20timer-triggered%20ADC%20on%20the%20MCXA153%3B%20please%20refer%20to%20it.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EMCXA153%20RM%20-%26gt%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B13.5.1.11%20ADC%20Trigger%20input%20connections%20(ADC0_TRIG0%20-%20ADC0_TRIG3)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Alice_Yang_0-1755771953163.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Alice_Yang_0-1755771953163.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353506i5EB1D676DB4A03DE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Alice_Yang_0-1755771953163.png%22%20alt%3D%22Alice_Yang_0-1755771953163.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EAlice%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E