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?
ATMEGA128/64 PWM build Error
Moderator: Benj
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
ATMEGA128/64 PWM build Error
- Attachments
-
- ATMEGA128 PWM build error.txt
- (2.76 KiB) Downloaded 147 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ATMEGA128/64 PWM build Error
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: ATMEGA128/64 PWM build Error
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ATMEGA128/64 PWM build Error
Hello,
If you look at the compiler messages then you should see this line.
If you look at the compiler messages then you should see this line.
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.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"
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: ATMEGA128/64 PWM build Error
Dear Benj,
Thanks. It is working fine now. i didn't see the warning message.
Karthick
Thanks. It is working fine now. i didn't see the warning message.
Karthick