Sample code of Ctimer not executing in LPCXpresso845max board

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

Sample code of Ctimer not executing in LPCXpresso845max board

1,201 Views
vidhya1
Contributor III

Hi,


I'm using keil IDE and testing the sample code  of Ctimer_pwm[LPC845 MCU], using OM13097 development board,

and as read in the README.txt before compiling the code, given as " OUT_PORT.OUT_BIT connected to IN_PORT (defined in Ctimer_PWM.h)"

&

"The output pin is connected externally to another pin, IN_PORT, which is assigned to Capture 0 via the switch matrix.
- The CTIMER is configured for external count mode, incrementing on both edges of Capture 0."


Kindly suggest how to test the sample code of Ctimer output.,since on the above mentioned port pins i'm not

getting the output PWM.


Thank you

Labels (1)
0 Kudos
8 Replies

984 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Before answering your question, whether you can tell me which demo code you tested.

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

984 Views
vidhya1
Contributor III

Please find the attached sample zip codes, I'm referring

this sample codes to implement for my application.

0 Kudos

984 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thanks for your reply.
In the WKT_IRQHandler() function, it would toggle the P0_25 to output the PWM, connecting the P0_25 to P0_24, then CTimer's counter can increase on the rising or falling edges on the P0_24 (T0_CAP0).
So to test the CTimer_PWM demo, you should connect the P0_25 to P0_24 as the below figure shows.

pastedImage_1.png

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

984 Views
vidhya1
Contributor III

Hi,

I have done this connection previously and checked but not getting the

PWM signal on P0.24 pin and also on P0.25 pin, is the sample codes

attached is correct?

0 Kudos

984 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thanks for your reply.
Yes, the demo code is correct.
As I said before, the P0_25 will output PWM after the code runs.

pastedImage_1.png

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

984 Views
vidhya1
Contributor III

Hi,

Can you please suggest me what is the issue with the sample

code, since i'm not getting the PWM output in the mentioned port yet,

and also same problem i'm facing with sctimer sample code's.

In Ctimer_PWM sample code after connecting P0_24 TO P0_25th pin,

testing the PWM in Arduino Receptacles of digital pin D1.

But not getting PWM output signal, Kindly let me know if there

any setting should be changed in the keil IDE, i'm using V5.26 version.

Thank you

On Mon, Apr 29, 2019 at 2:00 PM Vidhya Murthy <vidyaamurthy@gmail.com>

0 Kudos

984 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thanks for your reply.
It's a bit weird, the CTimer_PWM demo runs well on the LPC845 MAX (Rev 2) board on my site.
Whether you have other LPC845 MAX boards and this phenomenon also happen when testing other boards.
Meanwhile, I'd like to suggest you download the most updated version of the example code bundle for testing.
https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/lpc-corte...

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

984 Views
vidhya1
Contributor III

Thanks for the reply,

But I have cross checked the sample code and done the connections, but not

getting the

PWM on P0_25, after code execution.

Will check again.

Thank you

0 Kudos