-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest3.rtf
executable file
·2146 lines (1875 loc) · 76 KB
/
test3.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fnil MS Sans Serif;}{\f1\fnil\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fnil Times New Roman;}{\f4\fswiss\fprq2 Arial;}}
{\colortbl\red0\green0\blue0;\red0\green0\blue128;\red255\green0\blue0;}
\deflang1031\pard\plain\f4\fs28\cf0 DAvE's Project Documentation
\par \plain\f4\fs22\cf0
\par \plain\f4\fs22\cf0 Project: \tab\tab\b test3.dav
\par
\par \plain\f4\fs22\cf0 Controller: \tab\tab\b XC2267M-104F80
\par \plain\f4\fs22\cf0 Compiler: \tab\tab\b Keil
\par \plain\f4\fs22\cf0 Memory Model: \tab\b SMALL
\par
\par \plain\f4\fs22\cf0 Date: \tab\tab\tab\b 2018/11/1 16:59:49
\par
\par
\par \plain\f4\fs22\cf2\b Please read this document carefully and note
\par \plain\f4\fs22\cf2\b the red-colored hints.
\par
\par \plain\f4\fs22\cf2\b If you miss a file in the generated files list
\par \plain\f4\fs22\cf2\b maybe you have forgotten to select the
\par \plain\f4\fs22\cf2\b initialisation function of the related module.
\par
\par \plain\f4\fs22\cf0 Generated Files:
\plain\f4\fs20\cf0\b
\par \tab\tab\tab MAIN.H
\par \tab\tab\tab MAIN.C
\par \tab\tab\tab SCS.H
\par \tab\tab\tab SCS.C
\par \tab\tab\tab XC22XXMREGS.H
\par \tab\tab\tab IO.H
\par \tab\tab\tab IO.C
\par \tab\tab\tab GPT1.H
\par \tab\tab\tab GPT1.C
\par \tab\tab\tab GPT2.H
\par \tab\tab\tab GPT2.C
\par \tab\tab\tab ADC1.H
\par \tab\tab\tab ADC1.C
\par \tab\tab\tab CAN.H
\par \tab\tab\tab CAN.C
\par
\par
\par \plain\f4\fs20\cf0
\par \plain\f4\fs28\cf0\ul Project Settings
\par
\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0
\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void MAIN_vInit(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This function initializes the microcontroller.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void MAIN_vUnlockProtecReg(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This function makes it possible to write one protected
\par \tab \tab register.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void MAIN_vLockProtecReg(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This function makes it possible to lock one protected
\par \tab \tab register.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void main(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This is the main function.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs24\cf0 Initialization:
\par \plain\f4\fs20\cf0\b
\par
\tab Configuration of the System Clock:\par
\tab - VCO clock used, input clock is connected\par
\tab - input frequency is 8.00 MHz\par
\tab - configured system frequency is 80.00 MHz\par
\tab - system clock is 80.00MHz\par
\par
\par \plain\f4\fs20\cf0
\par \plain\f4\fs28\cf0\ul Project Settings
\par
\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0
\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_EnableOscHiPrecCrystal(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function configures the high precision
\par \tab \tab oscillator for crystal mode.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_RestartVcoLockDetect(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function restarts the VCO lock detection.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_DisconnectVcoInput(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function disconnects VCO from its clock
\par \tab \tab input.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_ConnectVcoInput(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function connects VCO from its clock
\par \tab \tab input.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_SelectVcoBand(unsigned int VcoBand)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function sets the required VCO band.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab VcoBand: 0 or 1
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_StartTimer(unsigned int Cycles)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function starts timer T13 for counting
\par \tab \tab a certain number of clocks.
\par \tab \tab Notes:
\par \tab \tab - It is assumed that the timer is already initialized by
\par \tab \tab SCS_InitTimer.
\par \tab \tab - Cycles < 3 are set to 3 for hardware reasons.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab Cycles: Number of T13 clocks to count, 0...65535
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab inline void SCS_DelayByTimer(unsigned int Cycles)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function starts timer T13 and waits until
\par \tab \tab the specified number of clocks is counted.
\par \tab \tab Notes:
\par \tab \tab - It is assumed that the timer is already initialized by
\par \tab \tab SCS_InitTimer.
\par \tab \tab - Cycles < 3 are set to 3 for hardware reasons.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab Cycles: Number of T13 clocks to count, 0...65535
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_RampUpPllInNormalMode (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This private function performs a ramp-up of the PLL in
\par \tab \tab Normal Operation Mode.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_GoFromBaseToNormalMode (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This use case function performs a transition from Base Mode
\par \tab \tab to Normal Operation Mode.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register
\par \tab \tab protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void SCS_InitTimer (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This function configures CCU6 timer T13 as one-shot timer with
\par \tab \tab a resolution of 16 CCU6 clocks = 16 system clocks.
\par \tab \tab Notes:
\par \tab \tab - The function will enable CCU6 and will overwrite previous
\par \tab \tab settings for T13.
\par \tab \tab - The function will save the previous CCU6 register contents;
\par \tab \tab they may be restored via SCS_RestoreTimer.
\par \tab \tab - The user must call this function before any other SCS driver
\par \tab \tab function. (except SCS_SelectBandgapHiPrec if needed).
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void SCS_RestoreTimer (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function restores the old CCU6 register
\par \tab \tab values.
\par \tab \tab Notes:
\par \tab \tab - It is assumed that the CCU6 registers have been saved by
\par \tab \tab execution of SCS_InitTimer.
\par \tab \tab - The function will stop and clear T13.
\par \tab \tab - The user may call this function after the last SCS driver
\par \tab \tab function.
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_CheckFreqOscHiPrec (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function checks the high precision
\par \tab \tab oscillator for valid output frequency.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_ApplyNewPDiv (unsigned int PDiv)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function applies a new P divider value to
\par \tab \tab the PLL frequency.
\par \tab \tab Notes:
\par \tab \tab - If the divider is already set to the specified value, the
\par \tab \tab function will return immediately without error.
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab PDiv: P divider value
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_ApplyNewNDiv (unsigned int NDiv)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function applies a new N divider value to
\par \tab \tab the PLL frequency.
\par \tab \tab Notes:
\par \tab \tab - If the divider is already set to the specified value, the
\par \tab \tab function will return immediately without error.
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab NDiv: N divider value
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_ApplyNewK1Div (unsigned int K1Div)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function applies a new K1 divider value to
\par \tab \tab the PLL frequency.
\par \tab \tab Notes:
\par \tab \tab - If the divider is already set to the specified value, the
\par \tab \tab function will return immediately without error.
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab K1Div: K1 divider value
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_ApplyNewK2Div (unsigned int K2Div)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function applies a new K2 divider value to
\par \tab \tab the PLL frequency.
\par \tab \tab Notes:
\par \tab \tab - If the divider is already set to the specified value, the
\par \tab \tab function will return immediately without error.
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab K2Div: K2 divider value
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_SelectVcoSrcOscHiPrec (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function selects the high precision
\par \tab \tab oscillator as the source for the VCO.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_EnableVcoLockEmerg (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function enables the VCO loss-of-lock
\par \tab \tab emergency handling.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_DisableVcoBypass (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function disables VCO bypass.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab SCS_ErrorType SCS_EnableVcoBypass (void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This expert level function enables VCO bypass.
\par \tab \tab Notes:
\par \tab \tab - The user is responsible for disabling the register protection.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b Error code\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par \plain\f4\fs20\cf0
\par \plain\f4\fs28\cf0\ul Parallel Ports
\par
\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0
\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void IO_vInit(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This is the initialization function of the IO function
\par \tab \tab library. It is assumed that the SFRs used by this library
\par \tab \tab are in reset state.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs24\cf0 Initialization:
\par \plain\f4\fs20\cf0\b
\par
\tab Configuration of Port P0:\par
\tab P0.4 is used as alternate input for the CAN1 Receive input(RXDC1B)\par
\tab P0.5 is used as general purpose output\par
\tab - push/pull output is selected\par
\tab - the pin status is low level\par
\tab P0.6 is used as alternate output for the CAN1 Transmit Output(TXDC1A)\par
\tab - push/pull output is selected\par
\par
\tab P0.0 - P0.3 output driver characteristic: strong driver\par
\tab P0.4 - P0.7 output driver characteristic: strong driver\par
\par
\tab P0.0 - P0.3 output edge characteristic: sharp edge mode\par
\tab P0.4 - P0.7 output edge characteristic: sharp edge mode\par
\par
\tab Configuration of Port P1:\par
\tab - no pin of port P1 is used\par
\par
\tab Configuration of Port P2:\par
\tab P2.0 is used as alternate input for the CAN0 Receive input(RXDC0C)\par
\tab P2.1 is used as alternate output for the CAN0 Transmit output(TXDC0C)\par
\tab - push/pull output is selected\par
\par
\tab P2.0 - P2.3 output driver characteristic: strong driver\par
\tab P2.4 - P2.7 output driver characteristic: strong driver\par
\tab P2.8 - P2.13 output driver characteristic: strong driver\par
\par
\tab P2.0 - P2.3 output edge characteristic: sharp edge mode\par
\tab P2.4 - P2.7 output edge characteristic: sharp edge mode\par
\tab P2.8 - P2.13 output edge characteristic: sharp edge mode\par
\par
\tab Configuration of Port P4:\par
\tab P4.2 is used as alternate output for the CAN2 Transmit output(TXDC2B)\par
\tab - push/pull output is selected\par
\tab P4.3 is used as alternate input for the CAN2 Receive inputA(RXDC2A)\par
\par
\tab P4.0 - P4.3 output driver characteristic: strong driver\par
\par
\tab P4.0 - P4.3 output edge characteristic: sharp edge mode\par
\par
\tab Configuration of Port P5:\par
\tab P5.10 is used as general input\par
\tab P5.11 is used as general input\par
\tab P5.13 is used as general input\par
\tab P5.15 is used as general input\par
\par
\tab Configuration of Port P6:\par
\tab P6.0 is used as general purpose output\par
\tab - push/pull output is selected\par
\tab - the pin status is low level\par
\tab P6.1 is used as general input\par
\tab - pull device is tristate\par
\par
\tab P6.0 - P6.2 output driver characteristic: strong driver\par
\par
\tab P6.0 - P6.2 output edge characteristic: sharp edge mode\par
\par
\tab Configuration of Port P7:\par
\tab P7.1 is used as general input\par
\tab - pull device is tristate\par
\tab P7.2 is used as general input\par
\tab - pull device is tristate\par
\par
\tab P7.0 - P7.3 output driver characteristic: strong driver\par
\tab P7.4 - P7.4 output driver characteristic: strong driver\par
\par
\tab P7.0 - P7.3 output edge characteristic: sharp edge mode\par
\tab P7.4 - P7.4 output edge characteristic: sharp edge mode\par
\par
\tab Configuration of Port P10:\par
\tab P10.3 is used as general purpose output\par
\tab - push/pull output is selected\par
\tab - the pin status is low level\par
\tab P10.4 is used as general purpose output\par
\tab - push/pull output is selected\par
\tab - the pin status is low level\par
\par
\tab P10.0 - P10.3 output driver characteristic: strong driver\par
\tab P10.4 - P10.7 output driver characteristic: strong driver\par
\tab P10.8 - P10.11 output driver characteristic: strong driver\par
\tab P10.12 - P10.15 output driver characteristic: strong driver\par
\par
\tab P10.0 - P10.3 output edge characteristic: sharp edge mode\par
\tab P10.4 - P10.7 output edge characteristic: sharp edge mode\par
\tab P10.8 - P10.11 output edge characteristic: sharp edge mode\par
\tab P10.12 - P10.15 output edge characteristic: sharp edge mode\par
\par
\tab Configuration of Port P15:\par
\tab P15.0 is used as alternate input for the Analog Input Pin (AN0)\par
\tab P15.2 is used as alternate input for the Analog Input Pin (AN2)\par
\tab P15.4 is used as alternate input for the Analog Input Pin (AN4)\par
\par
\par \plain\f4\fs20\cf0
\par \plain\f4\fs28\cf0\ul General Purpose Timer Unit (GPT1)
\par
\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0
\par
\par
\par \plain\f4\fs20\cf0 \tab Macro:
\par \plain\f4\fs20\cf0\b \tab \tab GPT1_vStartTmr(TimerNr)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This macro starts the selected GPT1 timer. The timer
\par \tab \tab continues to count from where it had stopped. The following
\par \tab \tab definitions are available for TimerNr:
\par \tab \tab GPT1_TIMER_2
\par \tab \tab GPT1_TIMER_3
\par \tab \tab GPT1_TIMER_4
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab TimerNr:
\par \tab \tab the name of the timer to be started
\par
\par
\par \plain\f4\fs20\cf0 \tab Macro:
\par \plain\f4\fs20\cf0\b \tab \tab GPT1_vStopTmr(TimerNr)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This macro stops the selected GPT1 timer. The contents of
\par \tab \tab the timer register remain unchanged. The remote control of
\par \tab \tab the selected timer is cleared. The following definitions
\par \tab \tab are available for TimerNr:
\par \tab \tab GPT1_TIMER_2
\par \tab \tab GPT1_TIMER_3
\par \tab \tab GPT1_TIMER_4
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab TimerNr:
\par \tab \tab The name of the timer to be stopped
\par
\par
\par \plain\f4\fs20\cf0 \tab Macro:
\par \plain\f4\fs20\cf0\b \tab \tab GPT1_vLoadTmr(TimerNr, Value)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This macro loads the selected GPT1 timer with the forwarded
\par \tab \tab value. The timer is not stopped. The access of the CPU to
\par \tab \tab the registers of the timers is of higher priority than a
\par \tab \tab timer increment, a reload or a capture event. The following
\par \tab \tab definitions are available for TimerNr:
\par \tab \tab GPT1_TIMER_2
\par \tab \tab GPT1_TIMER_3
\par \tab \tab GPT1_TIMER_4
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab TimerNr:
\par \tab \tab The name of the timer to be loaded
\par \tab \tab Value:
\par \tab \tab 16-bit value to be loaded
\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void GPT1_vInit(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This is the initialization function of the GPT1 function
\par \tab \tab library. It is assumed that the SFRs used by this library
\par \tab \tab are in reset state.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void GPT1_viTmr3(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This is the interrupt service routine for the GPT1 timer 3.
\par \tab \tab It is called up in the case of over or underflow of the
\par \tab \tab timer 3 register.
\par \tab \tab If the incremental interface mode is selected it is called
\par \tab \tab up if count edge or count direction was detected.
\par \tab \tab Please note that you have to add application specific code
\par \tab \tab to this function.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs24\cf0 Initialization:
\par \plain\f4\fs20\cf0\b
\par
\tab Configuration of Timer Block Prescaler 1:\par
\par
\tab Configuration of Timer Block Prescaler 1:\par
\tab - prescaler for timer block 1 is 4\par
\par
\tab Configuration of the GPT1 Core Timer 3:\par
\tab - timer 3 works in timer mode\par
\tab - external up/down control is disabled\par
\tab - prescaler factor is 512\par
\tab - up/down control bit is reset\par
\tab - alternate output function T3OUT (P7.0) is disabled\par
\tab - timer 3 output toggle latch (T3OTL) is set to 0\par
\par
\tab - prescaler for timer block 1 is 4\par
\par
\tab Configuration of the GPT1 Auxiliary Timer 2:\par
\tab - timer 2 works in timer mode\par
\tab - external up/down control is disabled\par
\tab - prescaler factor is 4\par
\tab - up/down control bit is reset\par
\tab - timer 2 run bit is reset\par
\par
\tab - prescaler for timer block 1 is 4\par
\par
\tab Configuration of the GPT1 Auxiliary Timer 4:\par
\tab - timer 4 works in timer mode\par
\tab - external up/down control is disabled\par
\tab - prescaler factor is 4\par
\tab - up/down control bit is reset\par
\tab - timer 4 run bit is reset\par
\par
\tab - prescaler for timer block 1 is 4\par
\par
\tab Configuration of the used GPT1 Port Pins:\par
\par
\tab Configuration of the used GPT1 Interrupts:\par
\tab timer 3 service request node configuration:\par
\tab - timer 3 interrupt priority level (ILVL) = 14\par
\tab - timer 3 interrupt group level (GLVL) = 3\par
\tab - timer 3 group priority extension (GPX) = 0\par
\par
\tab Use PEC channel 3 for GPT1 T3 INT:\par
\tab - normal interrupt\par
\tab - pointers are not modified\par
\tab - transfer a word\par
\tab - service End of PEC interrrupt by a EOP interrupt node is disabled\par
\tab - channel link mode is disabled\par
\par
\par \plain\f4\fs20\cf0
\par \plain\f4\fs28\cf0\ul General Purpose Timer Unit (GPT2)
\par
\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0
\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void GPT2_vInit(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This is the initialization function of the GPT2 function
\par \tab \tab library. It is assumed that the SFRs used by this library
\par \tab \tab are in reset state.
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs24\cf0 Initialization:
\par \plain\f4\fs20\cf0\b
\par
\tab Configuration of Timer Block Prescaler 1:\par
\par
\tab Configuration of Timer Block Prescaler 2:\par
\tab - prescaler for timer block 2 is 4\par
\par
\tab Configuration of the GPT2 Core Timer 5:\par
\tab - timer 5 works in timer mode\par
\tab - prescaler factor is 4\par
\tab - up/down control bit is reset\par
\tab - external up/down control is disabled\par
\tab - timer 5 run bit is reset\par
\tab - timer 5 remote control is disabled\par
\par
\tab Configuration of the GPT2 Core Timer 6:\par
\tab - timer 6 works in timer mode\par
\tab - prescaler factor is 4\par
\tab - up/down control bit is reset\par
\tab - external up/down control is disabled\par
\tab - alternate output function T6OUT (P6.2) is disabled\par
\tab - alternate output function T6OUT (P7.0) is disabled\par
\tab - timer 6 output toggle latch (T6OTL) is set to 0\par
\tab - timer 6 run bit is reset\par
\tab - timer 6 is not cleared on a capture\par
\par
\tab Configuration of the GPT2 CAPREL:\par
\tab - capture T5 into CAPREL is disabled\par
\tab - capture trigger from pin CAPIN\par
\tab - capure is disabled\par
\tab - timer 5 is not cleared on a capture\par
\tab - timer 5 is just captured without any correction\par
\par
\tab Configuration of the used GPT2 Port Pins:\par
\par
\tab Configuration of the used GPT2 Interrupts:\par
\par
\par \plain\f4\fs20\cf0
\par \plain\f4\fs28\cf0\ul Analog / Digital Converter (ADC1)
\par
\par \plain\f4\fs24\cf0 Macros:\f4\fs20\cf0
\par \plain\f4\fs24\cf0 Functions:\f4\fs20\cf0
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void ADC1_vInit(void)\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This is the initialization function of the ADC function
\par \tab \tab library. It is assumed that the SFRs used by this library
\par \tab \tab are in reset state.
\par \tab \tab Following SFR fields will be initialized:
\par \tab \tab GLOBCTR - Global Control
\par \tab \tab RSPR0 - Priority and Arbitration Register
\par \tab \tab ASENR - Arbitration slot enable register
\par \tab \tab CHCTRx - Channel Control Register x
\par \tab \tab RCRx - Result Control Register x
\par \tab \tab KSCFG - Module configuration Register
\par \tab \tab INPCR - Input class Registers
\par \tab \tab CHINPRx - Channel Interrupt register
\par \tab \tab EVINPRx - Event Interrupt register
\par \tab \tab SYNCTR - Synchronisation control register
\par \tab \tab LCBRx - Limit check boundary register
\par \tab \tab PISEL - Port input selection
\par \tab \tab QMR0 - Sequential 0 mode register
\par \tab \tab CRMR1 - Parallel mode register
\par \tab \tab QMR2 - Sequential 2 mode register
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab None
\par
\par \plain\f4\fs20\cf0 \tab Function:
\par \plain\f4\fs20\cf0\b \tab \tab void ADC1_vStartSeq0ReqChNum(ubyte ubExtTrg, ubyte\plain\f4\fs20\cf0
\par \tab Description:
\par \plain\f4\fs20\cf0\i
\tab \tab This function starts the conversion of the requested
\par \tab \tab channel.
\par \tab \tab NOTE -
\par \tab \tab Before passing ubEnIntr argument as 1,make sure that Seq 0
\par \tab \tab source interrupt is enabled.
\par \tab \tab External Trigger -> 0,Indicates software trigger
\par \tab \tab (Conversion starts once this function is executed)
\par \plain\f4\fs20\cf0 \tab Returnvalue:
\par \tab \tab \plain\f4\fs20\cf0\b None\plain\f4\fs20\cf0
\par \plain\f4\fs20\cf0 \tab Parameters:
\par \plain\f4\fs20\cf0\b
\tab \tab ubExtTrg:
\par \tab \tab External Trigger : defines external trigger.
\par \tab \tab ubEnIntr:
\par \tab \tab Enable Source Interrupt : defines source interrupt
\par \tab \tab ubRFill:
\par \tab \tab Refill : defines the refill
\par \tab \tab ubChannelNum:
\par \tab \tab Channel number : Name of the Request Channel Number (0 -