|
|
View previous topic :: View next topic |
Author |
Message |
Ttelmah
Joined: 11 Mar 2010 Posts: 19620
|
|
Posted: Mon Mar 08, 2021 11:19 am |
|
|
I just compiled a dummy project for your chip, with the clock selected
as you are doing, and the changes made to the processor file. It shows
it setting PLLFBD to 0x32, and CLKDIV to 3. So input divided by 5 to give
5MHz into the PLL, and then * 52 to give 260MHz out of the VCO. Then
divided by 2.
If you are not seeing these in the .LST file, you are not doing the changes
to the processor file (or to the include of this) correctly. Remember you
have to recompile after the changes. |
|
|
ArthurDavidov
Joined: 03 Mar 2021 Posts: 9
|
|
Posted: Tue Mar 09, 2021 1:29 pm |
|
|
I am grateful for your test.
Ttelmah wrote: | I just compiled a dummy project for your chip, with the clock selected
as you are doing, and the changes made to the processor file. It shows
it setting PLLFBD to 0x32, and CLKDIV to 3. So input divided by 5 to give
5MHz into the PLL, and then * 52 to give 260MHz out of the VCO. Then
divided by 2.
If you are not seeing these in the .LST file, you are not doing the changes
to the processor file (or to the include of this) correctly. Remember you
have to recompile after the changes. |
How did you find the PLLFBD & CLKDIV & VCO is divided by 2? Could you please copy here relevant assembly section?
Here is 'main' from my *.lst file:
.................... void main(void)
007D2: MOV #7F80,W15
007D4: MOV #7FFF,W0
007D6: MOV W0,20
007D8: NOP
007DA: BSET.B 8C1.7
007DC: DISI #6
007DE: MOV #742,W1
007E0: MOV #46,W2
007E2: MOV #57,W3
007E4: MOV.B W2L,[W1]
007E6: MOV.B W3L,[W1]
007E8: BCLR.B 742.6
007EA: MOV #65,W0
007EC: MOV W0,6C4
007EE: MOV #1,W0
007F0: MOV W0,692
007F2: DISI #6
007F4: MOV #742,W1
007F6: MOV #46,W2
007F8: MOV #57,W3
007FA: MOV.B W2L,[W1]
007FC: MOV.B W3L,[W1]
007FE: BSET.B 742.6
00800: MOV #32,W4
00802: MOV W4,746
00804: MOV #3,W4
00806: MOV W4,744
00808: DISI #E
0080A: MOV #103,W0
0080C: MOV #743,W1
0080E: MOV #78,W2
00810: MOV #9A,W3
00812: MOV.B W2L,[W1]
00814: MOV.B W3L,[W1]
00816: MOV.B W0L,743
00818: LSR W0,#8,W0
0081A: MOV #742,W1
0081C: MOV #46,W2
0081E: MOV #57,W3
00820: MOV.B W2L,[W1]
00822: MOV.B W3L,[W1]
00824: MOV.B W0L,[W1]
00826: CLR 1000
00828: MOV #FFFF,W0
0082A: MOV #FFFF,W1
0082C: MOV W0,1044
0082E: MOV W1,1046
00830: MOV #0,W4
00832: MOV W4,2048
00834: CLR 100
00836: CLR 104
00838: SETM 102
0083A: MOV #8030,W4
0083C: MOV W4,104
0083E: BCLR.B 800.3
00840: CLR E1E
00842: CLR E2E
00844: CLR E3E
00846: CLR E4E
00848: CLR E6E |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 09, 2021 7:07 pm |
|
|
Here is a tip. Post your .LST file segment in Symbolic mode.
It's easier to understand and interpret code when in that mode.
Here are instructions from Ttelmah showing how to change the compiler
(when using the CCS IDE) to use Symbolic mode:
Ttelmah wrote: |
Options
Project
Output Files
Then in the column 'List File', tick the box 'Symbolic' and apply.
|
Then re-compile and re-post your code. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19620
|
|
Posted: Wed Mar 10, 2021 12:44 am |
|
|
In non symbolic mode you just need to look for the addresses. So:
Code: |
//This is the bit doing the clock settings.
00800: MOV #32,W4 //50 into W4
00802: MOV W4,746 //Now 50 into the PLLFBD register
00804: MOV #3,W4 //now 3 into W4
00806: MOV W4,744 //into the CLKDIV register
00808: DISI #E
0080A: MOV #103,W0
0080C: MOV #743,W1
0080E: MOV #78,W2
00810: MOV #9A,W3
00812: MOV.B W2L,[W1]
00814: MOV.B W3L,[W1]
|
The data sheet tells you the addresses for all the registers. |
|
|
ArthurDavidov
Joined: 03 Mar 2021 Posts: 9
|
|
Posted: Wed Mar 10, 2021 1:31 am |
|
|
Ttelmah - thank you very much!
PCM programmer wrote: | Here is a tip. Post your .LST file segment in Symbolic mode.
It's easier to understand and interpret code when in that mode.
Here are instructions from Ttelmah showing how to change the compiler
(when using the CCS IDE) to use Symbolic mode:
Ttelmah wrote: |
Options
Project
Output Files
Then in the column 'List File', tick the box 'Symbolic' and apply.
|
Then re-compile and re-post your code. |
I got the disassembly code and looks the same (compared the content):
.................... void main(void)
007D2: MOV #7F80,W15
007D4: MOV #7FFF,W0
007D6: MOV W0,20
007D8: NOP
007DA: BSET.B 8C1.7
007DC: DISI #6
007DE: MOV #742,W1
007E0: MOV #46,W2
007E2: MOV #57,W3
007E4: MOV.B W2L,[W1]
007E6: MOV.B W3L,[W1]
007E8: BCLR.B 742.6
007EA: MOV #65,W0
007EC: MOV W0,6C4
007EE: MOV #1,W0
007F0: MOV W0,692
007F2: DISI #6
007F4: MOV #742,W1
007F6: MOV #46,W2
007F8: MOV #57,W3
007FA: MOV.B W2L,[W1]
007FC: MOV.B W3L,[W1]
007FE: BSET.B 742.6
00800: MOV #32,W4
00802: MOV W4,746
00804: MOV #3,W4
00806: MOV W4,744
00808: DISI #E
0080A: MOV #103,W0
0080C: MOV #743,W1
0080E: MOV #78,W2
00810: MOV #9A,W3
00812: MOV.B W2L,[W1]
00814: MOV.B W3L,[W1]
00816: MOV.B W0L,743
00818: LSR W0,#8,W0
0081A: MOV #742,W1
0081C: MOV #46,W2
0081E: MOV #57,W3
00820: MOV.B W2L,[W1]
00822: MOV.B W3L,[W1]
00824: MOV.B W0L,[W1]
00826: CLR 1000
00828: MOV #FFFF,W0
0082A: MOV #FFFF,W1
0082C: MOV W0,1044
0082E: MOV W1,1046
00830: MOV #0,W4
00832: MOV W4,2048
00834: CLR 100
00836: CLR 104
00838: SETM 102
0083A: MOV #8030,W4
0083C: MOV W4,104
0083E: BCLR.B 800.3
00840: CLR E1E
00842: CLR E2E
00844: CLR E3E
00846: CLR E4E
00848: CLR E6E |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19620
|
|
Posted: Wed Mar 10, 2021 2:45 am |
|
|
Did you 'Apply'.
Needs to happen.
With symbolic mode selected, the compiler will put register names in
to replace the addresses. |
|
|
ArthurDavidov
Joined: 03 Mar 2021 Posts: 9
|
|
Posted: Wed Mar 10, 2021 3:25 am |
|
|
I tried to do the same with 2 different PCs:
I clicked on 'apply' then cleared output files and built all again.
But nothing has been changed in the *.lst file.
Maybe I need to check something else? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9297 Location: Greensville,Ontario
|
|
Posted: Wed Mar 10, 2021 6:33 am |
|
|
While I don't use it...
..from your screenshot...
...maybe try checking 'SFR NAMES' in the 'List File' box ?? |
|
|
ArthurDavidov
Joined: 03 Mar 2021 Posts: 9
|
|
Posted: Wed Mar 10, 2021 8:41 am |
|
|
Thank you all very much!! |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|