What is the best timer?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

What is the best timer?

跳至解决方案
1,401 次查看
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

标签 (1)
0 项奖励
回复
1 解答
1,257 次查看
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 项奖励
回复
4 回复数
1,257 次查看
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 项奖励
回复
1,257 次查看
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 项奖励
回复
1,258 次查看
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 项奖励
回复
1,257 次查看
george
Senior Contributor II

Dear, Xiangjun

Your advice is a little different from our needs.

But you gave us enough hints.

Thanks,

George.

0 项奖励
回复