What is the best timer?

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

What is the best timer?

Jump to solution
688 Views
george
Senior Contributor II

Hi all,

We are developing the product using LPC54608.

The synchronization between Internal ADC and External Logic is very important for our product.

We want to use the timer which LPC has and to generate timing as shown in the following figure.

pastedImage_1.png

Please let me know timer which was suitable in order to generate such a timing signal.

Best Regards,

George

Labels (1)
0 Kudos
1 Solution
544 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, George,

Regarding your question that you want to implement a divider by TWO with Timer and use the Timer output signal to trigger ADC converter, I think you can use on-chip CTimerx to implement it, and the CTimerx output signal can trigger ADC.

For example, as the above Figure, the CTimer0_MAT3 can trigger ADC, so you can use CTimer3_MAT3 to trigger ADC. You can configure the CTimer0 to count your external clock in Timer mode, set the modulo value(match value) as 1, when the CTimer0 counter reaches up to 1, toggle the external pin. In this way, the CTimer external pin signal is the 2 divider. But I do not know whether it is possible to set the modulo as 1, you have to have a try.

BR

Xiangjun Rong

View solution in original post

0 Kudos
4 Replies
544 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, George,

First of all, the ADC converter of LPC546xx supports the external pin triggering mode.

 In other words, you can connect the ADC external triggering signal to any PIO0_x or PIO1_x, in detail, PIO0_0~ PIO0_31 or PIO1_0 ~ PIO1_31, but you can not connect the other pins.

For example, you can connect the external triggering signal to PIO0_0, you can select the GINT0 by set the SEQA_CTRL[TRIGGER]=1. If you want to have the external trigger signal WITHOUT synchronization as you desired, you have to set the SYNCBYPASS bit by SEQA_CTRL[SYNCBYPASS ]=1. If you want  negative edge trigger, set SEQA_CTRL[TRIGPOL]=0. Regarding the pin setting, you can set the PORT_POL0[0]=0, PORT_ENA0[0]=1

For detailed inf, pls refer to Chapter 14: LPC546xx Group GPIO input interrupt (GINT0/1) in UM10912.pdf

Hope it can help you

BR

XiangJun Rong

pastedImage_2.png

0 Kudos
544 Views
george
Senior Contributor II

Dear xiangjun.rong

Sorry for late reply.

What we want to know is not how to use ADC.

Whether synchronized signals with different cycles can be generated using only the built-in timer.

External logic is required at twice the frequency for the ADC.

Please tell me how to use the timer to make it possible.

BR, 

George.

0 Kudos
545 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, George,

Regarding your question that you want to implement a divider by TWO with Timer and use the Timer output signal to trigger ADC converter, I think you can use on-chip CTimerx to implement it, and the CTimerx output signal can trigger ADC.

For example, as the above Figure, the CTimer0_MAT3 can trigger ADC, so you can use CTimer3_MAT3 to trigger ADC. You can configure the CTimer0 to count your external clock in Timer mode, set the modulo value(match value) as 1, when the CTimer0 counter reaches up to 1, toggle the external pin. In this way, the CTimer external pin signal is the 2 divider. But I do not know whether it is possible to set the modulo as 1, you have to have a try.

BR

Xiangjun Rong

0 Kudos
544 Views
george
Senior Contributor II

Dear, Xiangjun

Your advice is a little different from our needs.

But you gave us enough hints.

Thanks,

George.

0 Kudos