CodeWarrior keeps giving PWM configuration errors

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

CodeWarrior keeps giving PWM configuration errors

1,377 Views
shouminliu
Contributor II

I set up a simple project for K10 and add a PWM component to it. No matter what I try, CodeWarrior keeps giving me configuration errors. Please refer to the attached image. The two red lines are the errors. Please let me know if you have any suggestions. Thank you.

 

-SL

Labels (1)
0 Kudos
5 Replies

1,112 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

there is no problem to set 500ms period on my side. see attached project.

pastedImage_0.png

if this can not solve your problem, please send your demo project. thus we can know your problem on your specific project. thanks!


Have a great day,
Zhang Jun

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

0 Kudos

1,112 Views
shouminliu
Contributor II

Hello Jennie,

Thank you for the reference project. I could not figure out what was wrong with my project, so I deleted it and started all over again from scratch. This time it works. I can set the period and the duty cycle properly now.

I have another question though. Is there a way to use both the rising and falling edges of a PWM signal as interrupt sources? What I would like to do is to set up a GPIO and to use the rising and falling edges of a PWM signal to control the output level of that GPIO. For example, the rising edge of pin 44 (PWM) triggers an interrupt and the ISR drives pin 61 (GPIO) low. Conversely, the falling edge of pin 44 triggers another interrupt and the ISR drives pin 61 high. I only see a PWM_OnEnd event in CodeWarrior and am not quite sure if it is a rising edge interrupt or a falling edge interrupt. Could you please let me know if this achievable? If it is, how can I configure the components in CodeWarrior?

Thanks,

SL

0 Kudos

1,112 Views
josesantos
Contributor II

I'm using MC9S08AW16 and I'm starting  with CodeWorrior 6.3. My doubt is: in the generated code "MCUint.inc" the compiler not include this file

I want a pratical example for this

thanks for attention

0 Kudos

1,112 Views
josesantos
Contributor II

dear  Shoumin Liu, excuse replied in the wrong field

0 Kudos

1,112 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Liu,

Please click the  ... button to select the period .

pastedImage_0.png

Hope it helps


Have a great day,
Alice

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

0 Kudos