View previous topic :: View next topic |
Author |
Message |
newguy
Joined: 24 Jun 2004 Posts: 1907
|
v 5.108 typo in processor header file (PIC18F24Q10) |
Posted: Sun Jul 09, 2023 9:42 am |
|
|
I alerted CCS to this issue. Not sure if it exists in the latest version or not.
In PIC18F24Q10.h, line 961:
#define CWG_INPUT_PMW4 0x4000
Obviously it should be PWM4. Only reason I found this is that I migrated existing code developed on a different processor to this one, and the compiler complained about CWG_INPUT_PWM4 being undefined. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Sun Jul 09, 2023 10:24 am |
|
|
No, that isn't an error.
What makes you think 'it should be PWM4'?.
This is to setup the waveform generator input to _use_ this PWM.
Understand that unlike most of the older chips where you setup the CCP
to generate the PWM's, this chip has a dedicated PWM module. Needs to
be setup with setup_pwm3 and setup_pwm4 (or with #use).
The chip only has PWM1 and PWM2 available with the CCP's.
PWM3 and 4 use the dedicated module. These are only PWM's, not CCP's,
so doesn't need to be told to be a PWM.
There are some configuration entries missing for PWM4 on your compiler,
so for example the timer gates and resets, and not all the DSM settings
are actually there, but the one you are pointing to is not an error. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Sun Jul 09, 2023 11:46 am |
|
|
No it's definitely an error. The line above it is:
#define CWG_INPUT_PWM3 0x3000
Those 2 lines from the other processor have both spelled as PWM.
....I think I know now where the confusion lays....
I'm not saying that the define should become solely PWM4, I'm saying they should correct the spelling to:
CWG_INPUT_PWM4 from CWG_INPUT_PMW4
Note the WM / MW order. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Mon Jul 10, 2023 12:21 am |
|
|
Fair enough. PMW, not PWM.
Honestly just add your own define till they fix it. |
|
|
|