LPC43xx SCTimer hardware trigger problem

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

LPC43xx SCTimer hardware trigger problem

422 Views
rickrigby
Contributor II

I'm trying to start the SC Timer on my LPC43xx OM13084 eval board using a hardware trigger pulse. I've wired J7 pin 12(P2_5) to a signal generating a 10us pulse. I've connected J7 pin 6(ADC_2) to a DC voltage. I've setup the SCTimer to start an 80us delay on trigger pin P2_5/GPIO5[5]. The timer match sets CTOUT8 which is set as the ADC1 trigger. With this setup I have successfully used a GPIO interrupt on P2_5/GPIO5[5], FUNC4 to trigger an ADC_1 reading. (Of course, FUNC3, directly to ADCTRIG1 works also). This tells me the signal is getting into the MCU no problem. I want to use FUNC1 of P2_5/GPIO5[5] to start the SCTimer, but I don't seem to be able to get that to work. I have tried everything I can think of and no luck. Please let me know which simple setting I've missed. I've attached my project, there are 2 build modes, just comment/uncomment the #defines at the top of the adc.c module. One build is for the GPIO mode, the other SCTimer start mode.The scope picture shows the 10us trigger in purple, two pulses from the GPIO Interrupt routine and then the ADC1 interrupt routine in yellow. The blue is the analog voltage I need to measure but that doesn't matter.

I'm not sure if I need an SCTimer_IRQ function or not & I have no idea why I can't make it work. I've used this same technique on an LPC11U68 without a problem.

Labels (1)
0 Kudos
1 Reply

292 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Rick Rigby,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.

Comparing with the LPC11U68, you also should configure the SCT CTIN2 pin in the CTIN_2_IN register while using LPC43xx and you can learn the more information in the Chapter 18 in the UM10503.

https://www.nxp.com/docs/en/user-guide/UM10503.pdf?fsrch=1&sr=1&pageNum=1

Hope it helps.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos