Page 1 of 1

ATMEGA128/64 PWM build Error

Posted: Thu Jun 14, 2018 6:36 am
by karthickefy
Hi Matrix Team,
When I'm using PWM function, I face build error while compiling hex with ATMEGA128 MCU . Attached is the error report. I'm facing this compiling error only if I used PWM function with ATMEGA128 MCU. Do I need to declare any function? Can you please guide me to resolve this issues?

Re: ATMEGA128/64 PWM build Error

Posted: Thu Jun 14, 2018 10:36 am
by Benj
Hello,

Thanks for letting us know. I've hopefully now fixed the problem and pushed the change to the v8 update system.

Let us know how you get on.

Re: ATMEGA128/64 PWM build Error

Posted: Fri Jun 15, 2018 10:25 am
by karthickefy
HI Benj,
Thank you very much. Now PWM is working with ATMEGA128 . But I cannot control the frequency and Duty cycle. I'm not sure whether I may made some mistakes in my program. Please find the attached code and Logic analyzer's PWM data. Please guide me. Thanks

Re: ATMEGA128/64 PWM build Error

Posted: Fri Jun 15, 2018 5:53 pm
by Benj
Hello,

If you look at the compiler messages then you should see this line.
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\/AVR\AVR_CAL_PWM.c:495:3: warning: #warning "Period control register not available on target device, period will default to 255 + 1"
In your loop you are calling ChangePeriod but as the warning message states the device does not have the period register and so it cannot be altered. Maybe try a different PWM channel as the other channels seem more standard.

Re: ATMEGA128/64 PWM build Error

Posted: Wed Jun 20, 2018 5:08 am
by karthickefy
Dear Benj,
Thanks. It is working fine now. i didn't see the warning message.

Karthick