Download Print this page

Fujitsu MB91460 SERIES FR60 User Manual

32-bit microcontroller.
Hide thumbs
   
1
2
3
4
Table of Contents
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

Advertisement

FUJITSU SEMICONDUCTOR
CONTROLLER MANUAL
- PRELIMINARY -
32-BIT MICROCONTROLLER
MB91460 Series
User's Manual
CM71-xxxxx-1E
FR60
Version 1.00
2006-10-22

Advertisement

   Related Manuals for Fujitsu MB91460 SERIES FR60

   Summary of Contents for Fujitsu MB91460 SERIES FR60

  • Page 1

    FUJITSU SEMICONDUCTOR CONTROLLER MANUAL - PRELIMINARY - CM71-xxxxx-1E 32-BIT MICROCONTROLLER MB91460 Series User’s Manual Version 1.00 2006-10-22 FR60...

  • Page 2

    FUJITSU LIMITED...

  • Page 3

    FR60 32-BIT MICROCONTROLLER MB91460 Series User’s Manual...

  • Page 4

    (2) for use requiring extremely high reliability (i.e., submersible repeater and artificial satellite). Please note that Fujitsu will not be liable against you and/or any third party for any claims or damages arising in connection with above-mentioned uses of the products.

  • Page 5: Table Of Contents

    Chapter 1 Introduction ... 1 How to Handle the Device ... 1 Instruction for Users... 3 Caution: debug-related matters ... 6 How to Use This Document ... 7 Chapter 2 MB91460 Rev.A/Rev.B Overview ... 11 Overview... 11 Features... 11 MB91460 Series Product Lineup ... 19 Block Diagram ...

  • Page 6

    EIT Vector Table... 122 Multiple EIT Processing ... 123 Operation ... 125 Caution ... 128 Chapter 7 Branch Instruction ... 129 Branch Instruction with Delay Slot ... 129 Operation of Branch Instruction with Delay Slot ... 129 Actual Example (with Delay Slot)... 130 Restrictions on Branch Instruction with Delay Slot ...

  • Page 7

    Explanations of Registers ... 169 Chapter 12 Instruction Cache... 179 General description... 179 Main body structure ... 179 Operating mode conditions... 185 Cacheable areas in the instruction cache... 186 Settings for handling the I-Cache ... 186 Chapter 13 Clock Control ... 189 Overview...

  • Page 8

    Configuration ... 250 Registers... 251 Operation ... 253 Settings... 259 Q&A ... 260 Caution ... 262 Chapter 19 Timebase Timer... 263 Overview... 263 Features... 263 Configuration ... 264 Register ... 265 Operation ... 267 Setting... 268 Q & A ... 269 Caution ...

  • Page 9

    Register ... 301 Operation ... 303 Setting... 306 Q & A ... 307 Caution ... 309 Chapter 24 Interrupt Control ... 311 Overview... 311 Features... 311 Configuration ... 312 Registers... 313 Operation ... 318 Setting... 319 Q & A ... 319 Caution ...

  • Page 10

    Register ... 389 Operation ... 391 Setting... 393 Q & A ... 394 Caution ... 395 Chapter 29 MPU / EDSU ... 397 Overview... 397 Features... 398 Break Functions... 399 Registers... 407 Quick Reference ... 429 Chapter 30 I/O Ports ... 431 I/O Ports Functions ...

  • Page 11

    Chapter 34 CAN Controller ... 691 Overview... 691 Register Description ... 692 Functional Description ... 720 CAN Application... 724 Chapter 35 Free-Run Timer ... 733 Overview... 733 Features... 733 Configuration Diagram... 734 Registers... 735 Operation ... 739 Setting... 741 Q & A ... 742 Caution ...

  • Page 12

    Features... 795 Configuration ... 797 Registers... 799 Operation ... 808 Setting... 811 Q & A ... 813 Caution ... 821 Chapter 40 Pulse Frequency Modulator... 823 PFM Overview ... 823 Reload Counter Registers ... 826 Reload Counter Operation... 830 PFM Operation and Setting ... 833 Chapter 41 Up/Down Counter...

  • Page 13

    Registers... 911 Operation ... 913 Setting... 914 Q & A ... 915 Caution ... 916 Chapter 46 Alarm Comparator ... 917 Overview... 917 Block Diagram ... 917 Alarm Comparator Control/Status Register (ACSR)... 918 Operation Modes ... 919 Chapter 47 LCD Controller ... 921 Overview...

  • Page 14

    Application Note... 973 Chapter 51 Low Voltage Reset/Interrupt ... 975 Overview... 975 Features... 975 Registers... 976 Chapter 52 Regulator Control ... 979 Overview... 979 Features... 979 Registers... 980 Chapter 53 Fixed Mode-Reset Vector / BOOT-ROM ... 983 Overview... 983 Check for Boot Conditions ... 983 Registers modified by Boot ROM ...

  • Page 17: Chapter 1 Introduction

    Chapter 1 Introduction 1. How to Handle the Device ■ Device Handling Instructions This chapter describes latch-up prevention and pin termination. ● To set latch-up prevention Latch up may occur on CMOS ICs when the applied voltage for input terminals or output terminals is higher than V or lower than V , or a voltage higher than the maximum rating voltage is applied between V not to apply a voltage higher than the maximum rating voltage since latch up may surge electric current and result in...

  • Page 18

    Chapter 1 Introduction 1.How to Handle the Device ● Caution: during the PLL clock operation Even if oscillator is disconnected or input is stopped while selecting PLL clock, self-excited oscillation circuit in the PLL may continue running at self-running frequency. This self-running operation is not covered by guarantee. ●...

  • Page 19: Instruction For Users

    2. Instruction for Users ■ Clock Controls By inputting “L” to INIT, ensure clock oscillation stabilization time. ■ Switching of dual-purpose port Use PFR (Port function register) to switch between PORT and dual-purpose port. ■ Low-power-consumption mode • For standby mode, enable synchronous standby (TBCR.SYNCS=“1”) and then use the following sequences. (LDI #value_of_standby, R0 (LDI...

  • Page 20

    Chapter 1 Introduction 2.Instruction for Users ■ Caution: PS register Because some commands previously proceed PS register, interrupt processing routine may be broken during the use of debugger or displayed data on PS flag may be updated due to the following excecptional operations ((1) and (2)).

  • Page 21

    ■ Caution: writing to registers which include a status flag Writing to a register including a status flag (in particular, interrupt request flag) in order to control the function, note that you should not clear status flag unintentionally. That is, take care not to clear the flag for status bit and make control bit to be the expected value during the writing.

  • Page 22: Caution: Debug-related Matters

    Chapter 1 Introduction 3.Caution: debug-related matters 3. Caution: debug-related matters ■ Stepwise execution of RETI command Under the circumstances where interruption is often generated when carrying out stepwise execution, only relevant interrupt processing routine is repeatedly executed after the stepwise execution of RETI. Therefore, main routine or low-level interruption program will not be executed.

  • Page 23: How To Use This Document

    4. How to Use This Document ■ Main terminology: This table shows main terminology used for FR60. Term 32-bit-wide bus for internal instruction. I-bus Since FR60 series employ internal Harvard architecture, instruction and data are independent bus. For I-bus, Harverd/Prinston-bus-converter is connected. Internal 32-bit-wide data bus.

  • Page 24

    Chapter 1 Introduction 4.How to Use This Document ■ Access size and address position Offset Address There are three kinds of accesses such as Byte access, Half-word access and Word access. However, note that some registers have restricted access. For more information, see “3.2. I/O Map (Page No.24)” or “Detail Description of Register”...

  • Page 25

    ■ About access size and bit position Register name Register mark (1) Counter control register (Higher byte) This is the register (higher byte) which controls up/down counter operation. CCRH0 (Up/down counter 0): address 00B4h (Access: Byte, Half-word, Word) CCRH1 (Up/down counter 1): address 00B8h (Access: Byte, Half-word, Word) M16E/Reserved bit15: Enable 16-bit mode M16E (CCRH0 only)

  • Page 26

    Chapter 1 Introduction 4.How to Use This Document ■ Meaning of Bit Attribute Symbols : Readable : Writable : Reading operation during read/modify/write operation. “/” (Slash) R/W: Readable and writable. (The read value is the value written.) “,” (comma) R,W: Values are different between read and write. (The read value is different from the value written.) : The read value is “0”.

  • Page 27: Chapter 2 Mb91460 Rev.a/rev.b Overview

    Chapter 2 MB91460 Rev.A/Rev.B Overview 1. Overview MB91460 is a series of standard microcontrollers containing a range of I/O peripherals and bus control functions. MB91460 features a 32-bit RISC CPU (FR60 series) core and is suitable for embedded control applications requiring high-performance and high-speed CPU processing. MB91460 derivatives also contain up to 16 kByte instruction cache memory and other internal memories to improve the execution speed of the CPU.

  • Page 28

    Chapter 2 MB91460 Rev.A/Rev.B Overview 2.Features • 4 words (16 bytes) per set • Variable capacity (4/2/1 kB) • Lock function enabling programs to be resident • Available as instruction RAM requiring no wait state when not used as an instruction cache •...

  • Page 29

    • 3 types of transfer sources (external pins/internal peripherals/and software) • Up to 128 selectable internal transfer sources • Addressing mode: Specifying up to 32-bit addresses (Increment/decrement/fixed) • Transfer mode (Demand transfer/burst transfer/step transfer/block transfer) • Fly-by transfer supported (between external I/O and memory) •...

  • Page 30

    Chapter 2 MB91460 Rev.A/Rev.B Overview 2.Features 2.10 Peripheral Function • General-purpose port : Up to 288 • N channel open drain port out of above: 8 (for I • A/D converter : 32 channels (1 unit) • Series-parallel type • Resolution: 10 bits •...

  • Page 31

    • 16-bit reload counter • Includes clock prescaler (f • Free-run timer : 16 bits x 8 channels • 16-bit free running counter, signals an interrupt when overflow or match with compare register • Includes prescaler (f • Timer data register has R/W access •...

  • Page 32

    Chapter 2 MB91460 Rev.A/Rev.B Overview 2.Features • LIN-USART (LIN=Local Interconnect Network) : 16 channels • Full-duplex double buffer system (4 ch with 16 byte RX/TX FIFO buffer each) • With parity/without parity selectable • 1 or 2 stop bits selectable •...

  • Page 33

    the range of 1 to 1.5 cycles of the resource clock (CLKP) • PFM (pulse frequency modulator) : 16 bits x 1 channel • 16-bit reload timers for generating high/low pulse waveforms • Includes clock prescaler (f • Sound Generator : 1 channel •...

  • Page 34

    Chapter 2 MB91460 Rev.A/Rev.B Overview 2.Features • Prescaler value for 32 kHz is 001FFF • Clock monitor (clock output function): 1 channel • Clock supervisor • Monitors external 32kHz and 4MHz for fails (e.g. crystal breaks) • Switches in case of fail to an available recovery clock (subclock or RC clock) •...

  • Page 35: Mb91460 Series Product Lineup

    3. MB91460 Series Product Lineup Feature Core frequency Resource frequency Technology Watchdog Watchdog (RC osc. based) Bit Search Reset Input (INITX) Clock Modulator Low Power Mode MAC (uDSP) MMU/MPU Flash Flash Protection D-bus RAM I/D-bus RAM I-bus RAM / I-Cache Boot-ROM / BI-ROM Free Running Timer Reload Timer...

  • Page 36

    Chapter 2 MB91460 Rev.A/Rev.B Overview 3.MB91460 Series Product Lineup Feature ADC (10 bit) Alarm Comparator Supply Supervisor Clock Supervisor Main clock oscillator Sub clock oscillator RC Oscillator DSU4 EDSU JTAG Boundary Scan Supply Voltage Regulator Power Consumption Temperatur Range (Ta) Package Power on to PLL run Flash Download Time...

  • Page 37: Block Diagram

    Chapter 2 MB91460 Rev.A/Rev.B Overview 4.Block Diagram 4. Block Diagram The following illustration shows the block diagram of MB91460 series. Figure 4-1 Block Diagram MB91460 Series M−Bus D−Bus I−Bus F−Bus...

  • Page 38

    Chapter 2 MB91460 Rev.A/Rev.B Overview 4.Block Diagram...

  • Page 39: Chapter 3 Mb91460 Series Basic Information

    Chapter 3 MB91460 Series Basic Information 1.Memory Map Chapter 3 MB91460 Series Basic Information This chapter describes MB91460 series basic information including Memory- and I/O map, inter- rupt vector table, pin function list, circuit type and pin state table for each device mode. 1.

  • Page 40: I/o Map

    Chapter 3 MB91460 Series Basic Information 2.I/O Map 2. I/O Map This section shows the association between memory space and each register of peripheral resources. • Table convention Address offset/Register name Address 000000 PDRD[R/W] xxxxxxxx Register initial value ("0", "1", "X" : undefined, "-" : not implemented) Register name (First column register is 4n address, Second column register is 4n+2 address...) Leftmost register address...

  • Page 41

    Table 2-1 I/O Map Address PDR00 [R/W] 000000 XXXXXXXX PDR04 [R/W] 000004 XXXXXXXX PDR08 [R/W] 000008 XXXXXXXX PDR12 [R/W] 00000C XXXXXXXX PDR16 [R/W] 000010 XXXXXXXX PDR20 [R/W] 000014 XXXXXXXX PDR24 [R/W] 000018 XXXXXXXX PDR28 [R/W] 00001C XXXXXXXX PDR32 [R/W] 000020 XXXXXXXX 000024 00002C...

  • Page 42

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address SCR01 [R/W,W] 000048 00000000 ESCR01 [R/W] 00004C 00000X00 SCR02 [R/W,W] 000050 00000000 ESCR02 [R/W] 000054 00000X00 SCR03 [R/W,W] 000058 00000000 ESCR03 [R/W] 00005C 00000X00 SCR04 [R/W,W] 000060 00000000 ESCR04 [R/W] 000064 00000X00 SCR05 [R/W,W] 000068...

  • Page 43

    Address BGR100 [R/W] 000080 00000000 BGR102 [R/W] 000084 00000000 BGR104 [R/W] 000088 00000000 BGR106 [R/W] 00008C 00000000 PWC20 [R/W] 000090 - - - - - - XX XXXXXXXX 000094 res. PWC21 [R/W] 000098 - - - - - - XX XXXXXXXX 00009C res.

  • Page 44

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address IBCR0 [R/W] 0000D0 00000000 ITMKH0 [R/W] 0000D4 00 - - - - 11 0000D8 res. IBCR1 [R/W] 0000DC 00000000 ITMKH1 [R/W] 0000E0 00 - - - - 11 0000E4 res. 0000E8 LCDCMR [R/W] - - - - 0000 0000EC...

  • Page 45

    Address PTMR02 [R] 000120 11111111 11111111 PDUT02 [W] 000124 XXXXXXXX XXXXXXXX PTMR03 [R] 000128 11111111 11111111 PDUT03 [W] 00012C XXXXXXXX XXXXXXXX PTMR04 [R] 000130 11111111 11111111 PDUT04 [W] 000134 XXXXXXXX XXXXXXXX PTMR05 [R] 000138 11111111 11111111 PDUT05 [W] 00013C XXXXXXXX XXXXXXXX PTMR06 [R] 000140...

  • Page 46

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address P0TMCSRH 000170 [R/W] - 0 - 000 - 0 P0TMRLR [W] 000174 XXXXXXXX XXXXXXXX P1TMRLR [W] 000178 XXXXXXXX XXXXXXXX 00017C 000180 res. IPCP0 [R] 000184 XXXXXXXX XXXXXXXX IPCP2 [R] 000188 XXXXXXXX XXXXXXXX OCS01 [R/W] 00018C - - - 0 - - 00 0000 - - 00...

  • Page 47

    Address TMRLR1 [W] 0001B8 XXXXXXXX XXXXXXXX 0001BC reserved TMRLR2 [W] 0001C0 XXXXXXXX XXXXXXXX 0001C4 reserved TMRLR3 [W] 0001C8 XXXXXXXX XXXXXXXX 0001CC reserved TMRLR4 [W] 0001D0 XXXXXXXX XXXXXXXX 0001D4 reserved TMRLR5 [W] 0001D8 XXXXXXXX XXXXXXXX 0001DC reserved TMRLR6 [W] 0001E0 XXXXXXXX XXXXXXXX 0001E4 reserved TMRLR7 [W]...

  • Page 48

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address TCDT2 [R/W] 0001F8 XXXXXXXX XXXXXXXX TCDT3 [R/W] 0001FC XXXXXXXX XXXXXXXX 000200 000204 000208 00020C 000210 000214 000218 00021C 000220 000224 000228 00023C 000240 DMACR [R/W] 0 - - 00000 000244 00024C 000250 000254 Register...

  • Page 49

    Address 000258 00027C SCR08 [R/W,W] 000280 00000000 ESCR08 [R/W] 000284 00000X00 SCR09 [R/W,W] 000288 00000000 ESCR09 [R/W] 00028C 00000X00 SCR10 [R/W,W] 000290 00000000 ESCR10 [R/W] 000294 00000X00 SCR11 [R/W,W] 000298 00000000 ESCR11 [R/W] 00029C 00000X00 SCR12 [R/W,W] 0002A0 00000000 ESCR12 [R/W] 0002A4 00000X00 SCR13 [R/W,W]...

  • Page 50

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address SCR14 [R/W,W] 0002B0 00000000 ESCR14 [R/W] 0002B4 00000X00 SCR15 [R/W,W] 0002B8 00000000 ESCR15 [R/W] 0002BC 00000X00 BGR108 [R/W] 0002C0 00000000 BGR110 [R/W] 0002C4 00000000 BGR112 [R/W] 0002C8 00000000 BGR114 [R/W] 0002CC 00000000 0002D0 res.

  • Page 51

    Address TCDT5 [R/W] 0002F4 XXXXXXXX XXXXXXXX TCDT6 [R/W] 0002F8 XXXXXXXX XXXXXXXX TCDT7 [R/W] 0002FC XXXXXXXX XXXXXXXX UDRC1 [W] 000300 00000000 UDCCH0 [R/W] 000304 00001000 UDCCH1 [R/W] 000308 00001000 00030C UDRC3 [W] 000310 00000000 UDCCH2 [R/W] 000314 00001000 UDCCH3 [R/W] 000318 00001000 00031C GCN13 [R/W]...

  • Page 52

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address PTMR14 [R] 000340 11111111 PDUT14 [W] 000344 XXXXXXXX PTMR15 [R] 000348 11111111 PDUT15 [W] 00034C XXXXXXXX 000350 00035C 000360 res. DADR0 [R/W] 000364 - - - - - - XX XXXXXXXX IBCR2 [R/W] 000368 00000000...

  • Page 53

    Address 0003D8 0003E0 0003E4 0003E8 0003EC 0003F0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 0003F4 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 0003F8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 0003FC XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 000400 00043C Chapter 3 MB91460 Series Basic Information Register reserved reserved reserved BSD0 BSD1 [R/W] BSDC BSRR...

  • Page 54

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address ICR00 [R/W] 000440 ---11111 ICR04 [R/W] 000444 ---11111 ICR08 [R/W] 000448 ---11111 ICR12 [R/W] 00044C ---11111 ICR16 [R/W] 000450 ---11111 ICR20 [R/W] 000454 ---11111 ICR24 [R/W] 000458 ---11111 ICR28 [R/W] 00045C ---11111 ICR32 [R/W] 000460...

  • Page 55

    Address PLLDIVM [R/W] 00048C - - - - 0000 PLLCTRL [R/W] 000490 - - - - 0000 OSCC1 [R/W] 000494 - - - - - 010 PORTEN [R/W] 000498 - - - - - - 00 0004A0 res. 0004A4 - - - - - - - - - - - XXXXX XXXXXXXX XXXXXXXX WTHR [R/W] 0004A8 - - - 00000...

  • Page 56

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address C340R [R/W] 0004D0 - - - - - - - 0 SHDE [R/W] 0004D4 0 - - - - - - - EXTLV [R/W] 0004D8 00000000 00000000 0004DC 00063C Register EISSRH [R/W] res.

  • Page 57

    Address ASR0 [R/W] 000640 00000000 00000000 ASR1 [R/W] 000644 XXXXXXXX XXXXXXXX ASR2 [R/W] 000648 XXXXXXXX XXXXXXXX ASR3 [R/W] 00064C XXXXXXXX XXXXXXXX ASR4 [R/W] 000650 XXXXXXXX XXXXXXXX ASR5 [R/W] 000654 XXXXXXXX XXXXXXXX ASR6 [R/W] 000658 XXXXXXXX XXXXXXXX ASR7 [R/W] 00065C XXXXXXXX XXXXXXXX AWR0 [R/W] 000660 01111111 11111*11...

  • Page 58

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 0007FC res. 000800 000BFC TVCTW [W] 000C00 XXXXXXXX 000C04 000CFC PDRD00 [R] 000D00 XXXXXXXX PDRD04 [R] 000D04 XXXXXXXX PDRD08 [R] 000D08 XXXXXXXX PDRD12 [R] 000D0C XXXXXXXX PDRD16 [R] 000D10 XXXXXXXX PDRD20 [R] 000D14 XXXXXXXX PDRD24 [R]...

  • Page 59

    Address DDR00 [R/W] 000D40 00000000 DDR04 [R/W] 000D44 00000000 DDR08 [R/W] 000D48 00000000 DDR12 [R/W] 000D4C 00000000 DDR16 [R/W] 000D50 00000000 DDR20 [R/W] 000D54 00000000 DDR24 [R/W] 000D58 00000000 DDR28 [R/W] 000D5C 00000000 DDR32 [R/W] 000D60 00000000 000D64 000D7C PFR00 [R/W] 000D80 11111111 PFR04 [R/W]...

  • Page 60

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 000DA4 000DBC EPFR00 [R/W] 000DC0 00000000 EPFR04 [R/W] 000DC4 00000000 EPFR08 [R/W] 000DC8 00000000 EPFR12 [R/W] 000DCC 00000000 EPFR16 [R/W] 000DD0 00000000 EPFR20 [R/W] 000DD4 00000000 EPFR24 [R/W] 000DD8 00000000 EPFR28 [R/W] 000DDC 00000000 EPFR32 [R/W]...

  • Page 61

    Address PODR00 [R/W] 000E00 00000000 PODR04 [R/W] 000E04 00000000 PODR08 [R/W] 000E08 00000000 PODR12 [R/W] 000E0C 00000000 PODR16 [R/W] 000E10 00000000 PODR20 [R/W] 000E14 00000000 PODR24 [R/W] 000E18 00000000 PODR28 [R/W] 000E1C 00000000 PODR32 [R/W] 000E20 00000000 000E24 000E3C PILR00 [R/W] 000E40 00000000 PILR04 [R/W]...

  • Page 62

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 000E64 000E7C EPILR00 [R/W] 000E80 00000000 EPILR04 [R/W] 000E84 00000000 EPILR08 [R/W] 000E88 00000000 EPILR12 [R/W] 000E8C 00000000 EPILR16 [R/W] 000E90 00000000 EPILR20 [R/W] 000E94 00000000 EPILR24 [R/W] 000E98 00000000 EPILR28 [R/W] 000E9C 00000000 EPILR32 [R/W]...

  • Page 63

    Address PPER00 [R/W] 000EC0 00000000 PPER04 [R/W] 000EC4 00000000 PPER08 [R/W] 000EC8 00000000 PPER12 [R/W] 000ECC 00000000 PPER16 [R/W] 000ED0 00000000 PPER20 [R/W] 000ED4 00000000 PPER24 [R/W] 000ED8 00000000 PPER28 [R/W] 000EDC 00000000 PPER32 [R/W] 000EE0 00000000 000EE4 000EFC PPCR00 [R/W] 000F00 11111111 PPCR04 [R/W]...

  • Page 64

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 000F24 000F3C 001000 001004 001008 00100C 001010 001014 001018 00101C 001020 001024 001028 006FFC FMCS [R/W] 007000 01101000 FMWT [R/W] 007004 11111111 11111111 007008 00700C 007010 007014 007FFC Register reserved DMASA0 [R/W] XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX DMADA0 [R/W] XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX...

  • Page 65

    Address 008000 MB91V460 Boot-ROM size is 4kB : 00B000 (instruction access is 1 waitcycle, data access is 1 waitcycle) 00BFFC CTRLR0 [R/W] 00C000 00000000 00000001 ERRCNT0 [R] 00C004 00000000 00000000 INTR0 [R] 00C008 00000000 00000000 BRPER0 [R/W] 00C00C 00000000 00000000 IF1CREQ0 [R/W] 00C010 00000000 00000001...

  • Page 66

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address IF2CREQ0 [R/W] 00C040 00000000 00000001 IF2MSK20 [R/W] 00C044 11111111 11111111 IF2ARB20 [R/W] 00C048 00000000 00000000 IF2MCTR0 [R/W] 00C04C 00000000 00000000 IF2DTA10 [R/W] 00C050 00000000 00000000 IF2DTB10 [R/W] 00C054 00000000 00000000 00C058 00C05C IF2DTA20 [R/W] 00C060...

  • Page 67

    Address TREQR20 [R] 00C080 00000000 00000000 TREQR40 [R] 00C084 00000000 00000000 TREQR60 [R] 00C088 00000000 00000000 TREQR80 [R] 00C08C 00000000 00000000 NEWDT20 [R] 00C090 00000000 00000000 NEWDT40 [R] 00C094 00000000 00000000 NEWDT60 [R] 00C098 00000000 00000000 NEWDT80 [R] 00C09C 00000000 00000000 INTPND20 [R] 00C0A0 00000000 00000000...

  • Page 68

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address CTRLR1 [R/W] 00C100 00000000 00000001 ERRCNT1 [R] 00C104 00000000 00000000 INTR1 [R] 00C108 00000000 00000000 BRPER1 [R/W] 00C10C 00000000 00000000 IF1CREQ1 [R/W] 00C110 00000000 00000001 IF1MSK21 [R/W] 00C114 11111111 11111111 IF1ARB21 [R/W] 00C118 00000000 00000000 IF1MCTR1 [R/W]...

  • Page 69

    Address IF2CREQ1 [R/W] 00C140 00000000 00000001 IF2MSK21 [R/W] 00C144 11111111 11111111 IF2ARB21 [R/W] 00C148 00000000 00000000 IF2MCTR1 [R/W] 00C14C 00000000 00000000 IF2DTA11 [R/W] 00C150 00000000 00000000 IF2DTB11 [R/W] 00C154 00000000 00000000 00C158 00C15C IF2DTA21 [R/W] 00C160 00000000 00000000 IF2DTB21 [R/W] 00C164 00000000 00000000 00C168...

  • Page 70

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address TREQR21 [R] 00C180 00000000 00000000 TREQR41 [R] 00C184 00000000 00000000 TREQR61 [R] 00C188 00000000 00000000 TREQR81 [R] 00C18C 00000000 00000000 NEWDT21 [R] 00C190 00000000 00000000 NEWDT41 [R] 00C194 00000000 00000000 NEWDT61 [R] 00C198 00000000 00000000 NEWDT81 [R]...

  • Page 71

    Address CTRLR2 [R/W] 00C200 00000000 00000001 ERRCNT2 [R] 00C204 00000000 00000000 INTR2 [R] 00C208 00000000 00000000 BRPER2 [R/W] 00C20C 00000000 00000000 IF1CREQ2 [R/W] 00C210 00000000 00000001 IF1MSK22 [R/W] 00C214 11111111 11111111 IF1ARB22 [R/W] 00C218 00000000 00000000 IF1MCTR2 [R/W] 00C21C 00000000 00000000 IF1DTA12 [R/W] 00C220 00000000 00000000...

  • Page 72

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address IF2CREQ2 [R/W] 00C240 00000000 00000001 IF2MSK22 [R/W] 00C244 11111111 11111111 IF2ARB22 [R/W] 00C248 00000000 00000000 IF2MCTR2 [R/W] 00C24C 00000000 00000000 IF2DTA12 [R/W] 00C250 00000000 00000000 IF2DTB12 [R/W] 00C254 00000000 00000000 00C258 00C25C IF2DTA22 [R/W] 00C260...

  • Page 73

    Address TREQR22 [R] 00C280 00000000 00000000 TREQR42 [R] 00C284 00000000 00000000 TREQR62 [R] 00C288 00000000 00000000 TREQR82 [R] 00C28C 00000000 00000000 NEWDT22 [R] 00C290 00000000 00000000 NEWDT42 [R] 00C294 00000000 00000000 NEWDT62 [R] 00C298 00000000 00000000 NEWDT82 [R] 00C29C 00000000 00000000 INTPND22 [R] 00C2A0 00000000 00000000...

  • Page 74

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address CTRLR3 [R/W] 00C300 00000000 00000001 ERRCNT3 [R] 00C304 00000000 00000000 INTR3 [R] 00C308 00000000 00000000 BRPER3 [R/W] 00C30C 00000000 00000000 IF1CREQ3 [R/W] 00C310 00000000 00000001 IF1MSK23 [R/W] 00C314 11111111 11111111 IF1ARB23 [R/W] 00C318 00000000 00000000 IF1MCTR3 [R/W]...

  • Page 75

    Address IF2CREQ3 [R/W] 00C340 00000000 00000001 IF2MSK23 [R/W] 00C344 11111111 11111111 IF2ARB23 [R/W] 00C348 00000000 00000000 IF2MCTR3 [R/W] 00C34C 00000000 00000000 IF2DTA13 [R/W] 00C350 00000000 00000000 IF2DTB13 [R/W] 00C354 00000000 00000000 00C358 00C35C IF2DTA23 [R/W] 00C360 00000000 00000000 IF2DTB23 [R/W] 00C364 00000000 00000000 00C368...

  • Page 76

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address TREQR23 [R] 00C380 00000000 00000000 TREQR43 [R] 00C384 00000000 00000000 TREQR63 [R] 00C388 00000000 00000000 TREQR83 [R] 00C38C 00000000 00000000 NEWDT23 [R] 00C390 00000000 00000000 NEWDT43 [R] 00C394 00000000 00000000 NEWDT63 [R] 00C398 00000000 00000000 NEWDT83 [R]...

  • Page 77

    Address CTRLR4 [R/W] 00C400 00000000 00000001 ERRCNT4 [R] 00C404 00000000 00000000 INTR4 [R] 00C408 00000000 00000000 BRPER4 [R/W] 00C40C 00000000 00000000 IF1CREQ4 [R/W] 00C410 00000000 00000001 IF1MSK24 [R/W] 00C414 11111111 11111111 IF1ARB24 [R/W] 00C418 00000000 00000000 IF1MCTR4 [R/W] 00C41C 00000000 00000000 IF1DTA14 [R/W] 00C420 00000000 00000000...

  • Page 78

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address IF2CREQ4 [R/W] 00C440 00000000 00000001 IF2MSK24 [R/W] 00C444 11111111 11111111 IF2ARB24 [R/W] 00C448 00000000 00000000 IF2MCTR4 [R/W] 00C44C 00000000 00000000 IF2DTA14 [R/W] 00C450 00000000 00000000 IF2DTB14 [R/W] 00C454 00000000 00000000 00C458 00C45C IF2DTA24 [R/W] 00C460...

  • Page 79

    Address TREQR24 [R] 00C480 00000000 00000000 TREQR44 [R] 00C484 00000000 00000000 TREQR64 [R] 00C488 00000000 00000000 TREQR84 [R] 00C48C 00000000 00000000 NEWDT24 [R] 00C490 00000000 00000000 NEWDT44 [R] 00C494 00000000 00000000 NEWDT64 [R] 00C498 00000000 00000000 NEWDT84 [R] 00C49C 00000000 00000000 INTPND24 [R] 00C4A0 00000000 00000000...

  • Page 80

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address CTRLR5 [R/W] 00C500 00000000 00000001 ERRCNT5 [R] 00C504 00000000 00000000 INTR5 [R] 00C508 00000000 00000000 BRPER5 [R/W] 00C50C 00000000 00000000 IF1CREQ5 [R/W] 00C510 00000000 00000001 IF1MSK25 [R/W] 00C514 11111111 11111111 IF1ARB25 [R/W] 00C518 00000000 00000000 IF1MCTR5 [R/W]...

  • Page 81

    Address IF2CREQ5 [R/W] 00C540 00000000 00000001 IF2MSK25 [R/W] 00C544 11111111 11111111 IF2ARB25 [R/W] 00C548 00000000 00000000 IF2MCTR5 [R/W] 00C54C 00000000 00000000 IF2DTA15 [R/W] 00C550 00000000 00000000 IF2DTB15 [R/W] 00C554 00000000 00000000 00C558 00C55C IF2DTA25 [R/W] 00C560 00000000 00000000 IF2DTB25 [R/W] 00C564 00000000 00000000 00C568...

  • Page 82

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address TREQR25 [R] 00C580 00000000 00000000 TREQR45 [R] 00C584 00000000 00000000 TREQR65 [R] 00C588 00000000 00000000 TREQR85 [R] 00C58C 00000000 00000000 NEWDT25 [R] 00C590 00000000 00000000 NEWDT45 [R] 00C594 00000000 00000000 NEWDT65 [R] 00C598 00000000 00000000 NEWDT85 [R]...

  • Page 83

    Address 00F000 - - - - - - - - - - - - - - - - 11111100 00000000 00F004 - - - - - - - - - - - - - 000 00000000 10 - - 000000 00F008 00000000 00000000 00000000 00000000 00F00C...

  • Page 84

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 00F080 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F084 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F088 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F08C XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F090 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F094 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F098 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F09C XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX...

  • Page 85

    Address 00F0C0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0C4 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0C8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0CC XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0D0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0D4 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0D8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0DC XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0E0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX 00F0E4...

  • Page 86

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 010000 013FFC 014000 017FFC 018000 01BFFC 01C000 01FFFC Register Cache TAG way 1 (010000 - 0107FC Cache TAG way 2 (014000 - 0147FC Cache RAM way 1 (018000 - 0187FC Cache RAM way 2 (01C000 - 01C7FC Block...

  • Page 87

    Address 020000 MB91V460 D-RAM size is 64kB : 020000 02FFFC 030000 MB91V460 I-/D-RAM size is 64kB : 030000 (instruction access is 0 waitcycles, data access is 1 waitcycle) 03FFFC 040000 05FFFC 060000 07FFFC 080000 09FFFC 0A0000 0BFFFC 0C0000 0DFFFC 0E0000 0FFFF4 0FFFF8 0FFFFC...

  • Page 88

    Chapter 3 MB91460 Series Basic Information 2.I/O Map Address 200000 27FFFC 280000 2FFFFC 300000 37FFFC 380000 3FFFFC 400000 47FFFC 480000 4FFFFC Write operations to address 0FFFF8 shown above will be read. Notes: Use a read access (byte or halfword) to this address to synchronize the CPU operation (e.g. the interrupt accep- tance of the CPU) to a preceding write access to the resources on R-bus (e.g.

  • Page 89: Interrupt Vector Table

    3. Interrupt Vector Table This section shows the allocation of interrupt and interrupt vector/interrupt register. Interrupt number Interrupt Decimal Reset Mode vector System reserved System reserved System reserved CPU supervisor mode (INT #5 instruction) Memory Protection excep- tion Co-processor fault trap Co-processor error trap INTE instruction...

  • Page 90

    Chapter 3 MB91460 Series Basic Information 3.Interrupt Vector Table External Interrupt 8 External Interrupt 9 External Interrupt 10 External Interrupt 11 External Interrupt 12 External Interrupt 13 External Interrupt 14 External Interrupt 15 Reload Timer 0 Reload Timer 1 Reload Timer 2 Reload Timer 3 Reload Timer 4 Reload Timer 5...

  • Page 91

    USART (LIN) 2 RX USART (LIN) 2 TX USART (LIN) 3 RX USART (LIN) 3 TX System reserved Delayed Interrupt System reserved System reserved USART (LIN, FIFO) 4 RX USART (LIN, FIFO) 4 TX USART (LIN, FIFO) 5 RX USART (LIN, FIFO) 5 TX USART (LIN, FIFO) 6 RX USART (LIN, FIFO) 6 TX USART (LIN, FIFO) 7 RX...

  • Page 92

    Chapter 3 MB91460 Series Basic Information 3.Interrupt Vector Table Input Capture 0 Input Capture 1 Input Capture 2 Input Capture 3 Input Capture 4 Input Capture 5 Input Capture 6 Input Capture 7 Output Compare 0 Output Compare 1 Output Compare 2 Output Compare 3 Output Compare 4 Output Compare 5...

  • Page 93

    Prog. Pulse Gen. 14 Prog. Pulse Gen. 15 Up/Down Counter 0 Up/Down Counter 1 Up/Down Counter 2 Up/Down Counter 3 Real Time Clock Calibration Unit A/D Converter 0 Alarm Comparator 0 Alarm Comparator 1 Low Voltage Detection Timebase Overflow PLL Clock Gear DMA Controller Main/Sub OSC stability wait Boot Security vector...

  • Page 94: Package

    Chapter 3 MB91460 Series Basic Information 4.Package 4. Package ■ BGA-660P-M02 package (BGA660-03EK): MB91V460 BGA660-03EK Figure 4-1 External Dimension of...

  • Page 95: Pin Assignment Diagram

    Chapter 3 MB91460 Series Basic Information 5.Pin Assignment Diagram 5. Pin Assignment Diagram ■ MB91V460 (BGA660 package) Figure 5-1 Pin Assignment Diagram of BGA660-03EK...

  • Page 96: Pin Definitions

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions 6. Pin Definitions AL38 P00_7 AJ37 P00_6 AJ36 P00_5 AJ35 P00_4 AH36 P00_3 AH35 P00_2 AK38 P00_1 AJ38 P00_0 AH37 P01_7 AG37 P01_6 AG35 P01_5 AG36 P01_4 AF35 P01_3 AF36 P01_2 AH38 P01_1 AF37 P01_0...

  • Page 97

    P04_4 P04_3 P04_2 P04_1 P04_0 P05_7 P05_6 P05_5 P05_4 P05_3 P05_2 P05_1 P05_0 P06_7 P06_6 P06_5 P06_4 P06_3 P06_2 P06_1 P06_0 P07_7 P07_6 P07_5 P07_4 P07_3 P07_2 P07_1 P07_0 P08_7 P08_6 P08_5 BGRNTX BGRNTX P08_4 P08_3 P08_2 P08_1 P08_0 P09_7 P09_6 P09_5 P09_4...

  • Page 98

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions P10_7 P10_6 P10_5 P10_4 P10_3 P10_2 P10_1 P10_0 P11_7 P11_6 P11_5 P11_4 P11_3 P11_2 P11_1 P11_0 P12_7 P12_6 P12_5 P12_4 P12_3 P12_2 P12_1 P12_0 P13_7 P13_6 P13_5 P13_4 P13_3 P13_2 P13_1 P13_0 P14_7 P14_6 P14_5...

  • Page 99

    P15_2 P15_1 P15_0 P16_7 P16_6 P16_5 P16_4 P16_3 P16_2 P16_1 P16_0 P17_7 P17_6 P17_5 P17_4 P17_3 P17_2 P17_1 P17_0 P18_7 P18_6 P18_5 P18_4 P18_3 P18_2 P18_1 P18_0 P19_7 P19_6 P19_5 P19_4 P19_3 P19_2 P19_1 P19_0 P20_7 P20_6 P20_5 P20_4 P20_3 P20_2 P20_1 P20_0...

  • Page 100

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions P21_5 P21_4 P21_3 P21_2 P21_1 P21_0 P22_7 P22_6 P22_5 P22_4 P22_3 P22_2 P22_1 P22_0 P23_7 P23_6 P23_5 P23_4 P23_3 P23_2 P23_1 P23_0 P24_7 P24_6 P24_5 P24_4 P24_3 P24_2 P24_1 P24_0 P25_7 P25_6 P25_5 P25_4 P25_3...

  • Page 101

    P26_0 P27_7 P27_6 P27_5 P27_4 P27_3 P27_2 P27_1 P27_0 ALARM_1 ALARM_0 P28_7 P28_6 P28_5 P28_4 P28_3 P28_2 P28_1 P28_0 P29_7 P29_6 P29_5 P29_4 P29_3 P29_2 P29_1 P29_0 P30_7 P30_6 P30_5 P30_4 P30_3 P30_2 P30_1 P30_0 P31_7 P31_6 P31_5 P31_4 P31_3 P31_2 P31_1 P31_0...

  • Page 102

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions P32_5 P32_4 P32_3 P32_2 P32_1 P32_0 P33_7 P33_6 P33_5 P33_4 P33_3 P33_2 P33_1 P33_0 P34_7 P34_6 P34_5 P34_4 P34_3 P34_2 P34_1 P34_0 P35_7 P35_6 P35_5 P35_4 P35_3 P35_2 P35_1 P35_0 INITX RSTX HSTX NMIX MD_2...

  • Page 103

    ICLK ICD_3 ICD_2 ICD_1 ICD_0 ICS_2 ICS_1 ICS_0 BREAK PLEVEL EXRAM TRSTX TCLK TOEX TWRX TCE1X TADSCX TAD_15 TAD_14 TAD_13 TAD_12 TAD_11 TAD_10 TAD_9 TAD_8 TAD_7 TAD_6 TAD_5 TAD_4 TAD_3 TAD_2 TAD_1 TAD_0 TDT_68 TDT_67 TDT_66 TDT_65 TDT_64 TDT_63 TDT_62 TDT_61 TDT_60 TDT_59...

  • Page 104

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions TDT_56 TDT_55 TDT_54 TDT_53 TDT_52 TDT_51 TDT_50 TDT_49 TDT_48 TDT_47 TDT_46 AU10 TDT_45 AT10 TDT_44 AR10 TDT_43 AT11 TDT_42 AR11 TDT_41 TDT_40 AV10 TDT_39 AU11 TDT_38 AU12 TDT_37 AR12 TDT_36 AT12 TDT_35 AR13 TDT_34 AT13...

  • Page 105

    AR18 TDT_11 AV18 TDT_10 AR19 TDT_9 AU19 TDT_8 AT19 TDT_7 AV19 TDT_6 AT20 TDT_5 AV20 TDT_4 AR20 TDT_3 AU20 TDT_2 AR21 TDT_1 AV21 TDT_0 AV22 EMRAM AU21 ECSX AT21 EWRX_3 AU22 EWRX_2 AT22 EWRX_1 AR22 EWRX_0 AR23 EECSX AV23 EEWEX AU23 EEOEX AV24...

  • Page 106

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions AR29 EEA_0 AT29 EED_31 AR30 EED_30 AT30 EED_29 AU31 EED_28 AU32 EED_27 AV31 EED_26 AV32 EED_25 AT31 EED_24 AV33 EED_23 AR32 EED_22 AV34 EED_21 AU33 EED_20 AU34 EED_19 AT32 EED_18 AT33 EED_17 AR33 EED_16 AV35...

  • Page 107

    AK37 FLASH_FRSTX VDD5 VDD5 VDD5 VDD5 VDD5 AP11 VDD5 AP19 VDD5 AP23 VDD5 AP31 VDD5 AM35 VDD5 AH34 VDD5 AD34 VDD5 VDD5 VDD5 VDD5 VDD5 VDD5 VDD5 VDD5 VDD5 VSS5 VSS5 VSS5 VSS5 AJ34 VSS5 AE34 VSS5 AA34 VSS5 VSS5 VSS5 VSS5 VSS5...

  • Page 108

    Chapter 3 MB91460 Series Basic Information 6.Pin Definitions HVDD5 HVSS5 HVSS5 HVSS5 AVSS AVRL AVRH5 AVCC5 AVRH3 AVCC3 VDD5R VDD5R VDD5R VDD5R AA38 VCC3C VCC3C VCC3C VCC3C VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VDD3 VSS3 VSS3...

  • Page 109

    AP20 VSS3 AP24 VSS3 AP28 VSS3 AP30 VSS3 AT36 VSS3 AU37 VSS3 AL34 VSS3 TS00_0 TS00_0 TS00_0 TS00_0 TS00_0 TS00_0 TS00_0 Chapter 3 MB91460 Series Basic Information 6.Pin Definitions...

  • Page 110: I/o Circuit Type

    Chapter 3 MB91460 Series Basic Information 7.I/O Circuit Type 7. I/O Circuit Type The table below describes the circuit types which are used on the evaluation device MB91V460 Rev.A. Please refer to the datasheets for information about the circuit type of each pin used on the flash devices. Pull Up/ Type Pull Down...

  • Page 111

    TE11_0 TE20_0 TE21_0 Dn (ctrl) TE22_0 TS00_0 TS01_0 TS02_0 Chapter 3 MB91460 Series Basic Information Tool Tool Tool Tool VDD 5V 7.I/O Circuit Type 8 mA 4 mA 4 mA 8 mA...

  • Page 112: Pin State Table

    Chapter 3 MB91460 Series Basic Information 8.Pin State Table 8. Pin State Table Explanation of the meaning of words and phrases used in the pin state table according to the chosen mode. • Input enable: It is possible to input a signal to the device. •...

  • Page 113

    AD35 P03_7 AC35 P03_6 AB37 P03_5 AC36 P03_4 AA37 P03_3 AB36 P03_2 AD38 P03_1 AC38 P03_0 AB35 AA36 AB38 AA35 MONCL P04_7 P04_6 P04_5 P04_4 P04_3 P04_2 P04_1 P04_0 P05_7 P05_6 P05_5 P05_4 P05_3 P05_2 P05_1 P05_0 P06_7 P06_6 P06_5 P06_4 P06_3 P06_2...

  • Page 114

    Chapter 3 MB91460 Series Basic Information 8.Pin State Table P08_7 P08_6 BGRNT P08_5 P08_4 P08_3 WRX3 P08_2 WRX2 P08_1 WRX1 P08_0 WRX0 P09_7 CSX7 P09_6 CSX6 P09_5 CSX5 P09_4 CSX4 P09_3 CSX3 P09_2 CSX2 P09_1 CSX1 P09_0 CSX0 P10_7 P10_6 MCLKE MCLKE P10_5 MCLKI MCLKI /MCLKI P10_4 MCLKO MCLKO /MCLKO...

  • Page 115

    P12_7 DEOP3 DEOP3 P12_6 DEOTX3DEOTX3 DEOP3 P12_5 DACKX3 DACKX3 P12_4 DREQ3 DREQ3 P12_3 DEOP2 DEOP2 P12_2 DEOTX2DEOTX2 DEOP2 P12_1 DACKX2 DACKX2 P12_0 DREQ2 DREQ2 P13_7 DEOP1 DEOP1 P13_6 DEOTX1DEOTX1 DEOP1 P13_5 DACKX1 DACKX1 P13_4 DREQ1 DREQ1 P13_3 DEOP0 DEOP0 P13_2 DEOTX0DEOTX0 DEOP0 P13_1 DACKX0 DACKX0 P13_0 DREQ0 DREQ0 ICU7/...

  • Page 116

    Chapter 3 MB91460 Series Basic Information 8.Pin State Table P17_7 P17_6 P17_5 P17_4 P17_3 P17_2 P17_1 P17_0 P18_7 P18_6 P18_5 P18_4 P18_3 P18_2 P18_1 P18_0 P19_7 P19_6 P19_5 P19_4 P19_3 P19_2 P19_1 P19_0 P20_7 P20_6 P20_5 P20_4 P20_3 P20_2 P20_1 P20_0 P21_7 P21_6...

  • Page 117

    P22_7 SCL1 P22_6 SDA1 P22_5 SCL0 P22_4 SDA0 P22_3 P22_2 P22_1 P22_0 P23_7 P23_6 P23_5 P23_4 P23_3 P23_2 P23_1 P23_0 INT15 Output Hi-Z, Output Hi-Z, INT14 Input Input enabled enabled INT13 INT12 INT11 Output Hi-Z, Output Hi-Z, INT10 Input Input enabled enabled INT9...

  • Page 118

    Chapter 3 MB91460 Series Basic Information 8.Pin State Table P24_7 P24_6 P24_5 P24_4 P24_3 P24_2 P24_1 P24_0 P25_7 P25_6 P25_5 P25_4 P25_3 P25_2 P25_1 P25_0 P26_7 P26_6 P26_5 P26_4 P26_3 P26_2 P26_1 P26_0 P27_7 P27_6 P27_5 P27_4 P27_3 P27_2 P27_1 P27_0 ALARM_ ALARM_...

  • Page 119

    P29_7 P29_6 P29_5 P29_4 P29_3 P29_2 P29_1 P29_0 P30_7 P30_6 P30_5 P30_4 P30_3 COM3 P30_2 COM2 P30_1 COM1 P30_0 COM0 P31_7 SEG39 P31_6 SEG38 P31_5 SEG37 P31_4 SEG36 P31_3 SEG35 P31_2 SEG34 P31_1 SEG33 P31_0 SEG32 P32_7 SEG31 P32_6 SEG30 SCK15 P32_5 SEG29 SOT15 P32_4...

  • Page 120

    Chapter 3 MB91460 Series Basic Information 8.Pin State Table P34_7 P34_6 P34_5 P34_4 P34_3 P34_2 P34_1 P34_0 P35_7 P35_6 P35_5 P35_4 P35_3 P35_2 P35_1 P35_0 INITX RSTX HSTX NMIX MD_2 MD_1 MD_0 SEG15 SEG14 SCK11 SEG13 SOT11 Output Hi-Z, Output Hi-Z, SEG12 SIN11 Input Input...

  • Page 121: Chapter 4 Cpu Architecture

    Chapter 4 CPU Architecture This chapter describes the architecture of FR60 family CPU. 1. Overview The CPUs of the FR60 family series employ RISC architecture and advanced function instructions for embedded application. CPU of FR60 family employs Harvard architecture whose instruction bus and data bus are independent. “32- bit/16-bit bus converter”...

  • Page 122: Features

    Chapter 4 CPU Architecture 2.Features 2. Features ■ Features of internal architecture • RISC architecture • Base instruction: 1 instruction/1 cycle • 32-bit architecture • General-purpose register: 32-bit x 16 • 4GB of linear memory space • Equipped with multiplier. •32-bit x 32-bit multiplication: 5 cycles •16-bit x 16-bit multiplication: 3 cycles •...

  • Page 123: Cpu

    3. CPU The CPU realizes the compact implementation of a 32-bit RISC FR architecture. It employs a 5-stage instruction pipeline method to execute 1 instruction per 1 cycle. This pipeline consists of the following stages. • Instruction fetch (IF): outputs instruction address to fetch instruction. •...

  • Page 124: Instruction Overview

    Chapter 4 CPU Architecture 6.Instruction Overview 6. Instruction Overview The FR60 family supports logic operation, bit operation and direct addressing instruction optimized for embedded application as well as general RISC instruction system. Instruction-set list is shown in the appendix. Since each instruction is 16-bit length (some instruction is 32-bit or 48-bit length), it enables you to generate compact program code.

  • Page 125: Data Structure

    7. Data Structure FR60 has two data allocations as follows. ■ Bit Ordering FR60 uses little endian as bit ordering. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ■...

  • Page 126: Word Alignment

    Chapter 4 CPU Architecture 8.Word Alignment 8. Word Alignment Since instructions and data are accessed by byte, allocated addresses vary by instruction length or data width. ■ Program Access FR60 program is required to be allocated in addresses multiplied by 2. PC's bit0 is cleared for instruction execution upon the PC update.

  • Page 127: Addressing

    9. Addressing Address space is 32-bit linear. ■ Map 0000 0000 0000 0100 0000 0200 0000 0400 000F FC00 000F FFFF FFFF FFFF FR60’s logical address space is 4GB (2 ■ Direct Addressing Area The following areas are used for I/O. These spaces are referred to as direct addressing area where you can specify direct operand address by the instruction.

  • Page 128

    Chapter 4 CPU Architecture 9.Addressing...

  • Page 129: Chapter 5 Cpu Registers

    Chapter 5 CPU Registers 1. General-purpose Registers Registers R0 through R15 are general-purpose registers. These registers are used for accumulator and memory access pointers on various operations. Of 16 registers, the following registers are reserved for special application. • R13: Virtual accumulator •...

  • Page 130

    Chapter 5 CPU Registers 2.Dedicated Registers 2.1 PC: Program Counter Program Counter (PC) consists of 32 bits. Figure 2-2 Bit Structure of Program Counter (PC) Program counter (PC) indicates active instruction address. Upon the execution of the instruction, program counter (PC)’s bit 0 is cleared. 2.2 PS: Program Status Register Program status register (PS) is the register to hold program status which consists of three parts including ILM, SCR and CCR.

  • Page 131

    This bit becomes “0” by reset. • [Bit 3] N: Negative flag This bit indicates the sign when operation results is deemed as integer represented by two’s-complement numbers. It indicates that operation result is positive value. It indicates that operation result is negative value. •...

  • Page 132

    Chapter 5 CPU Registers 2.Dedicated Registers program. ■ ILM: Interrupt Level Mask Register Figure 2-6 Register Structure of Interrupt Level Mask Register (ILM) ILM4 • This is the register to hold interrupt level mask value. This bit uses the value held in ILM as level mask. •...

  • Page 133

    ■ Caution: PS Register Since some instructions have already processed PS register in advance, the following exception operations may break interrupt processing routine during the use of debugger, or update PS flag data. In either cases, after returning from EIT, it is designed to execute the correct process so that operations before and after EIT will be processed in accordance with specification.

  • Page 134

    Chapter 5 CPU Registers 2.Dedicated Registers 2.3 TBR: Table-base Register Table-base register (TBR) consists of 32 bits. Figure 2-7 Bit Structure of Table-base Register (TBR) Table-base register holds head address of vector table used for EIT processes. Vector address is made by adding offset value specified in TBR and EIT each. 2.4 RP: Return Pointer Return pointer (RP: Return Pointer) consists of 32 bits.

  • Page 135

    2.6 USP: User Stack Pointer User Stack Pointer (USP) consists of 32 bits. Figure 2-10 Bit Structure of User Stack Pointer (USP) When S flag is “1”, this pointer works as R15. You can explicitly specify USP. You can not use it for RETI instruction. This pointer saves and returns PC and PS values at the position where system stack pointer (SSP) indicates.

  • Page 136

    Chapter 5 CPU Registers 2.Dedicated Registers 2.7 MDH, MDL: Multiply & Divide Register Multiply & Divide register (MDH/MDL) consists of 32 bits. Figure 2-12 Bit Structure of Multiply & Divide Register (MDH/MDL) This is the register for multiplication and division and consists of 32 bits. Initial value by reset is indeterminate.

  • Page 137: Chapter 6 Eit: Exceptions, Interrupts And Traps

    Chapter 6 EIT: Exceptions, Interrupts and Traps 1. Overview EIT means that some events interrupt current program to execute other programs. EIT stands for Exception, Interrupt and Trap. • Exception is the event which is generated in association with active context. It is returned to the instruction which triggered the exception.

  • Page 138: Eit Interrupt Level

    Chapter 6 EIT: Exceptions, Interrupts and Traps 5.EIT Interrupt Level 5. EIT Interrupt Level Interrupt level is between 0 and 31, and controlled with 5 bits. Table 5-1 Interrupt Level of EIT Level Binary Decimal 00000 (Reserved for system) 00011 (Reserved for system) 00100 INTE instruction...

  • Page 139: Multiple Eit Processing

    7. Multiple EIT Processing If multiple EITs are generated at the same time, CPU repeats the operation which selects one of the EIT to accept, and then executes EIT sequence, and detects EIT again. If there is no EIT to accept upon detecting EIT, CPU executes instruction of the last accepted EIT handler.

  • Page 140

    Chapter 6 EIT: Exceptions, Interrupts and Traps 7.Multiple EIT Processing Main routine Priority (High) Generation of NMI (Middle) Execution of INT instruction (Low) Execution of user interrupt Figure 7-1 Multiple EITs Process INT instruction handler User interrupt handler (2) Second execution (3) Third execution NMI handler (1) First execution...

  • Page 141: Operation

    8. Operation In the following sections, note that source “PC” means instruction address which detected each EIT trigger. Similarly, “address of next instruction” means the following addresses based on the instruction which detected the EIT. • When LDI is 32: PC+6 •...

  • Page 142

    Chapter 6 EIT: Exceptions, Interrupts and Traps 8.Operation 8.2 Operation of INT Instruction INT No. u8 instruction is operated as follows. Branches to interrupt handler of vector specified in u8. ■ Operation 1. The contents of the program status (PS) are saved to the system stack. 2.

  • Page 143

    8.4 Operation of Step Trace Trap If you set T flag at SCR within PS and enable step trace trap function, step trace trap is generated with each executing instruction. ■ Condition for detecting step trace trap T flag = 1 Instructions are other than delayed branch command.

  • Page 144: Caution

    Chapter 6 EIT: Exceptions, Interrupts and Traps 9.Caution 8.6 Coprocessor Absent Trap If you execute coprocessor instruction for unmounted coprocessor, coprocessor absent trap is generated. ■ Operation 1. The contents of the program status (PS) are saved to the system stack. 2.

  • Page 145: Chapter 7 Branch Instruction

    Chapter 7 Branch Instruction FR60 can instruct the operation with and without delay slot for branch instruction. 1. Branch Instruction with Delay Slot • Branch instruction with delay slot JMP:D @Ri CALL:D label12 BRA:D label9 BNO:D label9 BC:D label9 BNC:D label9 BV:D label9 BNV:D label9 BLE:D label9...

  • Page 146: Actual Example (with Delay Slot)

    Chapter 7 Branch Instruction 3.Actual Example (with Delay Slot) 3. Actual Example (with Delay Slot) 3.1 JMP:D @Ri / CALL:D @Ri Instruction Ri referred in JMP:D @Ri / CALL:D @Ri instruction remains intact even if instructions within delay slot update Ri. •...

  • Page 147: Restrictions On Branch Instruction With Delay Slot

    4. Restrictions on Branch Instruction with Delay Slot 4.1 Available Instructions for Delay Slot Instructions which meet the following requirements can only be executed in delay slot. • 1-cycle instruction • Non-branch instruction • Instruction which does not affect any operation even if its sequence is changed. “1-cycle instruction”...

  • Page 148: Branch Instruction Without Delay Slot

    Chapter 7 Branch Instruction 5.Branch Instruction without Delay Slot 5. Branch Instruction without Delay Slot • Branch instruction without delay slot: JMP @Ri BRA label9 BC label9 BV label9 BLE label9 6. Operation of Branch Instruction without Delay Slot Operation without delay slot executes instructions in the order of instructions and never executes the instruction located in the next address where a branch instruction exists before branch.

  • Page 149: Chapter 8 Device State Transition

    Chapter 8 Device State Transition 1. Overview MB91460 basically has devices state and flow as shown below. For more information, see “3. State Transition Diagram (Page Power-on INITX INT-pin input 2. Features ■ Device state • RUN (Normal operation): State where the program is executed. •...

  • Page 150: State Transition Diagram

    Chapter 8 Device State Transition 3.State Transition Diagram 3. State Transition Diagram This section describes state transition. Figure 3-1 State Transition of MB91460 Series INIT pin = 0 (INIT) INIT pin = 1 (Cancel of INIT) Termination of oscillation-stabilization wait Cancel of reset (RST) Software reset (RST) Sleep (Writing instruction)

  • Page 151

    3.1 RUN (Normal Operation) This is the state where program is executed with all clocks and all circuits are enabled. This state has various paths for a state transition. However, if the synchronous reset mode is selected the state transition operations for some requests are different from normal reset mode. For more information, see the chapter of “Chapter 9 Reset (Page 3.2 SLEEP...

  • Page 152

    Chapter 8 Device State Transition 3.State Transition Diagram 3.5 Oscillation-stabilization-wait Reset This is the state where the device is stopped. This state is entered upon a setting-initialization reset (INIT). All internal circuits are stopped except for clock generation control parts (timebase counter and device state control parts).

  • Page 153

    Chapter 8 Device State Transition 3.State Transition Diagram...

  • Page 154

    Chapter 8 Device State Transition 3.State Transition Diagram...

  • Page 155: Chapter 9 Reset

    Chapter 9 Reset 1. Overview When a reset is triggered, the device halts the program and all hardware operation, and then initializes all states. This state is called a reset. When the reset trigger condition is removed, the device changes from this initialized state to restart the program and hardware operation.

  • Page 156: Configuration

    Chapter 9 Reset 3.Configuration • A settings initialization reset (INIT) is followed by an operation reset (RST) after the oscillation stabilization time elapses. 3. Configuration State transition control circuit (reset related) OSCD1 STCR: bit1 STCR: bit1 Main clock continues to operate during stop mode Main clock halts during stop mode STCR: bit0 STCR: bit0...

  • Page 157: Registers

    4. Registers 4.1 RSRR: Reset Cause Register Stores the cause of the previous reset, and sets the period and activation control for the watchdog timer. • RSRR: Address 0480h (Access: Byte, Half-word) INIT HSTB WDOG R/WX R/WX R/WX Note: See “Meaning of Bit Attribute Symbols (Page Reading the reset request cause returns the reset cause flags and then clears the flag values to “0”.

  • Page 158

    Chapter 9 Reset 4.Registers Indicates whether a software reset has been triggered by writing to the software reset bit (STCR.SRST). SRST No RST has been triggered by a software reset. RST has been triggered by a software reset. The software reset occurred flag (SRST) is cleared to “0” after reading. •...

  • Page 159

    4.2 STCR: Standby Control Register This register is used for software reset control (changing to standby mode, pin control in stop mode, and clock oscillation halted in stop mode), and specifies the oscillation stabilization wait time. Note: See also “Chapter 10 Standby (Page •...

  • Page 160

    Chapter 9 Reset 4.Registers 4.3 MOD: Mode Pins These pins specify the location of the mode vector and reset vector that are read after the MCU is reset. Mode pins Mode name MD2 MD1 Internal ROM mode External ROM mode 4.4 Mode Vector The data written to the mode register (MODR) by the mode vector fetch operation is called the mode data.

  • Page 161

    Initial value to load into PC. Mode 000FFFF8 XXXXXXXX XXXXXXXX XXXXXXXX Vector Reset 000FFFFC Vector 4.6 Device Mode Overview The following table gives an overview about supported device mode combinations on the MB91460 series: Mode pins Mode/Reset Vector MD2 MD1 MD0 access area Internal External...

  • Page 162: Init Pin Input (init: Settings Initialization Reset)

    Chapter 9 Reset 5.INIT Pin Input (INIT: Settings Initialization Reset) 5. INIT Pin Input (INIT: Settings Initialization Reset) 5.1 Trigger The pin is used to trigger a settings initialization reset. A settings initialization reset (INIT) request remains active while the pin remains at the “L” level. Keep the “L”...

  • Page 163

    5.6 Reset Cancellation Sequence After the cancellation (removal) of the settings initialization reset (external INITX pin) request the device performs the following operations in the sequence listed. 1. Removal of settings initialization reset (INIT) 2. Set operation reset (RST) state and start internal clock 3.

  • Page 164: Watchdog Reset (init: Settings Initialization Reset)

    Chapter 9 Reset 6.Watchdog Reset (INIT: Settings Initialization Reset) 6. Watchdog Reset (INIT: Settings Initialization Reset) 6.1 Trigger Writing to the watchdog timer control register (RSRR) starts the watchdog timer. Once started, a watchdog reset request is generated unless “A5 delay register (WPR) within the time specified by the watchdog period selection bits (RSRR.WT[1:0]).

  • Page 165: Software Reset (rst: Operation Initialization Reset)

    7. Software Reset (RST: Operation Initialization Reset) 7.1 Trigger Writing “0” to the software reset bit (STCR.SRST) generates a software reset request. A software reset requests an operation reset (RST). 7.2 Releasing the Reset Request The software reset request is released after the request is received and the operation reset (RST) generated. 7.3 Flag When software reset request triggers an operation reset (RST), the software reset flag (RSRR.SRST) is set to “1”.

  • Page 166: Reset Operation Modes

    Chapter 9 Reset 8.Reset Operation Modes 8. Reset Operation Modes The following two different modes can be used for an operation reset (RST): • Normal (asynchronous) reset mode • Synchronous reset mode Which mode to use is specified by the synchronous reset operation enable bit (TBCR.SYNCR). Pin input resets and watchdog resets always use normal reset mode.

  • Page 167: Mcu Operation Mode

    9. MCU Operation Mode After release of a reset, the MCU starts operation in the mode specified by the mode pins and mode data. Operation mode Bus mode Access mode 9.1 Bus Modes and Access Modes ■ Bus mode The bus mode controls internal ROM operation and the external access function. The bus mode is specified by the mode setting pins (MD2, MD1, MD0) and internal ROM enable bit (Mode-Vector.

  • Page 168: Caution

    Chapter 9 Reset 10.Caution 10. Caution • INIT pin input Ensure that a settings initialization reset (INIT) is applied to this pin when the power is turned on. Also, after turning on the power, ensure a sufficient oscillation stabilization wait time is provided for the oscillation circuit by holding the input to the pin at the “L”...

  • Page 169

    Chapter 9 Reset 10.Caution...

  • Page 170

    Chapter 9 Reset 10.Caution...

  • Page 171: Chapter 10 Standby

    Chapter 10 Standby 1. Overview Two standby modes (low power consumption modes) are available. • Sleep mode: Stops the program • Stop mode: Shuts down the device Note: It is possible to keep the Real Time Clock active in STOP mode (see chapter RTC). 2.

  • Page 172: Configuration

    Chapter 10 Standby 3.Configuration 3. Configuration SYNCS TB CR: bit0 Setting prohibited Synchronous standby OSCD1 STCR: bit0 Do not halt main clock oscillation during stop mode. Halt main clock oscillation during stop mode. STCR: bit5 Maintain same states during stop mode. Set pins to high impedance during stop mode.

  • Page 173: Registers

    4. Registers 4.1 STCR: Standby Control Register Used to control transition to the stop and sleep standby modes, and to specify the pin states and whether to halt the oscillation during stop mode. Note: See “Chapter 9 Reset (Page • STCR: Address 0481h (Access: Byte) STOP SLEEP (See...

  • Page 174

    Chapter 10 Standby 4.Registers • Bit0: Main clock oscillation halt OSCD1 4.2 TBCR: Timebase timer control register This register controls the timebase timer interrupts and the options for resets and standby operation. Note: See also “Chapter 19 Timebase Timer (Page •...

  • Page 175: Operation

    5. Operation 5.1 Sleep Mode ■ Entering sleep mode Writing “1” to the sleep mode bit (STCR.SLEEP) changes to sleep mode. The device remains in this mode until an event occurs to wakeup the device from sleep mode. (See “8. Caution (Page No.165)”.) ■...

  • Page 176

    Chapter 10 Standby 5.Operation 5.2 Stop mode ■ Entering stop mode Writing “1” to the stop mode bit (STCR.STOP) changes to stop mode. The device remains in this mode until an event occurs to wakeup the device from stop mode. (See “8.

  • Page 177: Settings

    6. Settings Table 6-1 Settings Required to Change to Sleep Mode Setting Interrupt settings Synchronous standby settings Change to sleep mode Operational restrictions *:For the setting procedure, refer to the section indicated by the number. Table 6-2 Settings Required to Change to Stop Mode Setting Selects the oscillation stabilization wait time...

  • Page 178

    Chapter 10 Standby 7.Q&A 7.2 How do I change to stop mode? • When operating on the main PLL clock, the operating clock must be set to the main clock divided by two. “7.3 How do I select the operating clock source? (Page the operating clock.

  • Page 179

    7.6 How do I recover from stop mode? The following events end stop mode: • The following four interrupts change the device to the oscillation stabilization wait state. • External level-detect interrupt or edge-detect interrupt. • Oscillation stabilization wait timer for the main clock when oscillation not halted. •...

  • Page 180

    Chapter 10 Standby 7.Q&A...

  • Page 181: Caution

    8. Caution • Points to note when changing to sleep mode When changing to sleep mode, set the synchronous standby operation enable bit (TBCR.SYNCS= “1”). Also, in order to change to sleep mode with synchronous standby operation enabled, the STCR register must be read after writing to the SLEEP bit.

  • Page 182

    Chapter 10 Standby 8.Caution...

  • Page 183: Chapter 11 Memory Controller

    Chapter 11 Memory Controller 1. Overview This module combines the interfaces to the F-Bus memory resources, FLASH and General Purpose RAM (also ref- erenced as I/D-RAM). These memories can be combined CODE and DATA storage. While code fetch is possible in general via the F-Bus at the FR core, due to performance reasons the code fetch is accellerated by a direct I-Bus connection in MB91460 series MCUs.

  • Page 184: Registers

    Chapter 11 Memory Controller 7.Registers • Reset vector address: 0x000ffffc; return 0x00030000 at RAM execution mode (jump to test pro- gram) or return 0x0000bff8 in any other case (jump to Boot ROM) • If FMCS_FIXE is switched off, the FLASH memory can be accessed on addresses 0x000ffff8 and 0x000ffffc.

  • Page 185: Explanations Of Registers

    8. Explanations of Registers ● FLASH Interface Control Register Control Register byte 0 Address : 7000 Read/write ⇒ (R/W) (R/W) (R/W) (R) Default value⇒ Control Register byte 1 Address : 7001 Read/write ⇒ Default value⇒ Control Register byte 2 Address : 7002 Read/write ⇒...

  • Page 186

    Chapter 11 Memory Controller 8.Explanations of Registers • BIT[29]: BIRE - Burn-In ROM Enable Disable Burn-In ROM and enable FLASH access at Burn-In ROM address Enable access to the Burn-In ROM (default) The BIRE bit is a reserved bit and should not be used. •...

  • Page 187

    It is recommended to always refer to the setting requirements of ATDIN, EQIN and waitcycles for each product which are provided by Fujitsu (see the related datasheets). (PHASE setting is not available on MB91460 series) Chapter 11 Memory Controller 8.Explanations of Registers...

  • Page 188

    Some embedded FLASH memories supports switching the 64 bit read mode to increase the access per- formance. Please contact Fujitsu if this feature is available on the product you are using. This bit is cleared after reset. The 32 bit read and write access to the FLASH memory is enabled by de- fault.

  • Page 189

    • BIT[7]: FLUSH - Flush instruction cache entries Flushing the instruction cache entries has been completed Actually flushing the instruction cache entries This bit is set after reset. If the FLUSH bit is set, the instruction cache entries are flushed sequentially. During this initialization the cache is disabled.

  • Page 190

    Chapter 11 Memory Controller 8.Explanations of Registers • BIT[4]: PFMC - Prefetch Miss Cache enable Standard cache algorithm (default) Prefetch misses are cached only This bit is cleared after reset. The prefetch miss cache is disabled by default. The instruction cache uses the stand- ard algorithm of writing cache entries for each accessed instruction word from FLASH.

  • Page 191

    • BIT[1:0]: SZ[1:0] - Cache size configuration 0kByte - Cache disabled 4kByte (1024 entries) 8kByte (2048 entries) 16kByte (4096 entries) (default) The cache size is set to ’11’ after reset. The cache size can be configured on the evaluation device (EVA). Remark: The number of cache entries determines the TAG initialization period at device startup, see the explanai- tion of the FLUSH bit above.

  • Page 192

    Chapter 11 Memory Controller 8.Explanations of Registers WTP controls the wait timing of the FLASH access in case of page hit for Page Mode FLASH. The WTP configuration is in units of clock cycles. The value of WTP should be set to the intra page access time (cycle time) of the FLASH memory in number of clock cycles, subtracted by one.

  • Page 193

    FLASH access cycle waveform flash_start ATDIN EQIN flash_wait tATD Figure 8-1 Timing of a FLASH access cycle Figure shows the example of a FLASH access cycle. In the FMWT register the three parts of the FLASH timing tATD, tALEH, tEQ and tWTC can be configured independently. The table below lists the configuration values for this example.

  • Page 194

    Chapter 11 Memory Controller 8.Explanations of Registers ● FLASH Memory Adddress Check register (FMAC) Address 7008 -------- This register captures the address at the begin of a FLASH access cycle for test purposes. The register could be read only. ● Non-cacheable area definition The non-cacheable area definition registers FCHA0 and FCHA1 define the FLASH region not to be cached.

  • Page 195: Chapter 12 Instruction Cache

    Chapter 12 Instruction Cache This chapter describes the instruction cache memory included in MB91460 family members and its operation. 1. General description The instruction cache is a fast local memory for temporary storage. Once an instruction is accessed to be fetched from external slower memory, the instruction cache holds the instruction code inside to increase the speed of accessing the same code from then on.

  • Page 196

    Chapter 12 Instruction Cache 2.Main body structure Way 1 Way 2 [Bits 31 to 9] Address tag This area stores the upper 23 bits of the memory address of the instruction cached in the corresponding block. For example, memory address IA of the instruction data stored in sub- block k in block i is obtained from the following equation: IA = address tag x 2 The address tag is used to check for a match with the instruction address requested for...

  • Page 197

    FLUSHbit is set to "0" when the cache is flushed.) [Bit 1] LRU bit (way 1 only) This bit exists only in the instruction cache tag in way 1. The bit indicates way 1 or 2 as the way containing the last entry accessed in the selected set. When set to "1", the LRU bit indicates that the entry of the set in way 1 is the last entry accessed.

  • Page 198

    Chapter 12 Instruction Cache 2.Main body structure [Bit 7] RAM: RAM Mode Setting this bit to "1" causes the cache to operate in RAM mode. By placing the cache in RAM mode, the cache RAM is mapped as shown in Figure I-CACHE-3 while the cache is enabled with the ENAB bit set to "1".

  • Page 199

    Chapter 12 Instruction Cache 2.Main body structure Figure 2-3 I-Cache Address Map...

  • Page 200

    Chapter 12 Instruction Cache 2.Main body structure Figure 2-4 I-Cacheable Area...

  • Page 201: Operating Mode Conditions

    3. Operating mode conditions ● Cache status in various operating modes The table below indicates the prevailing state for disable and flush when the associated bit is changed by bit manipulation instruction, etc. Immediately after a Reset Contents Cache Memory undefined Address Contents...

  • Page 202: Cacheable Areas In The Instruction Cache

    Chapter 12 Instruction Cache 4.Cacheable areas in the instruction cache ● Cache Entry Update Cache entries are updated as shown in the following table. Not updated Miss The memory data is loaded, and the cache entry data is updated. 4. Cacheable areas in the instruction cache •...

  • Page 203

    To disable the I-Cache, set the ENAB bit to 0. Idi #0x000003e7,r0 Idi #0B00000000,r1 stb r1,@r0 In the resultant state (same as state prevailing after reset), there appears to be no cache. The cache can be turned off if the processing may experience problems due to cache overhead Locking all cached instructions To lock all the currently-cached instructions in the I-Cache, set the register GBLK bit to 1.

  • Page 204

    Chapter 12 Instruction Cache 5.Settings for handling the I-Cache Only lock information is released; locked instructions are replaced sequentially with new instructions according to the state of the LRU bit.

  • Page 205: Chapter 13 Clock Control

    Chapter 13 Clock Control 1. Overview The clock control circuit consists of the source oscillator, base clock generator, and operating clock generator. The circuit supports a range of clock speeds from the high speed clock (100MHz maximum) to the low speed clock (32.768kHz).

  • Page 206: Configuration

    Chapter 13 Clock Control 3.Configuration • External bus clock (CLKT): F/1, /2, /3, /4, /5, /6, /7, /8, ..., /16 The clock used by the external bus expansion interface. The circuits that use this clock are as follows. • External bus expansion interface •...

  • Page 207: Registers

    4. Registers 4.1 CLKR: Clock Source Control Register Selects the clock source for the base clock used to run the MCU and controls the PLL. • CLKR: Address 0484h (Access: Byte) R/W0 R/W0 R/W0 (See “Meaning of Bit Attribute Symbols (Page •...

  • Page 208

    Chapter 13 Clock Control 4.Registers • After setting “11B” (subclock), insert one or more NOP instructions. • Selecting the subclock as the clock source is prohibited while the subclock selection enable bit (SCKEN) is “0”. (See table for details.) Table 4-1 Cases When the CLKS1 and CLKS0 Bits May or May Not be Modified Modify permitted “00”...

  • Page 209

    4.2 DIV0R: Clock Division Setting Register 0 Sets the division ratio for the clocks used for internal device operation. DIVR0: Address 0486h (Access: Byte, Half-word) (See “Meaning of Bit Attribute Symbols (Page • Sets up the clock for the CPU and internal buses (CLKB), and the clock for the peripheral circuits and peripheral bus (CLKP).

  • Page 210

    Chapter 13 Clock Control 4.Registers 1010 1011 1100 1101 1110 1111 • Sets the clock division ratio for the clock used by the peripheral circuits and peripheral bus (CLKP). The 16 options listed in the table are available. • Do not set a division ratio that exceeds the maximum operating frequency of the MCU. Φ/11 Φ/12 Φ/13...

  • Page 211

    4.3 DIV1R: Clock Division Setting Register 1 Sets the division ratio for the clocks used for internal device operation. • DIVR1: Address 0487h (Access: Byte, Half-word) (See “Meaning of Bit Attribute Symbols (Page Sets the clock division ratio (relative to the base clock) for the clock used by the external bus interface (CLKT). •...

  • Page 212

    Chapter 13 Clock Control 4.Registers 4.4 CSCFG: Clock Source Configuration Register This register controls the main clock oscillation in subclock mode • CSCFG: Address 04AEh (Access: Byte) EDSUEN PLLLOCK RCSEL (See “Meaning of Bit Attribute Symbols (Page • bit7: EDSU/MPU Enable EDSUEN EDSU/MPU is (clock) disabled [Initial value] EDSU/MPU is (clock) enabled...

  • Page 213

    Chapter 13 Clock Control 4.Registers -1-- Subclock Calibration is sourced by RC Oscillation 0--- LCD Controller is sourced by Sub Oscillation 1--- LCD Controller is sourced by RC Oscillation...

  • Page 214

    Chapter 13 Clock Control 4.Registers 4.5 OSCCR: Oscillation Control Register This register controls the main clock oscillation in subclock mode • OSCCR: Address 04CCh (Access: Byte) – – – RX/WX RX/WX RX/WX (See “Meaning of Bit Attribute Symbols (Page • bit7-2: Undefined bit Writing does not affect the operation.

  • Page 215: Operation

    5. Operation This section describes how to setup and switch between clocks. 5.1 Clock Setup Sequence (Example) Setup operating clocks. Setup base clock. 5.2 Halting and Restarting the Main Clock Oscillation During Subclock Mode (Example) (1) Select sub clock mode. (2) Halt main PLL (PLL1EN = "0"), halt main clock oscillation (OSCDS1 = "0") Sub clock mode with main clock...

  • Page 216

    Chapter 13 Clock Control 5.Operation 5.3 Notes ■ Main PLL control After initialization, the main PLL oscillation is halted. While halted, the output of the main PLL cannot be selected as the clock source. After the program starts, first set the multiplier for the main PLL that you want to use as the clock source and then, after allowing a time for the main PLL to lock, change the clock source.

  • Page 217: Settings

    6. Settings Table 6-1 Settings for Operating at 1/2 of the Main Clock Setting Clock source selection *: For the setting procedure, refer to the section indicated by the number. Table 6-2 Settings for Operating Using the Main PLL Setting Main PLL operation enable Clock source selection *: For the setting procedure, refer to the section indicated by the number.

  • Page 218

    Chapter 13 Clock Control 7.Q & A 7. Q & A 7.1 How do I enable or disable clock operation? • There is no operation enable bit for the main clock. Main clock operation is always enabled. (Halting the oscillation in subclock mode or stop mode is handled separately.) •...

  • Page 219

    7.4 How do I set the operation clock division ratios? • CPU clock setting The CPU clock setting is set using the CLKB division ratio selection bits (DIVR0.B[3:0]). PLL multiplier ratio To select no division To select divide by 2 To select divide by 3 To select divide by 4 To select divide by 5...

  • Page 220

    Chapter 13 Clock Control 7.Q & A 7.5 How do I halt the main clock in sub clock mode? Set using the “halt main clock oscillation in subclock mode” bit (OSCCR.OSCDS1). Operation in subclock mode To not halt the main clock To halt the main clock (See “8.

  • Page 221: Caution

    8. Caution • Operation is not guaranteed if the clock source selection, main PLL multiplier setting, and division ratio setting result in a frequency that exceeds the maximum. • Take care with the sequence in which you set or modify the clock source selection. •...

  • Page 222

    Chapter 13 Clock Control 8.Caution...

  • Page 223: Chapter 14 Pll Interface

    Chapter 14 PLL Interface 1. Overview • This blockdiagram (simplified) shows the integration of the PLL and the PLL Interface with the multiplier control logic (1/M, 1/N for basic frequency multiplication and 1/G for clock auto gear). Interface MAIN Osc. Phase Correction 2.

  • Page 224: Registers

    Chapter 14 PLL Interface 4.Registers 4. Registers 4.1 PLL Control Registers Controls the PLL multiplier ratio (divide-by-M and divide-by-N) and the automatic clock gear up/down function. • PLLDIVM: Address 048Ch (Access: Byte, Halfword, Word) R0/W0 R0/W0 R0/W0 (See “Meaning of Bit Attribute Symbols (Page •...

  • Page 225

    (See “Meaning of Bit Attribute Symbols (Page • Bit7-6: Reserved bits.The read value is always “0”. • Bit5-0: PLL divide-by-N selection DVN5-DVN0 000000 000001 000010 000011 000100 000101 000110 000111 111111 (Note) The register value can not be changed once PLL is selected as clock source (CLKS[1:0]=”10”). (Note) It is strongly recommended to disable the PLL (CLKR.PLL1EN=0) while or after changing the PLLDIVM and PLLDIVN registers and to enable the PLL (CLKR.PLL1EN=1) afterwards.

  • Page 226

    Chapter 14 PLL Interface 4.Registers • PLLMULG: Address 048Fh (Access: Byte, Halfword, Word) MLG7 MLG6 MLG5 (See “Meaning of Bit Attribute Symbols (Page • Bit7-6: Reserved bitThe read value is always “0”. • Bit5-0: PLL auto gear divide-by-G step multiplier selection MLG5-MLG0 00000000 00000001...

  • Page 227

    • While switching from clock source PLL to clock source oscillator this flag is set when the divide-by-G counter reaches the programmed end value. • This bit is read as “1” at a Read-Modify-Write instructions. Writing “1” has no effect. •...

  • Page 228: Recommended Settings

    Chapter 14 PLL Interface 5.Recommended Settings 5. Recommended Settings PLL Input Frequency Parameter (CK) DIVM [MHz] • Important remark: Not all settings which are shown in this table are available for all devices. Please consult the available datasheet for each device for the maximum allowed PLL output and the allowed maximum frequencies for each clock domain (CLKB, CLKP and CLKT) respectively.

  • Page 229: Clock Auto Gear Up/down

    6. Clock Auto Gear Up/Down To avoid voltage drops and surges when switching the clock source from oscillator to high frequency PLL/ DLL output (or vice versa), a clock smooth gear-up and gear-down circuitry is implemented with the PLL interface. The main functionality is implemented using two divide-by counters (divide-by-M and divide-by-G counter), where one supplies the PLL feedback always with the target frequency (divide-by-M counter), and the other (divide-by-G counter) which increases the frequency from a programmable frequency divi-...

  • Page 230

    Chapter 14 PLL Interface 6.Clock Auto Gear Up/Down this equals to (resolved closed arithmetic series of the first sum term): duration with i = G ; j = G - M ; mul = MULG ; t = 1/f(pllout) For the above given setting this equals 1483 PLL output clock cycles with a duration from the start fre- quency to the target frequency of 9262500 ps (about 9.3 us).

  • Page 231: Caution

    7. Caution When using the clock auto-gear function it is strongly recommended to make use of the gear up and gear down flags (PLLCTRL.GRUP, PLLCTRL.GRDN) to evaluate the current state of this function to avoid malfunctions in the clock system due to setting changes prior to completion. Procedure example: •...

  • Page 232

    Chapter 14 PLL Interface 7.Caution...

  • Page 233: Chapter 15 Can Clock Prescaler

    Chapter 15 CAN Clock Prescaler 1. Overview • This blockdiagram (simplified) shows the integration of the CAN and the CAN Interface with the CAN clock prescaler logic (1/C) and clock source selector. MAIN Osc. Clock Unit • Remark: If the CLKCAN source is set either to main oscillator or to PLL output then the clock for the CAN is not influenced by the clock modulation.

  • Page 234: Registers

    Chapter 15 CAN Clock Prescaler 3.Registers 3. Registers 3.1 CAN Clock Control Register Controls the CAN clock source, the clock division ratio and the clock disable. • CANPRE: Address 04C0h (Access: Byte) CPCKS1 CPCKS0 R0/W0 R0/W0 (See “Meaning of Bit Attribute Symbols (Page •...

  • Page 235

    R/W0 R/W0 (See “Meaning of Bit Attribute Symbols (Page • Bit7-6: Reserved bitAlways write “0” to these register bits. • Bit5-0: CAN clock disable CANCKD5-CANCKD0 -----0 -----1 ----0- ----1- ---0-- ---1-- --0--- --1--- -0---- -1---- 0----- 1----- No.10)” for details of the attributes.) Function CAN controller 0 is enabled CAN controller 0 is disabled...

  • Page 236

    Chapter 15 CAN Clock Prescaler 3.Registers...

  • Page 237: Chapter 16 Clock Supervisor

    Chapter 16 Clock Supervisor 1.Overview Clock Supervisor Chapter 16 Clock Supervisor This section gives an overview of the Clock Supervisor. Purpose of the Clock Supervisor is the supervision of the main and sub oscillation clock. In case of main oscillation clock failure the Clock Supervisor control logic will take action, i.e.

  • Page 238: Clock Supervisor Register

    Chapter 16 Clock Supervisor 2.Clock Supervisor Register 2. Clock Supervisor Register This section lists the Clock Supervisor Control Register and describes the function of each bit in detail. ■ Clock Supervisor Control Register (CSVCR) The Clock Supervisor Control Register (CSVCR) sets the operation mode of the Clock Supervisor. shows the configuration of the Clock Supervisor Control Register.

  • Page 239

    Table 2-1 describes the function of each bit of the Clock Supervisor Control Register (CSVCR). Table 2-1 Functional Description of each bit of the Clock Supervisor Control Register Name SCKS (Sub-clock select) (Main clock missing) (Sub-clock missing) (RC-oscillator enable) MSVE (Main clock supervisor...

  • Page 240: Block Diagram Clock Supervisor

    Chapter 16 Clock Supervisor 3.Block Diagram Clock Supervisor 3. Block Diagram Clock Supervisor This section presents a block diagram of the Clock Supervisor. The building blocks of the Clock Supervisor are: l Main Clock Supervisor l Sub-Clock Supervisor l Control Logic l RC-Oscillator ■...

  • Page 241: Operation Modes

    4. Operation Modes This section describes all operation modes of the Clock Supervisor. ■ Operation mode with initial settings In case the clock supervisor control register (CSVCR) is not configured at the beginning of the user program, the RC-oscillator, the main clock supervisor and the sub-clock supervisor is enabled. •...

  • Page 242

    Chapter 16 Clock Supervisor 4.Operation Modes Figure 4-1 Timing Diagram: Initial settings, main clock missing during power-on reset PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING...

  • Page 243

    Figure 4-2 Timing Diagram: Initial settings, main clock missing during ’oscillation stabilisation wait time’ PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING Chapter 16 Clock Supervisor 4.Operation Modes...

  • Page 244

    Chapter 16 Clock Supervisor 4.Operation Modes Figure 4-3 Timing Diagram: Initial settings, main clock missing after ’oscillation stabilisation wait time’ PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING...

  • Page 245

    Figure 4-4 Timing Diagram: Initial settings, sub-clock missing before timeout PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING Chapter 16 Clock Supervisor 4.Operation Modes...

  • Page 246

    Chapter 16 Clock Supervisor 4.Operation Modes Figure 4-5 Timing Diagram: Initial settings, sub-clock missing after timeout PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING...

  • Page 247

    ■ Disabling the RC-oscillator and the clock supervisors The initial point of this scenario is that the RC-oscillator and main clock or sub-clock supervisor is enabled. • The RC-oscillator can be disabled by setting bit RCE (bit 4 of CSVCR) to ’0’. First disable the main clock and sub-clock supervisor.

  • Page 248

    Chapter 16 Clock Supervisor 4.Operation Modes ■ Re-enabling the RC-oscillator and the clock supervisors The initial point of this scenario is that the RC-oscillator and both main clock and sub-clock supervisor are disabled. • The RC-oscillator can be enabled by setting RCE (bit 4 of CSVCR) to ’1’. •...

  • Page 249

    ■ Sub-clock modes The main clock supervisor is automatically disabled in sub-clock modes. The enable bit MSVE remains unchanged. At transition from sub-clock mode to main clock mode the main clock supervisor is enabled after the ’oscillation stabilisation wait time’ with the rising edge of signal OSC_STAB or in case the main clock is missing before the completion of the ’oscillation stabilisation wait time’, after the ’main clock timeout’...

  • Page 250

    Chapter 16 Clock Supervisor 4.Operation Modes Figure 4-9 Timing Diagram: Sub-clock missing in main clock mode, SRST=1 PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING Clock Mode Main Main...

  • Page 251

    Figure 4-10 Timing Diagram: Waking up from sub-clock mode PONR MCLK SCLK RC_CLK OSC_STAB TO_MCLK TO_SCLK MSVE MSEN SSVE SSEN MCLK_STBY SCLK_STBY SRST EXT_RST EXT_RST_OUT MCLK_OUT SCLK_OUT MCLK_MISSING SCLK_MISSING Main Clock Mode Main Chapter 16 Clock Supervisor 4.Operation Modes...

  • Page 252: Stop Mode

    Chapter 16 Clock Supervisor 4.Operation Modes ■ Stop mode RC-oscillator, main clock and sub-clock supervisors are enabled, they will be automatically disabled at transition into stop mode. The corresponding enable bits in the clock supervisor control register remain unchanged. So after wake-up from stop mode the RC-oscillator and the clock supervisors will be enabled again. If the corresponding enable bits are set to ’0’, the RC-oscillator and the clock supervisors will stay disabled after wake-up from stop mode.

  • Page 253

    ■ Operation with single clock device In a single clock device the sub-clock supervisor can provide the RC-oscillation clock as sub-clock. To enable this feature, SCKS bit (bit7 of CSVCR) must be set to ’1’ (refer to Table 2-1for precautions when modifying this bit) and SRST must be ’0’...

  • Page 254

    Chapter 16 Clock Supervisor 4.Operation Modes ■ Check if reset was asserted by the Clock Supervisor To find out whether the Clock Supervisor has asserted reset , the software must check the reset cause by reading the WDTC register at address A8 .

  • Page 255: Chapter 17 Clock Modulator

    Chapter 17 Clock Modulator 1.Overview Chapter 17 Clock Modulator This chapter provides an overview of the Clock Modulator and its features. It describes the reg- ister structure and operation of the Clock Modulator. 1. Overview The clock modulator is intended for the reduction of electromagnetic interference - EMI, by spreading the spectrum of the clock signal over a wide range of frequencies.

  • Page 256: Clock Modulator Registers

    Chapter 17 Clock Modulator 2.Clock Modulator Registers 2. Clock Modulator Registers This section lists the clock modulator registers and describes the function of each register in de- tail. ● Clock modulator registers Figure 2-1 Clock modulator registers CMPRL (lower) Address: 0004B9 Initial value 1 1 1 1 1 1 0 1...

  • Page 257

    ● Clock Modulator Control Register (CMCR) The Control Register (CMCR) has the following functions: Set the modulator to power down mode Modulator enable/disable in frequency modulation mode Indicates the status of the modulator Figure 2-2 Configuration of the clock modulator control register (CMCR) 0004BB served served...

  • Page 258

    Chapter 17 Clock Modulator 2.Clock Modulator Registers ● Clock modulator control register contents Table 2-1 Function of each bit of the clock modulator control register (1 / 2) Bit name bit7 undefined bit 6 to 5 Reserved bit 4 Reserved bit 3 FMOD RUN: Modulator status...

  • Page 259

    Table 2-1 Function of each bit of the clock modulator control register (2 / 2) Bit name bit 1 FMOD: Frequency modulation enable bit bit 0 PDX: Power down bit In the Table below the modulator states are summarized: Table 2-2 States of the modulator modulator disabled modulator power on, waiting modulator startup time (>...

  • Page 260

    Chapter 17 Clock Modulator 2.Clock Modulator Registers Table 2-2 States of the modulator modulator enabled in frequency modulation mode, modulator is calibrating, modulation not active modulator is running in frequency modulation mode modulation is active ● Clock Modulation Parameter Register (CMPR) The Modulation Parameter Register (CMPR) determines the modulation degree in frequency modulation mode.

  • Page 261

    Table 2-3 Function of each bit of the modulation parameter register (CMPR) Bit name bit 13 to 0 MP13 to 0: Modulation Parameter bits Depending on the PLL frequency the following modulation parameter settings are possible. The corresponding CMPR register value is stated in the most right column. Chapter 17 Clock Modulator 2.Clock Modulator Registers Function...

  • Page 262

    Chapter 17 Clock Modulator 2.Clock Modulator Registers Frequency of unmodulated input clock (PLL frequency) Period of unmodulated input clock (PLL clock period) resolution: resolution of frequencies in the modulated clock. low (1) to high (7) minimal frequency occurring in the frequency modulated clock maximal frequency occurring in the frequency modulated clock phase skew: The maximal phase shift of the modulated clock relative to the unmodulated...

  • Page 263: Application Note

    The table below shows the recommended setting for several MCU clocks and modulation parameters: Table 2-4 Modulation Parameter settings F0 (MHz) resolution degree Please refer to the datasheet of each device about modulation parameter settings. 3. Application Note Startup/stop sequence for frequency modulation mode. Modulation parameter for frequency modulation mode.

  • Page 264

    Chapter 17 Clock Modulator 3.Application Note recommended. define the required PLL frequency based on performance needs determine the maximal allowed clock frequency of the MCU choose the setting with the highest resolution and the highest modulation degree, whose maximal frequency is below the maximal allowed clock frequency of the MCU.

  • Page 265: Chapter 18 Timebase Counter

    Chapter 18 Timebase Counter 1. Overview The timebase counter is a 26-bit up-counter that counts the subclock or the main clock divided by two. When recovering from a state in which the selected clock source for the MCU has been, or may have been, halted, the MCU automatically changes to the oscillation stabilization wait state to avoid any unstable output from the oscillator.

  • Page 266: Configuration

    Chapter 18 Timebase Counter 3.Configuration ■ Events that invoke an oscillation stabilization wait using other than the timebase counter ● Wait time after power on: Provided by pin input ● Wait time after changing from subclock to main clock: Using the main oscillation stabilization wait timer to generate this time is recommended.

  • Page 267: Registers

    4. Registers 4.1 STCR: Standby Control Register Controls transition to standby modes, pin states during stop mode, whether to halt the clock during stop mode, the oscillation stabilization wait time, and software reset. Note: See also “Chapter 10 No.273)” chapters. •...

  • Page 268

    Chapter 18 Timebase Counter 4.Registers 4.2 CLKR: Clock Source Control Register Selects the clock source for the base clock used to run the MCU and controls the PLL. Note: See also the “Chapter 13 Clock Control (Page • CLKR: Address 0484h (Access: Byte) R/W0 R/W0 R/W0...

  • Page 269: Operation

    5. Operation This section describes the events that trigger an oscillation stabilization wait and the operation in each case. 5.1 INIT Pin Input An oscillation stabilization wait is required after power on. As the wait time provided by the initialized timebase counter is too short, the INIT pin input must be held at the “L”...

  • Page 270

    Chapter 18 Timebase Counter 5.Operation 5.2 Watchdog Reset (The specified oscillation stabilization wait time is generated automatically) If a watchdog reset occurs while the main clock oscillation is halted, the oscillation stabilization wait time is generated automatically. (See figure below.) Figure 5-2 Using the time-base counter to provide the oscillation stabilization...

  • Page 271

    ■ Watchdog reset when main clock operating Although no oscillation stabilization wait is required in this case, the specified wait time is generated automatically. 5.3 Recovering from Stop Mode via an Interrupt ■ When changing from main PLL operation to stop mode with the main clock oscillation halted (STCR.OSCD[2:1]=“11”): The main oscillation circuit generates the selected oscillation stabilization time automatically.

  • Page 272

    Chapter 18 Timebase Counter 5.Operation ■ When changing to stop mode without halting the clock oscillation circuit (main PLL/main/ sub): Although no oscillation stabilization wait is required in this case, a wait is generated automatically. Accordingly, it is recommended that you set the interval time to its minimum value before changing to stop mode. •...

  • Page 273

    5.7 Types of Oscillation Stabilization Wait ■ Timebase counter Automatically provides a count for the oscillation stabilization wait time. When a trigger occurs to change the device to the oscillation stabilization wait state, the timebase counter is cleared and then starts counting the specified oscillation stabilization wait time. ■...

  • Page 274

    Chapter 18 Timebase Counter 5.Operation 5.8 Whether or not a Stabilization Wait is Required for Each State Transition See figure below.

  • Page 275: Settings

    6. Settings Table 6-1 Settings Required to Specify the Oscillation Stabilization Wait Time Setting Oscillation stabilization wait time setting *: For the setting procedure, refer to the section indicated by the number. Table 6-2 Settings Required to Setup an INITX Pin Reset Setting INITX pin input •...

  • Page 276

    Chapter 18 Timebase Counter 7.Q&A 7. Q&A 7.1 How do I setup the oscillation stabilization wait time that is generated automatically? Use the oscillation stabilization wait time selection bits (STCR.OS[1:0]). (The following lists likely scenarios and the required settings.) Scenario To not halt the main PLL or oscillator during stop mode (No oscillation stabilization wait time required) To not stop the oscillator during external clock input or...

  • Page 277

    7.2 How do I set the oscillation stabilization wait time without generating it automatically? The settings described below for various cases are required. State (before transition) × Wait time after power on Subclock operation × (main clock halted) Sub sleep, sub stop ×...

  • Page 278: Caution

    Chapter 18 Timebase Counter 8.Caution 8. Caution • Clock source If the clock selected as the clock source is not stable, an oscillation stabilization wait time is required. • Oscillation stabilization wait time The wait time set in the oscillation stabilization time selection bits (STCR.OS[1:0]) is not initialized by any reset except a reset triggered by the external INITX pin input, the RC based watchdog or the Clock Supervisor.

  • Page 279: Chapter 19 Timebase Timer

    Chapter 19 Timebase Timer 1. Overview The timebase timer is a selector that uses the output from a 26-bit timebase counter using the base clock (F). The timebase timer is an interval-interrupt generating timer that is used to acquire main PLL lock wait time and to count a long time.

  • Page 280: Configuration

    Chapter 19 Timebase Timer 3.Configuration 3. Configuration Timebase timer Timebase timer Timebase counter (26-bit counter) 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Base clock (φ) Timer clear CTBR CTBR Clears the counter after writing "A5h"...

  • Page 281: Register

    4. Register 4.1 TBCR: Timebase Timer Control Register This register is used to set timebase timer interrupt control, reset/ standby operation option etc. Note: Refer also to “Chapter 10 Standby (Page • TBCR: Address 0482h (Access: Byte) TBIF TBIE TBC2 R(RM1),W (Refer to “Meaning of Bit Attribute Symbols (Page...

  • Page 282

    Chapter 19 Timebase Timer 4.Register • Bit1: Enabling the synchronous reset operation SYNCR • Ordinary operation reset: Immediately resets the operation initialization when the operation initialization reset (RST) request is generated. Synchronous reset: Resets the operation initialization after all accesses to the bus have stopped. •...

  • Page 283: Operation

    5. Operation Timebase timer operation is described. 5.1 Timebase Timer Interrupt Example (Main PLL Lock Wait) Main PLL lock wait by the timebase timer Example of the Main PLL oscillation Timebase counter count 000h Clears the (CTBR) timebase counter Main PLL enable (PLL1EN) Timebase timer interrupt request enable (PLL1EN) Timebase timer interrupt...

  • Page 284: Setting

    Chapter 19 Timebase Timer 6.Setting 6. Setting Table 6-1 Setting Required for the Timebase Timer Setting Setting the interval time Timebase counter clear *: Refer to the number for more information on the setting method. Table 6-2 Setting Required for Interrupting the Timebase Timer Setting Setting the timebase timer interrupt vector and interrupt level...

  • Page 285

    7. Q & A 7.1 What are the types of interval time used in the timebase timer (and the timebase counter used by the timebase timer) and how to select them? There are eight types of interval time, and they are set using the interval selection bit (TBCR.TBC[2:0]). Timebase timer Interval time How to select Φ...

  • Page 286

    Chapter 19 Timebase Timer 7.Q & A 7.7 What are the interrupt types? One type of interrupt is available, and an interrupt is generated when the interval time that is set using the interval selection bit (TBCR.TBC[2:0]) has elapsed. (Selection is unnecessary.) 7.8 How is an interrupt enabled? Interrupt request enable and interrupt request flag Setting interrupt enable is conducted using the interrupt request enable bit (TBCR.TBIE).

  • Page 287: Caution

    8. Caution • The main PLL needs the PLL lock wait time after operation enable and after modifying the rate of multiply. We recommend that this main PLL lock wait time be acquired using the timebase interrupt. The lockup time of PLL is approximately 600us. Make sure that the PLL lock wait time is set to a value a little larger than 600us.

  • Page 288

    Chapter 19 Timebase Timer 8.Caution...

  • Page 289: Chapter 20 Software Watchdog Timer

    Chapter 20 Software Watchdog Timer 1. Overview The software watchdog timer consists of a selector that uses the output from a 26-bit timebase counter using the base clock (F) and a one-bit counter. The watchdog timer generates the watchdog reset (initial setting reset) if the generation delay operation (an interval watchdog reset) is disabled due to problems such as program runaway.

  • Page 290: Configuration

    Chapter 20 Software Watchdog Timer 3.Configuration 3. Configuration Timebase counter (26-bit counter) 13 14 15 16 17 18 19 20 21 22 23 24 25 Base clock (φ) Watchdog timer Timer clear CT BR CT BR Clears the counter after writing “A5h” and then “5Ah”.

  • Page 291: Register

    4. Register 4.1 RSRR: Watchdog Timer Control Register This register is used to set watchdog timer periods, and execute the startup control. (This register also functions as the reset cause register that stores previously generated reset causes.) Note: Refer also to “Chapter 9 Reset (Page •...

  • Page 292

    Chapter 20 Software Watchdog Timer 4.Register RST has been triggered by a software reset. The software reset occurred flag (SRST) is cleared to “0” after reading. • Bit2: Low voltage reset occurred flag Indicates whether a reset (INIT) was triggered by the low voltage detection. LINIT No INIT has been triggered by the low voltage detection.

  • Page 293

    4.2 WPR: Watchdog Reset Generation Postponement Register This register is used to postpone the generation of watchdog reset. • WPR: Address 0485h (Access: Byte) RX,W RX,W RX,W (Refer to “Meaning of Bit Attribute Symbols (Page • If “A5 ” and “5A ”...

  • Page 294: Operation

    Chapter 20 Software Watchdog Timer 5.Operation 5. Operation This section describes the watchdog operation. 5.1 Watchdog (Detecting Runaway) Count value of the timer counter Interval period selection Bit output of the timer counter (Bits 15, 17, 19 and 21) Watchdog Watchdog timer startup Reading from the RSRR...

  • Page 295

    5.2 Starting the Watchdog Timer and Setting the Watchdog Timer Period The watchdog timer starts once it first writes data to the RSRR (Reset cause register/Watchdog timer control register) after the reset (RST). At this time, Bits 1 and 0 (WT1 and WT0 bits) set the watchdog timer interval time.

  • Page 296: Setting

    Chapter 20 Software Watchdog Timer 6.Setting 6. Setting Table 6-1 Setting Required for Using the Watchdog Timer Setting Interval time setting Startup of the watchdog *: Refer to the number for more information on the setting method. Table 6-2 Setting Required for Delaying the Generation of the Watchdog Setting Setting required for delay the generation of the watchdog reset...

  • Page 297

    7. Q & A 7.1 What are the types of watchdog interval time and how are they selected? There are four types of the interval period, and they are set using the interval selection bit (RSRR.WT[1:0]). Watchdog Interval time To select Φ × 2 To select Φ...

  • Page 298: Caution

    Chapter 20 Software Watchdog Timer 8.Caution 8. Caution • Although the watchdog interval time corresponds to the one twice as long as the watchdog 1-bit counter, the watchdog timer clear operation only clears the 1-bit counter used for detecting the watchdog. As a result, the time margin to clear the watchdog timer is different from the interval time.

  • Page 299: Chapter 21 Hardware Watchdog Timer

    Chapter 21 Hardware Watchdog Timer 1. Overview The hardware watchdog timer (R/C oscillation based) provides a system reset if an internal watchdog timer is not cleared within the postponement duration. ● Hardware watchdog timer This watchdog timer starts counting after the setting initialization reset (INIT) automatically. Clearing the counter in the postponement duration is necessary to continue running an application.

  • Page 300: Configuration

    Chapter 21 Hardware Watchdog Timer 2.Configuration 2. Configuration Hardware watchdog timer consists of two sub-blocks: • Watchdog timer • Timer control and status register ● Block diagram of the hardware watchdog timer Figure 2-1 Block Diagram of hardware watchdog timer Watchdog timer This is a timer to supervise CPU operation.

  • Page 301: Register

    3. Register 3.1 Hardware watchdog timer control and status register Hardware watchdog timer control status register (with reset flag and clear bit). • HWWD: Address 04C7h (Access: Byte) RESV0 RESV0 RESV0 R/W0 R/W0 R/W0 (See “Meaning of Bit Attribute Symbols (Page •...

  • Page 302

    Chapter 21 Hardware Watchdog Timer 3.Register 3.2 Hardware watchdog timer duration register Hardware watchdog timer duration register (elongation of the trigger duration). • HWWDE: Address 04C6h (Access: Byte) RX/W0 RX/W0 RX/W0 (See “Meaning of Bit Attribute Symbols (Page • Bit7-2: Reserved bits. Always write “0” to these bits. •...

  • Page 303: Functions

    4. Functions If the watchdog timer is not cleared periodically, a setting initialization reset (INIT) occurs. In this case the value of registers in CPU is not guaranteed. ● Function of the hardware watchdog timer After releasing INITX the hardware watchdog timer starts immediately without stabilization time. If the timer is not cleared periodically, setting initialization (INIT) reset occurs.

  • Page 304: Caution

    Chapter 21 Hardware Watchdog Timer 5.Caution 5. Caution ● Software disabling is not possible The watchdog timer starts counting immediately after reset (release of INITX). Software cannot stop the counting. ● Hardware disabling is only possible on the evaluation device MB91V460 The watchdog timer can be permanently disabled by setting the corresponding jumper of the evaluation board (this is not possible on flash devices with this watchdog timer).

  • Page 305: Chapter 22 Main Oscillation Stabilisation Timer

    Chapter 22 Main Oscillation Stabilisation Timer 1. Overview The main clock oscillation stabilisation timer is a 23-bit counter that counts the main clock. This timer does not affect the selection of clock source operated by MCU/dividing setting. This timer is mainly used for acquiring main clock oscillation stability wait time to resume main clock oscillation after the main clock oscillation has been stopped (OSCCR.OSCDS1=1) while the subclock is being operated.

  • Page 306: Configuration

    Chapter 22 Main Oscillation Stabilisation Timer 3.Configuration 3. Configuration Main clock oscillation stability wait timer Timer operation enable OSCR:bit 5 Operation stop Operation enable 23-bit free run timer Main clock (Source oscillation) Timer clear OSCR:bit 2 Timer clear Does not affect the operation Note: Refer to “Chapter 24 Interrupt Control (Page Figure 3-1 Configuration Diagram...

  • Page 307: Register

    4. Register 4.1 OSCRH: Control Register for the Main Clock Oscillation Stability Wait Timer This register is used to select the interval time, clear the timer, control the interrupt, control the timer such as stop, and confirm the state of the timer. •...

  • Page 308: Operation

    Chapter 22 Main Oscillation Stabilisation Timer 5.Operation 5. Operation This section describes the main clock oscillation stability wait timer operation. 5.1 Main Clock Oscillation Stability Wait (1) Selects the interval time. (WS[1:0]) (In this example, 2 (2) Sets timer clear (WCL=“0”) by the software. (3) Sets flag clear (WIF=“0”) and interrupt request enable (WIE=“1”) by the software.

  • Page 309

    Chapter 22 Main Oscillation Stabilisation Timer 5.Operation 5.2 Interval Interrupt (1) Selects the interval time (WS[1:0]). (In this example, 2 is selected.) CL-MAIC (2) Clears the timer (WCL=“0”), clears flags (WIF=“0”), enables interrupt request (WIE=“1”), enables timer count (WEN=“1”) by the software. (3) The timer counts up using the main clock (source oscillation).

  • Page 310: Setting

    Chapter 22 Main Oscillation Stabilisation Timer 6.Setting 6. Setting Figure 6-1 Settings Required for Using the Main Clock Oscillation Stability Wait Timer Setting Setting interval time Count clear Counting operation start *: Refer to the number for more information on the setting method. Figure 6-2 Settings Required for Enabling the Main Clock Oscillation Stability Wait Timer Interrupt Setting Sets the main clock oscillation stability wait timer...

  • Page 311

    7. Q & A 7.1 What are the types of interval time (wait time) and how are they selected? There are 3 types of interval time, and they are set with the interval selection bit (OSCRH.WS[0:1]). Interval time To set the value to 2 CL-MAIN To set the value to 2 CL-MAIN...

  • Page 312

    Chapter 22 Main Oscillation Stabilisation Timer 7.Q & A 7.6 What are the types of interrupt? There is one type of interrupt called the main clock oscillation stability wait timer interrupt. (Selection is unnecessary.) 7.7 how is an interrupt enabled? Interrupt request enable and interrupt request flag Setting the interrupt enable is performed with the interrupt request enable bit (OSCRH.WIE).

  • Page 313: Caution

    8. Caution • To wait until the main clock oscillation stability is attained while the subclock is in operation, it is necessary to acquire wait time using the main clock oscillation stability wait timer. (An unstable clock may be supplied to the entire device, and normal operation is not guaranteed if the MCU operation mode is switched from the sub-RUN to the main RUN mode without waiting until the main clock oscillation becomes stable.) •...

  • Page 314

    Chapter 22 Main Oscillation Stabilisation Timer 8.Caution...

  • Page 315: Chapter 23 Sub Oscillation Stabilisation Timer

    Chapter 23 Sub Oscillation Stabilisation Timer 1. Overview The sub oscillation stabilisation timer is a 15-bit counter that is counted up with the subclock. This timer does not affect the selection/dividing setting of the MCU operating clock. This timer is used to acquire subclock oscillation stability wait time if the subclock oscillation is resumed mainly when the subclock oscillation is stopped while the main clock is in operation.

  • Page 316: Configuration

    Chapter 23 Sub Oscillation Stabilisation Timer 3.Configuration 3. Configuration Clock timer Clock timer (14-bit free run timer) Sub-clock (Source oscillation) 32.768 kHz Timer clear WPCR:bit 2 Timer clear Does not affect the operation Note: For the ICR register and interrupt vector, refer to Figure 3-1 Configuration Diagram Interval time WS1-0...

  • Page 317: Register

    4. Register 4.1 WPCRH: Sub oscillation stabilisation timer Control Register This register is used to select interval time, clear the timer, control interrupt, control timer stop etc., and confirm the states. • WPCRH: Address 04CAh (Access: Byte) R(RM1),W (For the attributes, refer to “Meaning of Bit Attribute Symbols (Page (Refer to “8.

  • Page 318

    Chapter 23 Sub Oscillation Stabilisation Timer 4.Register watchdog reset), but the operation initialization reset (Software reset) holds the current value instead of initializing it. 2: If you set the interrupt request enable (WIE=“1”), and the interval period selection (WS[1:0]) after canceling the reset, be sure to simultaneously set the timer interrupt request flag (WIF) and the timer clear (WCL) “0”.

  • Page 319: Operation

    5. Operation 5.1 Subclock Oscillation Stability Wait Interrupt Subclock oscillation example Clock timer counting 0400h 0000h (Bit 9) Subclock stop bit Operation clock mode (1) Selects the interval (WS[1:0]) (In this example, 2 (2) Sets the timer so that it is cleared (WCL=“0”) by software. (3) Sets the flag clear (WIF=“0”) and the interrupt request enable (WIE=“1”) by software.

  • Page 320

    Chapter 23 Sub Oscillation Stabilisation Timer 5.Operation 5.2 Interval Interrupt (Clock Interrupt) Clock timer counting 4000h 2000h 0000h (Bit12) (1) Selects the interval time. (WS[1:0]) (In this example, 2 (2) Sets the timer clear (WCL=“0”), flag clear (WIF=“0”) and interrupt request enable (WIE=“1”) by the software. (3) The timer counts up with the subclock (Source oscillation).

  • Page 321

    5.3 Returning from the Stop Mode due to Interval Operation (Clock Interrupt) Clock timer counting 7FFFh 4000h 0000h (Bit 13) Interval time Main Sub- MCU state (1) The sub oscillation stabilisation timer is cleared by software. (Writes “0” to WCL.) (2) Counts up the sub oscillation stabilisation timer with the subclock.

  • Page 322: Setting

    Chapter 23 Sub Oscillation Stabilisation Timer 6.Setting 6. Setting Table 6-1 Settings Required for Using the Sub oscillation stabilisation timer Setting Setting the interval time Count clear *: Refer to the number for more information on the setting method. Table 6-2 Items Required for Enabling the Sub oscillation stabilisation timer Interrupt Setting Setting the interrupt vector and the free run timer level of the sub oscillation stabilisation timer...

  • Page 323

    7. Q & A 7.1 What are the types of interval time (wait time) and how are they selected? There are three types of interval time, and they are set with the interval selection bit (WPCRH.WS[1:0]). Interval time To set the interval time to CL-SUB To set the interval time to CL-SUB...

  • Page 324

    Chapter 23 Sub Oscillation Stabilisation Timer 7.Q & A 7.6 How is the interrupt enabled? The interrupt request enable and the interrupt request flag The interrupt enable is set with the interrupt request enable bit (WPCRH.WIE). Interrupt disable Interrupt enable The interrupt request is cleared with the interrupt request bit (WPCRH.WIF).

  • Page 325: Caution

    8. Caution • If the setting request (WIF=“1”) of the timer interrupt request flag and the writing timing where “0” is written to the flag by the software occur simultaneously, the flag is set to “1”. • If the interrupt request is enabled (WIE=“1”) after defeating a reset, and if the interval time is changed, be sure to simultaneously set “0”...

  • Page 326

    Chapter 23 Sub Oscillation Stabilisation Timer 8.Caution...

  • Page 327: Chapter 24 Interrupt Control

    Chapter 24 Interrupt Control 1. Overview Interrupt control manages interrupt reception and arbitration. Priority judging circuit NMI processing Interrupt priority Interrupt requests judging circuit (peripheral function, INT instruction, and delayed interrupt) 2. Features • Functions • Detection of interrupt requests •...

  • Page 328: Configuration

    Chapter 24 Interrupt Control 3.Configuration 3. Configuration The enabled interrupt request Interrupt request enable bit Interrupt Interrupt request cause flag External interrupt ( 16) Reload timer ( 4) UART receive ( 4) UART transmit ( 4) A/D ( 2) Real-time clock ( 1) Main clock oscillation Interrupt control register stabilization timer ( 1)

  • Page 329: Registers

    4. Registers 4.1 ICR: Interrupt Control Register The register that specifies the interrupt level of an interrupt request. External Interrupt 0 ICR00 External Interrupt 1 External Interrupt 2 ICR01 External Interrupt 3 External Interrupt 4 ICR02 External Interrupt 5 External Interrupt 6 ICR03 External Interrupt 7 External Interrupt 8...

  • Page 330

    Chapter 24 Interrupt Control 4.Registers I2C 0 / I2C 2 ICR29 I2C 1 / I2C 3 USART (LIN) 8 RX ICR30 USART (LIN) 8 TX USART (LIN) 9 RX ICR31 USART (LIN) 9 TX USART (LIN) 10 RX ICR32 USART (LIN) 10 TX USART (LIN) 11 RX ICR33 USART (LIN) 11 TX...

  • Page 331

    #138 Low Voltage Detection ICR61 #139 SMC Comparator 0-5 #140 Timebase Overflow ICR62 #141 PLL Clock Gear #142 DMA Controller ICR63 #143 Main/Sub OSC stability wait (*1) : Used by REALOS (*2): ICR23 and ICR47 can be exchanged by setting the REALOS compatibility bit (addr 0x0C03 : IOS[0]) Chapter 24 Interrupt Control : Address 047D (Access: Byte)

  • Page 332

    Chapter 24 Interrupt Control 4.Registers ICR (Interrupt Control Register) is a register in the interrupt controller, and it specifies the interrupt level for each interrupt request. ICR corresponds to each of interrupt request input. ICR is mapped to the I/O space. •...

  • Page 333: Interrupt Vector

    4.2 Interrupt Vector Interrupt vector that corresponds to a vector number (#) with TBR register set to 0FFC00h (initial value): : Address : Address : Address : Address #143 : Address • Set the address of each interruption handling routine to the corresponding vector. •...

  • Page 334: Operation

    Chapter 24 Interrupt Control 5.Operation 5. Operation The following section explains priority determination operation of interrupt control. The Flow of the Interrupt Process Interrupt cause generated The interrupt request flag is set to “1”. Are interrupt requests enabled? The interrupt request is transmitted to the interrupt control circuit.

  • Page 335: Setting

    6. Setting Table 6-1 Setting Required to Use Interrupts Setting Setting the interrupt level Clearing the interrupt request flags Enabling interrupt requests I flag setting *: For the setting procedure, refer to the section indicated by the number. Table 6-2 Setting that Requires the Setting within Interrupt Processing Setting Clearing the interrupt request flags 7.

  • Page 336: Caution

    Chapter 24 Interrupt Control 8.Caution 7.4 How can I set an I flag? −>In C: I flag is set to “1” (interrupt enable) by writing __EI();. I flag is set to “0” (interrupt disable) by writing __DI();. 8. Caution Interrupt request flags are not cleared automatically. Make sure to clear them in the interrupt process. (They are usually cleared by writing “0”...

  • Page 337: Chapter 25 External Interrupt

    Chapter 25 External Interrupt 1. Overview External interrupt detects a signal input to an external interrupt input pin, and generates an interrupt request. Pins 2. Features • Quantity : 16 (INT input -- 16 channels: INT0-INT15) • Interrupt levels: 4 levels •...

  • Page 338: Configuration

    Chapter 25 External Interrupt 3.Configuration 3. Configuration External interrupts 0 - 7 Detect level setting LB0, LA0 LB1, LA1 LB2, LA2 LB3, LA3 LB4, LA4 LB5, LA5 LB6, LA6 LB7, LA7 INT0/P24.0 INT1/P24.1 Pins INT2/P24.2 INT3/P24.3 INT4/SDA2/P24.4 INT5/SCL2/P24.5 INT6/SDA3/P24.6 (Inputs of other peripheral INT7/SCL3/P24.7 function macros) P24.0...

  • Page 339: External Interrupts

    Figure 3-2 Configuration Diagram External interrupts 8 - 15 Detect level setting LB8, LA8 ELVR1 : bit 1-0, LB9, LA9 ELVR1 : bit 3-2, LB10, LA10 ELVR1 : bit 5-4, LB11, LA11 ELVR1 : bit 7-6, LB12, LA12 ELVR1 : bit 9-8, LB13, LA13 ELVR1 : bit 11-10, LB14, LA14...

  • Page 340

    Chapter 25 External Interrupt 3.Configuration Figure 3-4 Register List Note: See “Chapter 24 Interrupt Control (Page No.311)” about ICR register and interrupt vectors.

  • Page 341: Registers

    4. Registers 4.1 ELVR: Interrupt Request Level Register The register that selects request detection of external interrupts. • ELVR0 (INT0-INT7): Address 032H (access: Half-word, Word) (About attributes, see “Meaning of Bit Attribute Symbols (Page • ELVR1 (INT8-INT15): Address 036H (access: Half-word, Word) LB15 LA15 LB14...

  • Page 342

    Chapter 25 External Interrupt 4.Registers 4.2 EIRR: Interrupt Request Register Status bit of a request of an external interrupt. • EIRR0 (INT0-INT7): Address 030H (access: Byte, Half-word, Word) R (RM1), W R (RM1), W R (RM1), W R (RM1), W R (RM1), W R (RM1), W (About attributes, see “Meaning of Bit Attribute Symbols (Page •...

  • Page 343: Operation

    5. Operation Level detection “H”) INT ( “L”) Valid edge Interrupt request (ER) Edge detection Internal clock (CLKP divided by two) INT (rising) (fallling) Valid edge Interrupt requests (ER) (1) External interrupt signal (INT) input (2) Detect interrupt signals (level/edge). (3) Valid edge signal (3xCLKP above required) (4) An interrupt request generated.

  • Page 344: Setting

    Chapter 25 External Interrupt 6.Setting 6. Setting Table 6-1 Setting Required in Order to Use External Interrupts Setting Setting of detect level Set INT pin as the input. External interrupt Note: For the setting procedure, refer to the section indicated by the number. 7.

  • Page 345: Interrupt Types

    7.3 What interrupt registers are used? Setting of interrupt vectors of external interrupts, and interrupt levels The relationship among external interrupt numbers, interrupt levels, and vectors is shown in the table below. “Chapter 24 Interrupt Control (Page Interrupt vectors (default) INT0 Address: 0FFFBCh INT1...

  • Page 346

    Chapter 25 External Interrupt 7.Q & A 7.5 How do I enable, disable, and clear interrupts? Enable flag for interrupt requests, interrupt request flag Use interrupt enabling bits (ENIR0.ENx. x = 0-7) and (ENIR1.ENx. x = 8-15) to enable interrupts. To disable interrupt requests To enable interrupt requests Use interrupt request bits (EIRR0.ERx.

  • Page 347: Caution

    8. Caution • When the request input is a level (LAn, LBn = “00” or “01”) and when the INT pin input is the set active level, the corresponding bit (ERn) will be re-set to “1” even if the external interrupt request bit (ERn) is set to “0”. Note: n = 0 to 15 •...

  • Page 348

    Chapter 25 External Interrupt 8.Caution...

  • Page 349: Chapter 26 Dma Controller

    Chapter 26 DMA Controller 1. Overview of the DMA Controller (DMAC) The DMA controller (DMAC) is a module that implements DMA (Direct Memory Access) transfer on FR family devices. When this module is used to control DMA transfer, various kinds of data can be transferred at high speed by bypassing the CPU, enhancing system performance.

  • Page 350

    Chapter 26 DMA Controller 1.Overview of the DMA Controller (DMAC) ■ Block Diagram Figure 1-1"Block Diagram of the DMA Controller (DMAC)" is a block diagram of the DMA controller (DMAC). Figure 1-1 Block Diagram of the DMA Controller (DMAC) DMA transfer request to the bus controller Read Read/write...

  • Page 351: Dma Controller (dmac) Registers

    2. DMA Controller (DMAC) Registers This section describes the configuration and functions of the registers used by the DMA control- ler (DMAC). ■ DMA Controller (DMAC) registers Figure 2-1"DMA Controller (DMAC) Registers" shows the registers of the DMA controller (DMAC). (bit) 23 16 15 08 07 00 ch.0...

  • Page 352

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers If the bit is set while DMA transfer start is disabled (when DMAE of DMACR=0, or DENB of DMACA=0), the setting takes effect when start is enabled. If the bit is set while DMA transfer is temporarily stopped (DMAH[3:0] of DMACR not equal to 0000 DMACA=1), the setting takes effect when temporary stopping is canceled.

  • Page 353

    [Bit 30] PAUS (PAUSe)*: Temporary stop instruction This bit temporarily stops DMA transfer on the corresponding channel. If this bit is set, DMA transfer is not performed before this bit is cleared (While DMA is stopped, the DSS bits are 1xx If this bit is set before starting, DMA transfer continues to be temporarily stopped.

  • Page 354

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers [Bits 28 to 24] IS4 to 0 (Input Select)*: Transfer source selection These bits select the source of a transfer request note that the software transfer request by the STRG bit function is always valid regardless of the setting of these bits. As listed in Request Sources".

  • Page 355

    Notes: • If DMA start resulting from an interrupt from a peripheral function is set (IS=1xxxx the selected peripheral function with the ICR register. • If demand transfer mode is selected, only IS[4:0]=01110 disabled. • External request input is valid only for CH0, 1, and 2. External request input cannot be selected for CH2, CH3 and 4.

  • Page 356

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers Table 2-2 Settings for Extended Transfer Request Sources 10110 0010 Reload Timer 6 10111 0010 Reload Timer 7 11000 0010 Free Run Timer 0 11001 0010 Free Run Timer 1 11010 0010 Free Run Timer 2 11011 0010...

  • Page 357

    Table 2-2 Settings for Extended Transfer Request Sources 10110 0100 USART (LIN) 11 RX 10111 0100 USART (LIN) 11 TX 11000 0100 USART (LIN) 12 RX 11001 0100 USART (LIN) 12 TX 11010 0100 USART (LIN) 13 RX 11011 0100 USART (LIN) 13 TX 11100 0100...

  • Page 358

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers Table 2-2 Settings for Extended Transfer Request Sources 10110 0110 Programmable Pulse Generator 6 10111 0110 Programmable Pulse Generator 7 11000 0110 Programmable Pulse Generator 8 11001 0110 Programmable Pulse Generator 9 11010 0110 Programmable Pulse Generator 10...

  • Page 359

    completed. XXXX Transfer count for the corresponding channel When DMA transfer is started, data in this register is stored in the counter buffer of the DMA-dedicated transfer counter and is decremented by 1 (subtraction) after each transfer unit. When DMA transfer is completed, the contents of the counter buffer are written back to this register and then DMA ends.

  • Page 360

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers memory address. Table 2-3 Settings for the Transfer Types TYPE 2-cycle transfer (initial value) Fly-by: Memory --> I/O transfer Fly-by: I/O --> memory transfer Setting disabled • When reset: Initialized to 00 •...

  • Page 361

    [Bits 29, 28] MOD (MODe)*: Transfer mode setting These bits are the transfer mode setting bits and set the operating mode of the corresponding channel. Table 2-4 Settings for Transfer Modes Block/step transfer mode (initial value) Burst transfer mode Demand transfer mode Setting disabled •...

  • Page 362

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers [Bit 25] SADM (Source-ADdr. Count-Mode select)*: Transfer source address count mode specification This bit specifies the address processing of the transfer source address of the corresponding channel in each transfer operation. An address increment is added or an address decrement is subtracted after each transfer operation according to the specified transfer source address count width (SASZ).

  • Page 363

    [Bit 23] DTCR (DTC-reg. Reload)*: Transfer count register reload specification This bit controls reloading of the transfer count register for the corresponding channel. If reload operation is enabled by this bit, the count register value is restored to its initial value after the transfer is completed then DMAC stops and then waiting starts for new transfer requests (an activation request by STRG or IS setting).

  • Page 364

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers [Bit 21] DADR (Dest.-ADdr.-reg. Reload)*: Transfer destination address register reload specification This bit controls reloading of the transfer destination address register for the corresponding channel. If this bit enables reloading, the transfer destination address register value is restored to its initial value after the transfer is completed.

  • Page 365

    [Bits 18 to 16] DSS2 to 0 (DMA Stop Status)*: Transfer stop source indication These bits indicate a code (end code) of 3 bits that indicates the source of stopping or termination of DMA transfer on the corresponding channel. For a list of end codes, see Table 2-6 End Codes Initial value Address error (underflow/overflow)

  • Page 366

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers [Bits 7 to 0] DASZ (Des Addr count SiZe)*: Transfer destination address count size specification These bits specify the increment or decrement width for the transfer destination address (DMADA) of the corresponding channel in each transfer operation. The value set by these bits becomes the address increment/decrement for each transfer unit.

  • Page 367

    [Bits 31 to 0] DMADA (DMA Destination Addr)*: Transfer destination address setting These bits set the transfer destination address. If DMA transfer is activated, data in this register is stored in the counter buffer of the DMA-dedicated address counter and then the address is calculated according to the settings for the transfer operation. When the DMA transfer is completed, the contents of the counter buffer are written back to this register and then DMA ends.

  • Page 368

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers DMA operation can be forced to stop by writing 0 to this bit. However, be sure to force stopping (0 write) only after temporarily stopping DMA using the DMAH[3:0] bits [Bit27 to 24 of DMACR]. If forced stopping is carried out without first temporarily stopping DMA, DMA stops, but the transfer data cannot be guaranteed.

  • Page 369

    Chapter 26 DMA Controller 2.DMA Controller (DMAC) Registers ■ Pin Function of the DACK, and DEOP, and DREQ pins To use the DACK, DEOP, or DREQ pins for external transfer, a switch must be made from the port function to the DMA pin function.

  • Page 370: Dma Controller (dmac) Operation

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation 3. DMA Controller (DMAC) Operation A DMA controller (DMAC) is built into all FR family devices. The FR family DMAC is a multi-func- tional DMAC that controls data transfer at high speed without the use of CPU instructions. This section describes the operation of the DMAC.

  • Page 371

    ● Fly-by transfer (I/O --> memory) The DMA controller operates using a write operation as its unit of operation. Otherwise, operation is the same as fly-by transfer (memory --> I/O) operation. Access areas used for MB91460 series fly-by transfer must be external areas. ■...

  • Page 372

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation • End of the specified transfer count (DMACA:BLK[3:0] x DMACA:DTC[15:0]) => Normal end • A transfer stop request from a peripheral circuit or the external pin (DSTP) occurred => Error • An address error occurred => Error •...

  • Page 373

    always be caused. If a software request occurs together with a start (transfer enable) request, the transfer is started by immediate output of a DMA transfer request to the bus controller. 3.2 Transfer Sequence The transfer type and the transfer mode that determine, for example, the operation sequence after DMA transfer has started can be set independently for each channel (Settings for TYPE[1:0] and MOD[1:0] of DMACB).

  • Page 374

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation Figure 3-1 Example of burst transfer for a start on an external pin rising edge, number of blocks =1, and Transfer request ( edge) Bus operation Transfer count Transfer end ● Burst fly-by transfer A burst fly-by transfer has the same features as a 2-cycle transfer except that the transfer area can only be external areas, and the transfer unit is read (memory -->...

  • Page 375

    Table 3-3 Specifiable transfer addresses (demand transfer 2-cycle transfer) Transfer source address External area External area External area Built-in IO Built-in RAM Note: For a demand transfer, be sure to set an external area address for the transfer source or transfer destination or both.

  • Page 376

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation • If a transfer request for another channel with a higher priority is received during transfer, the channel is switched after the transfer is stopped and then restarted. Priority in a step transfer is valid only if transfer requests occur simultaneously.

  • Page 377

    ● Transfer count register reloading After transfer is performed the specified number of times, the initial value is set in the transfer count register again and waiting for a start request starts. Set this type of reloading when the entire transfer sequence is to be performed repeatedly. If reload is not specified, the count register value remains 0 after the transfer is performed the specified number of times and no further transfer is performed.

  • Page 378

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation ■ Features of the Address Register This register has the maximum 32-bit length. With 32-bit length, all space in the memory map can be accessed. ■ Function of the Address Register • The address register is read in each access operation and the read value is sent to the address bus.

  • Page 379

    ■ Transfer Count Control Set the transfer count value in the transfer count register (DTC of DMACA). The register value is stored in the temporary storage buffer when the transfer starts and is decremented by the transfer counter. When the counter value becomes 0, end of transfer end for the specified count is detected, and the transfer on the channel is stopped or waiting for a restart request starts (when reload is specified).

  • Page 380

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation Note: • Since the register has only four bits, this function cannot be used for multiple interrupts exceeding 15 levels. • Be sure to assign the priority of the DMA tasks at a level that is at least 15 levels higher than other interrupt levels.

  • Page 381

    If edge detection is selected for the external pin start source and a transfer request is detected, the request is retained within DMAC until the clear conditions are met (when the external pin start source is selected for block, step, or burst transfer). If level detection or peripheral interrupt start is selected for the external pin start source, DMAC continues the transfer until all transfer requests are cleared.

  • Page 382

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation ● Disabling all channels If the operation of all channels is disabled with the DMA operation enable bit DMAE, all DMAC operations, including operations on active channels, are stopped. Then, even if the operation of all channels is enabled again, no transfer is performed unless a channel is restarted.

  • Page 383

    ■ Occurrence of an Address Error If inappropriate addressing, as shown below in parenthesis, occurs in an addressing mode, an address error is detected (if an overflow or underflow occurs in the address counter when a 32-bit address is specified). If an address error is detected, "An address error occurred"...

  • Page 384

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation 3.11 Channel Selection and Control Up to five channels can be simultaneously set as transfer channels. In general, an independent function can be set for each channel. ■ Priority Among Channels Since DMA transfer is possible only on one channel at a time, priority must be set for the channels. Two modes, fixed and rotation, are provided as the priority settings and can be selected for each channel group (described later).

  • Page 385

    ■ Channel Group The order of priority is set as shown in the following table. MODE Priority Fixed ch0 > ch1 ch0 > ch1 Rotation ch0 < ch1 3.12 Supplement on External Pin and Internal Operation Timing This section provides supplementary information about external pins and internal operation tim- ing.

  • Page 386

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation Figure 3-7 Negate timing example of the DREQ pin input for 2-cycle external transfer --> internal transfer Bus operation Area External D bus DACK DEOP DREQ (H level) • If the transfer is internal <--> external: Negate before the last sense timing of the clock in the L section of the external WRn pin output when accessing the transfer source for the last DMA transfer (Section of DACK = 1and WRn = L).

  • Page 387

    Even if DREQ is reasserted earlier, it is ignored because the transfer has not been completed. If no transfer requests for other channels occur, transfer over the same channel is restarted by reasserting DREQ when the DACK pin output is asserted. ■...

  • Page 388

    Chapter 26 DMA Controller 3.DMA Controller (DMAC) Operation ■ AC Characteristics of DMAC DREQ pin input, DACK pin output, and DEOP pin output are provided as the external pins related to the DMAC,. Output timing is synchronized with external bus access (refer to the AC standard for the DMAC).

  • Page 389: Operation Flowcharts

    4. Operation Flowcharts This section contains operation flowcharts for the following transfer modes: • Block transfer • Burst transfer • Demand transfer ■ Block Transfer Figure 4-1"Operation Flowchart for Block Transfer" shows the flowchart for block transfer. Figure 4-1 Operation Flowchart for Block Transfer DENB=>0 Reload enable Load the initial address,...

  • Page 390

    Chapter 26 DMA Controller 4.Operation Flowcharts Figure 4-2 Operation Flowchart for Burst Transfer DENB=>0 Reload enable Calculate the address for transfer source address access Calculate the address for transfer destination address access Burst transfer - Can be activated by all activation sources (selection). - Can access to all areas.

  • Page 391

    Figure 4-3 Operation Flowchart for Demand Transfer DMA stop DENB=>0 DENB=1 None Activation request wait Reload enable Activation request Load the initial address, transfer count, and number of blocks Calculate the address for transfer source address access Calculate the address for transfer destination address access Number of transfer - 1 Write back the address,...

  • Page 392: Data Bus

    Chapter 26 DMA Controller 5.Data Bus 5. Data Bus This section shows the flow of data during 2-cycle transfer and fly-by transfer. ■ Flow of Data During 2-Cycle Transfer Figure 14.5-1 shows examples of six types of transfer during 2-cycle transfer. Figure 5-1 Examples of 2-Cycle Transfer (Continued on next page) MB91460 DMAC...

  • Page 393

    MB91460 DMAC Read cycle I-bus Bus controller D-bus Data buffer MB91460 DMAC Read cycle I-bus Bus controller D-bus Data buffer MB91460 DMAC Read cycle I-bus Bus controller D-bus Data buffer ■ Flow of Data During Fly-By Transfer Figure 5-2"Examples of Fly-By Transfer" shows examples of two types of transfer during fly-by transfer. Built-in I/O area =>...

  • Page 394

    Chapter 26 DMA Controller 5.Data Bus MB91460 DMAC Read cycle I-bus Bus controller D-bus Data buffer MB91460 DMAC Read cycle I-bus Bus controller D-bus Data buffer Figure 5-2 Examples of Fly-By Transfer Fly-by transfer (memory to I/O) X-bus F-bus Fly-by transfer (I/O to memory) X-bus F-bus Memory read by RD or CSn...

  • Page 395: Dma External Interface

    6. DMA External Interface This section provides operation timing charts for the DMA external interface. ■ DMA External Interface Pins DMA channels 0-3 have the following DMA-dedicated pins (DREQ, DACK, and DEOP): • DREQ: DMA transfer request input pin for demand transfer. A transfer is requested with an input. •...

  • Page 396

    Chapter 26 DMA Controller 6.DMA External Interface ■ Timing of Demand Transfer For demand transfer, set the DMA start source to level detection. Although there is no rule for starting, synchronize with RD/WRn of the DMA transfer when stopping a transfer. The sense timing is the rise of MCLK in the final external access.

  • Page 397

    Figure 6-3 Timing Chart in 2-Cycle Transfer Mode DQMU/L WR/WRn DACK (AKxx=111 DACK (AKxx=001 DACK (AKxx=010 DACK (AKxx=011 DACK (AKxx=100 DACK (AKxx=101 DACK (AKxx=110 * : AKxx is the setting value in the PFR register that corresponds to the DMA channel. ●...

  • Page 398

    Chapter 26 DMA Controller 6.DMA External Interface...

  • Page 399: Chapter 27 Delayed Interrupt

    Chapter 27 Delayed Interrupt 1. Overview The delayed interrupt, or the delayed interrupt module is used to generate an interrupt used for task switching. Software request 2. Features • Type: Interrupt request bit (There is no interrupt request enable bit) •...

  • Page 400: Register

    Chapter 27 Delayed Interrupt 4.Register 4. Register 4.1 DICR: Delayed Interrupt Control Register This register controls to generate/clear the delayed interrupt. • DICR: Address 0038h (Access: Byte) – – – – – – RX/WX RX/WX RX/WX (Refer to “Meaning of Bit Attribute Symbols (Page •...

  • Page 401: Setting

    6. Setting Table Setting required for the delayed interrupt generation/clear Table 6-1 Setting required for the delay interrupt generation/clear Setting Vector for delay interrupt Delayed interrupt setting. Generating interrupt request/Releasing interrupt request *: Refer to the number for the setting method. 7.

  • Page 402

    Chapter 27 Delayed Interrupt 8.Caution...

  • Page 403: Chapter 28 Bit Search

    Chapter 28 Bit Search 1. Overview The bit search module is used to detect 0, 1 or changing position for data written in specific registers. 0-position register 1-position register Changing-pos. register 2. Features • Function: Detects the first changing position by scanning data written in data register from MSB to LSB. •...

  • Page 404: Configuration

    Chapter 28 Bit Search 3.Configuration 3. Configuration Bit search Address decoder 0-/1-/Changing-position-detection data register Write only BSD0/ BSD1/ BSDC Run only Detection data (BSD1) Bit search Figure 3-1 Configuration Diagram Detection mode selection Lowest four bits Operation selection of the address for BSD0/BSD1/BSDC 0-detection 0000...

  • Page 405: Register

    4. Register 4.1 BSD0: 0 Detection Register / BSD1:1 Detection Register / BSDC: Changing position Detection Data Register This is a register for setting the bit search detection data. • BSD0: Address 03F0 (Access: Word) • BSD1: Address 03F4 (Access: Word) •...

  • Page 406

    Chapter 28 Bit Search 4.Register 4.2 BSRR: Detection Result Register This register is used to read a bit search result. • BSRR: Address 03FC (Access: Word) (For the attributes, refer to “Meaning of Bit Attribute Symbols (Page • Detection result for data written in the 0 detection register BSD0, the 1-detection register BSD1 and the changing-position-detection register BSDC can be read.

  • Page 407: Operation

    5. Operation 5.1 Zero detection Bit position from MSB Data Scan Detection result (1) Bit position from MSB (2) Written data (Starts to search once data is written.) (3) Detects “0” by scanning from MSB. (4) Detected bit position (5) Detection result If ‘0’...

  • Page 408

    Chapter 28 Bit Search 5.Operation 5.3 Changing Position Detection Bit position from MSB Data Scan Detection result (1) Bit position from MSB (2) Written data (Detection starts once data is written.) (3) Detects the changing position by scanning from MSB. (4) Detected bit position (5) Detection result A value of ‘32’...

  • Page 409: Setting

    6. Setting Table 6-1 Settings Required for “Zero” Position Detection Setting Data write & scan start Converted value read *: For detailed description contents, refer to the reference destination number. Table 6-2 Setting Required for Using “One” Position Detection Setting Data write &...

  • Page 410

    Chapter 28 Bit Search 7.Q & A 7. Q & A 7.1 How is data written? Writes data with the detection data registers (BSD0, BSD1, BSDC). Operation mode “Zero” position detection write “One” position detection write Changing position detection write 7.2 How is scanning started? Scanning is started once data is written in the detection data registers (BSD0, BSD1, BSDC).

  • Page 411: Caution

    8. Caution The following are the remarks on using the bit search module. • The macros are for REALOS(OS), and the user cannot use them when using REALOS. • If the relevant detection is not found, a detection result of 32(decimal), 10(hexadecimal) or 10000(binary) is returned.

  • Page 412

    Chapter 28 Bit Search 8.Caution...

  • Page 413: Chapter 29 Mpu / Edsu

    Chapter 29 MPU / EDSU 1. Overview Memory Protection Unit (MPU) and Embedded Debug Support Unit (EDSU) for MB91460 series. Remark: The MPU/EDSU module features a clock disable function. For enabling the MPU/EDSU module it is necessary to set the EDSUEN bit in the CSCFG register. See chapter tion Register (Page No.196)”...

  • Page 414: Features

    Chapter 29 MPU / EDSU 2.Features 2. Features One Comparator Group offers up to 4 Breakpoints. One Group consists of two full-featured range comparators with the option to use two point registers as mask information. The following features could be partially mixed-up: 4 Instruction Address Breakpoints Up to 4 instruction address breakpoints can be defined.

  • Page 415: Break Functions

    3. Break Functions 3.1 Instruction address break The instruction address point break is the most basic break that occurs when an instruction is fetched at the address specified by the break address data registers BAD[3:0]. Setting the CTC[1:0] bits of the control register BCR0 to ’00’ provides this mode.

  • Page 416

    Chapter 29 MPU / EDSU 3.Break Functions Break occurs at 0x02345200 to 0x02345300,or at 0x12345200 to 0x12345300,or at 0x22345200 to 0x22345300, etc. The resulting setting of the BD[1:0] status bits indicates the point, respective the area in which the break has oc- cured.

  • Page 417

    Example: BAD0 0x12345200 BAD1 0x12345300 BAD2 0xF0000000 Break occurs at 0x02345200 to 0x02345300,or at 0x12345200 to 0x12345300,or at 0x22345200 to 0x22345300, etc. The resulting setting of the BD[1:0] status bits indicates the point, respective the area in which the break has oc- cured.

  • Page 418

    Chapter 29 MPU / EDSU 3.Break Functions Table 3-3 Operand size and operand address relations Access data Access length address 4n + 0 4n + 1 32 bit 4n + 2 4n + 3 In Operand address break mode the Operand Address, causing the break is captured in the BOAC register. Addi- tional BIAC holds the instruction address of the instruction, which was executed one cycle before the break causing data operation.

  • Page 419

    2) The EDSU data break does not always occur immediately after completion of execution of the instruction causing the break event. 3) Please see also information at chapter Table 3-4 Access data Address set length to BAD3/2 4n + 0 4n + 1 8 bit 4n + 2...

  • Page 420: Memory Protection

    Chapter 29 MPU / EDSU 3.Break Functions On break both BD0 and BD2, respective BD1 and BD3 are set. They have to be reset by software in the operand break exception routine. Table 3-5 Operand address and data value break combinations EP3/2 EP1/0 COMB...

  • Page 421

    Permissions can be set for the comparator channel CMP1 and CMP0 separately, indicated by the symbol index. Table 3-7 Meaning of the permission config bits Symbol SRX[1:0] SuperVisor Read permission SW[1:0] SuperVisor Write permission URX[1:0] User Read permission UW[1:0] User Write permission At each time an instruction is executed or an operand is accessed, the actual valid permissions were evaluated.

  • Page 422

    Chapter 29 MPU / EDSU 3.Break Functions Break factors and corresponding interrupt numbers and vectors: Table 3-8 Interrupt numbers and vectors of break factors Interrupt CPU supervisor mode (INT #5 instruction) Memory protection exception INTE instruction Instruction break exception Operand break exception Step trace trap NMI interrupt (tool)

  • Page 423: Registers

    4. Registers 4.1 List of EDSU Registers Table 4-1 EDSU Registers Summary Address F000 BCTRL -------- -------- 11111100 00000000 F004 BSTAT -------- -----000 00000000 10--0000 F008 BIAC 00000000 00000000 00000000 00000000 F00C BOAC 00000000 00000000 00000000 00000000 F010 BIRQ 00000000 00000000 00000000 00000000 F014 ...F01F reserved...

  • Page 424

    Chapter 29 MPU / EDSU 4.Registers Table 4-1 EDSU Registers Summary Address F080 BAD0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F084 BAD1 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F088 BAD2 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F08C BAD3 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F090 BAD4 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F094 BAD5 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX...

  • Page 425

    Table 4-1 EDSU Registers Summary Address F0C0 BAD16 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F0C4 BAD17 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F0C8 BAD18 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F0CC BAD19 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F0D0 BAD20 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F0D4 BAD21 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX F0D8 BAD22 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX...

  • Page 426

    Chapter 29 MPU / EDSU 4.Registers 4.2 Explanations of Registers ● EDSU Control Register (BCTRL) EDSU Control Register byte 2 Address : F002 Read/write ⇒ (R/W) (R/W) (R/W) (R/W) (R/W) (R/W) (R/W) (R/W) Default value⇒ EDSU Control Register byte 3 Address : F0 03 Read/write ⇒...

  • Page 427

    BIT[11]: UW - User default Write permission register User is not permitted to write data User is permitted to write data (default) BIT[10]: UX - User default eXecute permission register User is not permitted to execute code User is permitted to execute code (default) CPU and DMA Filter Option Register BIT[9]: FCPU - Filter CPU access Trigger on CPU accesses (default)

  • Page 428

    Chapter 29 MPU / EDSU 4.Registers Enable emulation mode If EEMM is set to ’1’ then the emulation mode is entered during Step Trace Mode and EDSU exceptions Instruction Break, Operand Break and Tool NMI. During emulation mode the Watchdog Timer (WDT) is disabled. EDSU trig- gered emulation mode is left with the RETI instruction.

  • Page 429

    BIT[3]: EINT1 - Enable extended INTerrupt 1 Disable extended interrupt source 1 (default) Enable extended interrupt source 1 If EINT1 is set to ’1’ then a Tool NMI will be generated on an extended interrupt event at source channel 1. Set to ’0’...

  • Page 430

    Chapter 29 MPU / EDSU 4.Registers ● EDSU Status Register (BSTAT) EDSU Status Register byte 2 Address : F006 Read/write ⇒ Default value⇒ EDSU Status Register byte 3 Address : F0 07 Read/write ⇒ Default value⇒ BIT[15:11]: IDX[4:0] - Channel Index Indication of MPUPV Trigger In the case of triggering a memory protection violation (MPUPV), the index of the channel pair 0...15 is saved in The IDX register, which caused the trigger.

  • Page 431

    BIT[9:8]: CSZ[1:0] - Capture Operand Size The operand has a bit size of 8 The operand has a bit size of 16 The operand has a bit size of 32 reserved BIT[7:6]: CRW[1:0] - Capture Operand Access Type The operand has been read The operand has been read by read-modify-write indicated The operand has been written no operand access...

  • Page 432

    Chapter 29 MPU / EDSU 4.Registers BIT[3]: INT1 - INTerrupt on extended source 1 Interrupt on extended source channel 1 not detected (default) Interrupt on extended source channel 1 detected INT1 reflects the status of the extended interrupt source channel 1. It is set to ’1’ if a high level on the extended interrupt signal line has been occured.

  • Page 433

    ● EDSU Instruction Address Capture Register (BIAC) Address F008 00000000 This register captures the address of the instruction (IA), which has caused the protection violation or the operand/ data value break. This register could be read only. ● EDSU Operand Address Capture Register (BOAC) Address F00C 00000000...

  • Page 434

    Chapter 29 MPU / EDSU 4.Registers • operand address break, • data value break, • combined operand address and data value break and • memory protection violation. Writing ’0’ resets the BD[31:0] bits to ’0’. Writing ’1’ to these bits is ignored. On a Read Modify Write instruction all BD bits are read as ’1’.

  • Page 435

    ● EDSU Channel Configuration Register (BCR0...BCR7) EDSU Ch. Config Register 0, byte 0 Address : F020 Read/write ⇒ Default value⇒ EDSU Ch. Config Register 0, byte 1 Address : F0 21 Read/write ⇒ Default value⇒ EDSU Ch. Config Register 0, byte 2 Address : F022 Read/write ⇒...

  • Page 436

    Chapter 29 MPU / EDSU 4.Registers Table 4-3 Relationship of BCR, BAD and BIRQ registers Group Config Address/Data BCR3 BAD12 BAD13 BAD14 BAD15 BCR4 BAD16 BAD17 BAD18 BAD19 BCR5 BAD20 BAD21 BAD22 BAD23 BCR6 BAD24 BAD25 BAD26 BAD27 BCR7 BAD28 BAD29 BAD30 BAD31...

  • Page 437

    • CTC=2: IA range 0 defines execute permissions and OA range 1 defines read/write permissions. Data value (DT) detection by setting CTC=3 is not possible to use in MPU mode. Permission configurations exist for read, write and execute for two CPU modes, the super visor mode and the user mode.

  • Page 438

    Chapter 29 MPU / EDSU 4.Registers BIT[19]: URX1 - User Read/eXecute permission register for range 1 Setting valid for CTC == 0 (Instruction address range comparator): User has no execute permission on address range 1(default) User has execute permission on address range 1 Setting valid for CTC == 1 or CTC == 2 (Operand address range comparator): User has no read permission on address range 1 (default) User has read permission on address range 1...

  • Page 439

    The group of channels operates in memory protection mode Some restrictions apply with the setting of the MPE bit. MPE=0 (break unit): • permission registers are don’t care (BCRx bits [23:16]) MPE=1 (memory protection unit): • OBS and OBT should be set to ’3’ (BCRx bits [11:8], any size and any type) •...

  • Page 440

    Chapter 29 MPU / EDSU 4.Registers The COMB bit set to ’1’ causes the IA comparator CMP0 to use the same BADx point definitions as the OA com- parator CMP1. Point 3 and Point 2 define the address range for both comparators CMP0 and CMP1. This has the effect that the entry of Point 0/Mask 0 is not allocated for the Point set-up and could be used for masking either one or both comparators.

  • Page 441

    Datasize OBS1 OBS0 All (Byte, Hword, Word) The operand break size register OBS configures the datasize and the operand break type register OBT configures the access type if the channel is configured to operand address break or data value break detection. Setting to ’all’...

  • Page 442

    Chapter 29 MPU / EDSU 4.Registers The input value and the point value is masked if the mask function is enabled by EM0. On a compare match a break exception will be executed. CTC and MPE control the selection of the input value and the type of the break excep- tion.

  • Page 443

    The selection of the appropriate BADx register (point 0 or 2) for the mask value depends on EP0 and ER0. If at least one of both bits are enabled, the mask usage switches to point 2 due to the allocation of point 0. Otherwise the default mask stored in point 0 applies for CMP0.

  • Page 444

    Chapter 29 MPU / EDSU 4.Registers Address F084 XXXXXXXX This register sets the 32 bit comparison value for break point 1 of CMP0. In range mode (set with ER0) the register value of BAD1 functions as upper address limit. In the special case of MPE=1 and COMB=1 BAD1 is not used for the point definition. CMP0 gets its point configu- ration then from BAD3.

  • Page 445: Quick Reference

    Chapter 29 MPU / EDSU 5.Quick Reference 5. Quick Reference Figure 5-1 Register Quick Reference...

  • Page 446

    Chapter 29 MPU / EDSU 5.Quick Reference BCR1 BAD7 BAD6 BAD5 BAD4 BCR0 BAD3 BAD2 BAD1 BAD0 Figure 5-2 Comparator Group Structure (drawn for two groups) OBS−Match Point 3 Point 2 IA/OA Mask 1 CMP1 Value Comparator GROUP 1 Point 1 Point 0 IA/OA/DT Mask 0...

  • Page 447: Chapter 30 I/o Ports

    Chapter 30 I/O Ports 1. I/O Ports Functions For enabling the resource functions, please refer to section ... Circuit Pin Name I/O Signal Type INITX INITX TC02_0 RSTX RSTX TC01_0 HSTX HSTX TC00_0 NMIX NMIX TC01_0 TC02_1 TC02_1 TC02_1 TO00_0 TO00_1 TO01_0 TO01_1...

  • Page 448

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P00_3 P00_3 TP04_0 P00_2 P00_2 TP04_0 P00_1 P00_1 TP04_0 P00_0 P00_0 TP04_0 P01_7 P01_7 TP04_0 P01_6 P01_6 TP04_0 P01_5 P01_5 TP04_0 P01_4 P01_4 TP04_0 P01_3 P01_3 TP04_0 P01_2 P01_2 TP04_0...

  • Page 449

    Circuit Pin Name I/O Signal Type P01_0 P01_0 TP04_0 P02_7 P02_7 TP04_0 P02_6 P02_6 TP04_0 P02_5 P02_5 TP04_0 P02_4 P02_4 TP04_0 P02_3 P02_3 TP04_0 P02_2 P02_2 TP04_0 P02_1 P02_1 TP04_0 P02_0 P02_0 TP04_0 P03_7 P03_7 TP04_0 P03_6 P03_6 TP04_0 Function General purpose I/O.

  • Page 450

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P03_5 P03_5 TP04_0 P03_4 P03_4 TP04_0 P03_3 P03_3 TP04_0 P03_2 P03_2 TP04_0 P03_1 P03_1 TP04_0 P03_0 P03_0 TP04_0 P04_7 P04_7 TP04_0 P04_6 P04_6 TP04_0 P04_5 P04_5 TP04_0 P04_4 P04_4 TP04_0...

  • Page 451

    Circuit Pin Name I/O Signal Type P04_2 P04_2 TP04_0 P04_1 P04_1 TP04_0 P04_0 P04_0 TP04_0 P05_7 P05_7 TP04_0 P05_6 P05_6 TP04_0 P05_5 P05_5 TP04_0 P05_4 P05_4 TP04_0 P05_3 P05_3 TP04_0 P05_2 P05_2 TP04_0 P05_1 P05_1 TP04_0 P05_0 P05_0 TP04_0 Function General purpose I/O.

  • Page 452

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P06_7 P06_7 TP04_0 P06_6 P06_6 TP04_0 P06_5 P06_5 TP04_0 P06_4 P06_4 TP04_0 P06_3 P06_3 TP04_0 P06_2 P06_2 TP04_0 P06_1 P06_1 TP04_0 P06_0 P06_0 TP04_0 P07_7 P07_7 TP04_0 P07_6 P07_6 TP04_0...

  • Page 453

    Circuit Pin Name I/O Signal Type P07_4 P07_4 TP04_0 P07_3 P07_3 TP04_0 P07_2 P07_2 TP04_0 P07_1 P07_1 TP04_0 P07_0 P07_0 TP04_0 P08_7 P08_7 TP04_0 P08_6 P08_6 TP04_0 P08_5 P08_5 TP04_0 BGRNTX P08_4 P08_4 TP04_0 P08_3 P08_3 TP04_0 WRX3 P08_2 P08_2 TP04_0 WRX2 Function...

  • Page 454

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P08_1 P08_1 TP04_0 WRX1 P08_0 P08_0 TP04_0 WRX0 P09_7 P09_7 TP04_0 CSX7 P09_6 P09_6 TP04_0 CSX6 P09_5 P09_5 TP04_0 CSX5 P09_4 P09_4 TP04_0 CSX4 P09_3 P09_3 TP04_0 CSX3 P09_2 P09_2...

  • Page 455

    Circuit Pin Name I/O Signal Type P10_6 P10_6 TP04_0 MCLKE P10_5 P10_5 MCLKI TP04_0 MCLKI P10_4 P10_4 MCLKO TP04_0 MCLKO P10_3 P10_3 TP04_0 P10_2 P10_2 TP04_0 BAAX P10_1 P10_1 TP04_0 P10_0 P10_0 SYSCLK TP04_0 SYSCLK P11_7 P11_7 TP04_0 P11_6 P11_6 TP04_0 P11_5 P11_5...

  • Page 456

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P11_0 P11_0 TP04_0 IORDX P12_7 P12_7 TP04_0 DEOP3 P12_6 P12_6 DEOTX3 TP04_0 DEOP3 P12_5 P12_5 TP04_0 DACKX3 P12_4 P12_4 TP04_0 DREQ3 P12_3 P12_3 TP04_0 DEOP2 P12_2 P12_2 DEOTX2 TP04_0 DEOP2...

  • Page 457

    Circuit Pin Name I/O Signal Type P14_7 ICU7 P14_7 TP00_0 TIN7 TTG15/7 P14_6 ICU6 P14_6 TP00_0 TIN6 TTG14/6 P14_5 ICU5 P14_5 TP00_0 TIN5 TTG13/5 P14_4 ICU4 P14_4 TP00_0 TIN4 TTG12/4 P14_3 ICU3 P14_3 TP00_0 TIN3 TTG11/3 P14_2 ICU2 P14_2 TP00_0 TIN2 TTG10/2 P14_1...

  • Page 458

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P15_5 P15_5 OCU5 TP00_0 TOT5 P15_4 P15_4 OCU4 TP00_0 TOT4 P15_3 P15_3 OCU3 TP00_0 TOT3 P15_2 P15_2 OCU2 TP00_0 TOT2 P15_1 P15_1 OCU1 TP00_0 TOT1 P15_0 P15_0 OCU0 TP00_0 TOT0...

  • Page 459

    Circuit Pin Name I/O Signal Type P17_7 P17_7 TP00_0 PPG7 P17_6 P17_6 TP00_0 PPG6 P17_5 P17_5 TP00_0 PPG5 P17_4 P17_4 TP00_0 PPG4 P17_3 P17_3 TP00_0 PPG3 P17_2 P17_2 TP00_0 PPG2 P17_1 P17_1 TP00_0 PPG1 P17_0 P17_0 TP00_0 PPG0 P18_7 P18_7 TP00_0 P18_6 SCK7...

  • Page 460

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P19_7 P19_7 TP00_0 P19_6 P19_6 SCK5 TP00_0 P19_5 P19_5 TP00_0 SOT5 P19_4 P19_4 TP00_0 SIN5 P19_3 P19_3 TP00_0 P19_2 P19_2 SCK4 TP00_0 P19_1 P19_1 TP00_0 SOT4 P19_0 P19_0 TP00_0 SIN4...

  • Page 461

    Circuit Pin Name I/O Signal Type P21_7 P21_7 TP00_0 P21_6 P21_6 SCK1 TP00_0 P21_5 P21_5 TP00_0 SOT1 P21_4 P21_4 TP00_0 SIN1 P21_3 P21_3 TP00_0 P21_2 P21_2 SCK0 TP00_0 P21_1 P21_1 TP00_0 SOT0 P21_0 P21_0 TP00_0 SIN0 P22_7 P22_7 TP02_0 SCL1 P22_6 P22_6 SDA1...

  • Page 462

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P23_7 P23_7 TP00_0 P23_6 P23_6 TP00_0 INT11 P23_5 P23_5 TP00_0 P23_4 P23_4 TP00_0 INT10 P23_3 P23_3 TP00_0 P23_2 P23_2 TP00_0 INT9 P23_1 P23_1 TP00_0 P23_0 P23_0 TP00_0 INT8 P24_7 P24_7...

  • Page 463

    Circuit Pin Name I/O Signal Type P25_7 P25_7 TP05_0 SMC2M5 P25_6 P25_6 TP05_0 SMC2P5 P25_5 P25_5 TP05_0 SMC1M5 P25_4 P25_4 TP05_0 SMC1P5 P25_3 P25_3 TP05_0 SMC2M4 P25_2 P25_2 TP05_0 SMC2P4 P25_1 P25_1 TP05_0 SMC1M4 P25_0 P25_0 TP05_0 SMC1P4 P26_7 P26_7 SMC2M3 TP05_0 AN31...

  • Page 464

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P26_0 P26_0 SMC1P2 TP05_0 AN24 P27_7 P27_7 SMC2M1 TP05_0 AN23 P27_6 P27_6 SMC2P1 TP05_0 AN22 P27_5 P27_5 SMC1M1 TP05_0 AN21 P27_4 P27_4 SMC1P1 TP05_0 AN20 P27_3 P27_3 SMC2M0 TP05_0 AN19...

  • Page 465

    Circuit Pin Name I/O Signal Type P28_3 P28_3 TP03_0 AN11 P28_2 P28_2 TP03_0 AN10 P28_1 P28_1 TP03_0 P28_0 P28_0 TP03_0 P29_7 P29_7 TP03_0 P29_6 P29_6 TP03_0 P29_5 P29_5 TP03_0 P29_4 P29_4 TP03_0 P29_3 P29_3 TP03_0 P29_2 P29_2 TP03_0 P29_1 P29_1 TP03_0 P29_0 P29_0...

  • Page 466

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P30_0 P30_0 TP06_0 COM0 P31_7 P31_7 TP06_0 SEG39 P31_6 P31_6 TP06_0 SEG38 P31_5 P31_5 TP06_0 SEG37 P31_4 P31_4 TP06_0 SEG36 P31_3 P31_3 TP06_0 SEG35 P31_2 P31_2 TP06_0 SEG34 P31_1 P31_1...

  • Page 467

    Circuit Pin Name I/O Signal Type P32_0 P32_0 SEG24 TP06_0 SIN14 P33_7 P33_7 TP06_0 SEG23 P33_6 P33_6 SEG22 TP06_0 SCK13 P33_5 P33_5 SEG21 TP06_0 SOT13 P33_4 P33_4 SEG20 TP06_0 SIN13 P33_3 P33_3 TP06_0 SEG19 P33_2 P33_2 SEG18 TP06_0 SCK12 P33_1 P33_1 SEG17 TP06_0...

  • Page 468

    Chapter 30 I/O Ports 1.I/O Ports Functions Circuit Pin Name I/O Signal Type P34_2 P34_2 SEG10 TP06_0 SCK10 P34_1 P34_1 SEG9 TP06_0 SOT10 P34_0 P34_0 SEG8 TP06_0 SIN10 P35_7 P35_7 TP06_0 SEG7 P35_6 P35_6 SEG6 TP06_0 SCK9 P35_5 P35_5 SEG5 TP06_0 SOT9 P35_4...

  • Page 469: I/o Circuit Types

    2. I/O Circuit Types 2.1 I/O Cell List MB91V460 Type Pull Up / Down (50 kOhm) TP00_0 Up/Down switch TP01_0 TP02_0 TP03_0 Up/Down switch TP04_0 Up/Down switch TP05_0 TP06_0 TP07_0 TP08_0 TC00_0 TC01_0 TC02_0 TC02_1 TC10_0 TO00_0 TO00_1 TO01_0 TO01_1 TA02_0 Note: This table shows the I/O cells used for MB91V460.

  • Page 470: Port Register Settings

    Chapter 30 I/O Ports 3.Port Register Settings 3. Port Register Settings 3.1 General Rules For all ports, the following rules are valid: 1. All port inputs are disabled by default to avoid transverse current floating before the ports are configured by software. After configuring each port pin according to its function it is necessary to enable the port inputs with the global port enable (PORTEN.GPORTEN).

  • Page 471

    14.Resource output lines are enabled by setting the corresponding PFR and/or EPFR bit in the port. Details see section Port Function Register Setup on page additionally by setting the SOE bit in the LIN-USART control. 15.Resource bidirectional signals (e.g. SCK of the LIN-USART) are enabled by setting the corresponding PFR and/or EPFR bit in the port.

  • Page 472

    Chapter 30 I/O Ports 3.Port Register Settings 3.2 I/O Port Block Diagram Port Bus PILR EPILR PDRD read PDR read PPER PPCR 1. Peripheral output 2. Peripheral output EPFR PODR PDR: Port Data Register PDRD: Port Data Direct Register DDR: Data Direction Register PFR: Port Function Register...

  • Page 473

    3.3 Port Input Enable This section describes the Port Input Enable function. ■ PORTEN: Port Input Enable. Addr PORTEN 0498h All port inputs are disabled by default to avoid transverse current floating in the IO input stages and the subsequent logic. After configuring all ports according to their functional specification (input level, output drive, pull-up or pull-down resistor, etc.) it is mandatory to globally enable the inputs by setting the port input enable bit.

  • Page 474

    Chapter 30 I/O Ports 3.Port Register Settings 3.4 Port Function Register Setup This section describes the Port Function Registers of each port. ■ P00: The functions of Port 00 are controlled by PFR00 Addr PFR00 0D80h PFR00.7 EPFR00 0DC0h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P00[7:0] is input/output for data lines D[31:24].

  • Page 475

    ■ P01: The functions of Port 01 are controlled by PFR01 Addr PFR01 0D81h PFR01.7 EPFR01 0DC1h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P01[7:0] is input/output for data lines D[23:16]. Otherwise, the port can be used as general purpose port. PFR01.7 0 - Port is in general purpose port mode.

  • Page 476

    Chapter 30 I/O Ports 3.Port Register Settings ■ P02: The functions of Port 02 are controlled by PFR02 Addr PFR02 0D82h PFR02.7 EPFR02 0DC2h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P02[7:0] is input/output for data lines D[15:8].

  • Page 477

    ■ P03: The functions of Port 03 are controlled by PFR03 Addr PFR03 0D83h PFR03.7 EPFR03 0DC3h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P03[7:0] is input/output for data lines D[7:0]. Otherwise, the port can be used as general purpose port. PFR03.7 0 - Port is in general purpose port mode.

  • Page 478

    Chapter 30 I/O Ports 3.Port Register Settings ■ P04: The functions of Port 04 are controlled by PFR04 Addr PFR04 0D84h PFR04.7 EPFR04 0DC4h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P04[7:0] is input/output for address lines A[31:24].

  • Page 479

    ■ P05: The functions of Port 05 are controlled by PFR05 Addr PFR05 0D85h PFR05.7 EPFR05 0DC5h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P05[7:0] is input/output for address lines A[23:16]. Otherwise, the port can be used as general purpose port. PFR05.7 0 - Port is in general purpose port mode.

  • Page 480

    Chapter 30 I/O Ports 3.Port Register Settings ■ P06: The functions of Port 06 are controlled by PFR06 Addr PFR06 0D86h PFR06.7 EPFR06 0DC6h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P06[7:0] is input/output for address lines A[15:8].

  • Page 481

    ■ P07: The functions of Port 07 are controlled by PFR07 Addr PFR07 0D87h PFR07.7 EPFR07 0DC7h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P07[7:0] is input/output for address lines A[7:0]. Otherwise, the port can be used as general purpose port. PFR07.7 0 - Port is in general purpose port mode.

  • Page 482

    Chapter 30 I/O Ports 3.Port Register Settings ■ P08: The functions of Port 08 are controlled by PFR08 Addr PFR08 0D88h PFR08.7 EPFR08 0DC8h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P08[7:0] is input/output for external bus control signals RDY, BRQ, BGRNTX, RDX, WRX[3:0].

  • Page 483

    ■ P09: The functions of Port 09 are controlled by PFR09 Addr PFR09 0D89h PFR09.7 EPFR09 0DC9h If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P09[7:0] is input/output for external bus control signals CSX[7:0]. Otherwise, the port can be used as general purpose port. PFR09.7 0 - Port is in general purpose port mode.

  • Page 484

    Chapter 30 I/O Ports 3.Port Register Settings ■ P10: The functions of Port 10 are controlled by PFR10 and EPFR10 Addr PFR10 0D8Ah EPFR10 0DCAh If the external bus interface is enabled (by mode pins MD[2:0] or mode vector), P10[7:0] is input/output for external bus control signals MCLKE, MCLKI, MCLKO, WEX, BAAX, ASX, SYSCLK.

  • Page 485

    ■ P11: The functions of Port 11 are controlled by PFR11 Addr PFR11 0D8Bh EPFR11 0DCBh P11[7:0] is input/output for DMA control signals IOWRX, IORDX. Otherwise, the port can be used as general purpose port. PFR11.1 0 - Port is in general purpose port mode. 1 - Port is in DMA function mode: DMA function is IOWRX output PFR11.0...

  • Page 486

    Chapter 30 I/O Ports 3.Port Register Settings ■ P12: The functions of Port 12 are controlled by PFR12 and EPFR12 Addr PFR12 0D8Ch PFR12.7 EPFR12 0DCCh P12[7:0] is input/output for DMA control signals DEOP, DEOTX, DACKX, DREQ for DMA channels 2 and 3. Otherwise, the port can be used as general purpose port.

  • Page 487

    ■ P13: The functions of Port 13 are controlled by PFR13 and EPFR13 Addr PFR13 0D8Dh PFR13.7 EPFR13 0DCDh P13[7:0] is input/output for DMA control signals DEOP, DEOTX, DACKX, DREQ for DMA channels 0 and 1. Otherwise, the port can be used as general purpose port. PFR13.7 0 - Port is in general purpose port mode.

  • Page 488

    Chapter 30 I/O Ports 3.Port Register Settings ■ P14: The functions of Port 14 are controlled by PFR14 and EPFR14 Addr PFR14 0D8Eh PFR14.7 EPFR14 0DCEh EPFR14.7 EPFR14.6 EPFR14.5 EPFR14.4 EPFR14.3 EPFR14.2 EPFR14.1 EPFR14.0 P14[7:0] is input/output for Input Capture inputs ICU[7:0], Reload Timer triggers TIN[7:0] and PWM inputs TTG[15:0].

  • Page 489

    Resource function is TIN1 and TTG9/1 input, and EPFR14.1 0 - Resource function is ICU1 input 1 - ICU1 is internally connected to LSYN of LIN-UART 1/9 PFR14.0 0 - Port is in general purpose port mode. 1 - Port is in resource function mode: Resource function is TIN0 and TTG8/0 input, and EPFR14.0 0 - Resource function is ICU0 input 1 - ICU0 is internally connected to LSYN of LIN-UART 0/8...

  • Page 490

    Chapter 30 I/O Ports 3.Port Register Settings ■ P15: The functions of Port 15 are controlled by PFR15 and EPFR15 Addr PFR15 0D8Fh PFR15.7 EPFR15 0DCFh EPFR15.7 EPFR15.6 EPFR15.5 EPFR15.4 EPFR15.3 EPFR15.2 EPFR15.1 EPFR15.0 P15[7:0] is input/output for Output Compare outputs OCU[7:0] and Reload Timer outputs TOT[7:0]. Otherwise, the port can be used as general purpose port.

  • Page 491

    ■ P16: The functions of Port 16 are controlled by PFR16 and EPFR16 Addr PFR16 0D90h PFR16.7 EPFR16 0DD0h EPFR16.7 EPFR16.6 EPFR16.5 EPFR16.4 P16[7:0] is input/output for Programmable Pulse Generator outputs PPG[15:8], external ADC trigger ATGX, Pulse Frequency Modulator output PFM, and Sound Generator outputs SGO/SGA. Otherwise, the port can be used as general purpose port.

  • Page 492

    Chapter 30 I/O Ports 3.Port Register Settings ■ P17: The functions of Port 17 are controlled by PFR17 Addr PFR17 0D91h PFR17.7 EPFR17 0DD1h P17[7:0] is input/output for Programmable Pulse Generator outputs PPG[15:8]. Otherwise, the port can be used as general purpose port. PFR17.7 0 - Port is in general purpose port mode.

  • Page 493

    ■ P18: The functions of Port 18 are controlled by PFR18 and EPFR18 Addr PFR18 0D92h EPFR18 0DD2h P18[7:0] is input/output for LIN-UART serial communication signals SCK, SOT, SIN of channels 6 and 7, Up-/ Down-Counter inputs ZIN, BIN, AIN of channels 2 and 3, and Free Run Timer FRT inputs CK of channels 6 and 7.

  • Page 494

    Chapter 30 I/O Ports 3.Port Register Settings ■ P19: The functions of Port 19 are controlled by PFR19 and EPFR19 Addr PFR19 0D93h EPFR19 0DD3h P19[7:0] is input/output for LIN-UART serial communication signals SCK, SOT, SIN of channels 4 and 5, and Free Run Timer FRT inputs CK of channels 4 and 5.

  • Page 495

    ■ P20: The functions of Port 20 are controlled by PFR20 and EPFR20 Addr PFR20 0D94h EPFR20 0DD4h P20[7:0] is input/output for LIN-UART serial communication signals SCK, SOT, SIN of channels 2 and 3, Up-/ Down-Counter inputs ZIN, BIN, AIN of channels 0 and 1, and Free Run Timer FRT inputs CK of channels 2 and 3.

  • Page 496

    Chapter 30 I/O Ports 3.Port Register Settings ■ P21: The functions of Port 21 are controlled by PFR21 and EPFR21 Addr PFR21 0D95h EPFR21 0DD5h P21[7:0] is input/output for LIN-UART serial communication signals SCK, SOT, SIN of channels 0 and 1, and Free Run Timer FRT inputs CK of channels 0 and 1.

  • Page 497

    ■ P22: The functions of Port 22 are controlled by PFR22 Addr PFR22 0D96h PFR22.7 EPFR22 0DD6h P22[7:0] is input/output for I2C serial communication signals SCL, SDA of channels 0 and 1, CAN serial communication signals TX, RX of channels 4 and 5, and External Interrupt Triggers INT[15:12]. Otherwise, the port can be used as general purpose port.

  • Page 498

    Chapter 30 I/O Ports 3.Port Register Settings Resource function is RX4 input, and INT12 input Remark: This pin supports external interrupt wake up from STOP-HIZ mode. Because of this the internal input line is not forced to low in STOP-HIZ mode if the PFR is set to ‘1’ and interrupt is enabled with ENIR1.EN12 set to ‘1’.

  • Page 499

    ■ P23: The functions of Port 23 are controlled by PFR23 Addr PFR23 0D97h PFR23.7 EPFR23 0DD7h P23[7:0] is input/output for CAN serial communication signals TX, RX of channels 0 to 3, and External Interrupt Triggers INT[11:8]. Otherwise, the port can be used as general purpose port. PFR23.7 0 - Port is in general purpose port mode.

  • Page 500

    Chapter 30 I/O Ports 3.Port Register Settings Resource function is RX0 input, and INT8 input Remark: This pin supports external interrupt wake up from STOP-HIZ mode. Because of this the internal input line is not forced to low in STOP-HIZ mode if the PFR is set to ‘1’ and interrupt is enabled with ENIR1.EN8 set to ‘1’.

  • Page 501

    ■ P24: The functions of Port 24 are controlled by PFR24 Addr PFR24 0D98h PFR24.7 EPFR24 0DD8h P24[7:0] is input/output for I2C serial communication signals SCL, SDA of channels 2 and 3, and External Interrupt Triggers INT[7:0]. Otherwise, the port can be used as general purpose port. PFR24.7 0 - Port is in general purpose port mode.

  • Page 502

    Chapter 30 I/O Ports 3.Port Register Settings Remark: This pin supports external interrupt wake up from STOP-HIZ mode. Because of this the internal input line is not forced to low in STOP-HIZ mode if the PFR is set to ‘1’ and interrupt is enabled with ENIR0.EN2 set to ‘1’.

  • Page 503

    ■ P25: The functions of Port 25 are controlled by PFR25 Addr PFR25 0D99h PFR25.7 EPFR25 0DD9h P25[7:0] is input/output for Stepper Motor PWM output signals and Comparator Inputs SMC2M, SMC2P, SMC1M, SMC1P of channels 4 and 5. Otherwise, the port can be used as general purpose port. PFR25.7 0 - Port is in general purpose port mode.

  • Page 504

    Chapter 30 I/O Ports 3.Port Register Settings ■ P26: The functions of Port 26 are controlled by PFR26 and EPFR26 Addr PFR26 0D9Ah PFR26.7 EPFR26 0DDAh EPFR26.7 EPFR26.6 EPFR26.5 EPFR26.4 EPFR26.3 EPFR26.2 EPFR26.1 EPFR26.0 P26[7:0] is input/output for Stepper Motor PWM output signals and Comparator Inputs SMC2M, SMC2P, SMC1M, SMC1P of channels 2 and 3, and A/D converter analogue inputs AN[31:24].

  • Page 505

    ■ P27: The functions of Port 27 are controlled by PFR27 and EPFR27 Addr PFR27 0D9Bh PFR27.7 EPFR27 0DDBh EPFR27.7 EPFR27.6 EPFR27.5 EPFR27.4 EPFR27.3 EPFR27.2 EPFR27.1 EPFR27.0 P27[7:0] is input/output for Stepper Motor PWM output signals and Comparator Inputs SMC2M, SMC2P, SMC1M, SMC1P of channels 0 and 1, and A/D converter analogue inputs AN[23:16].

  • Page 506

    Chapter 30 I/O Ports 3.Port Register Settings ■ P28: The functions of Port 28 are controlled by PFR28 Addr PFR28 0D9Ch PFR28.7 EPFR28 0DDCh P28[7:0] is input/output for A/D converter analogue inputs AN[15:8], and D/A converter analogue outputs DA[1:0]. Otherwise, the port can be used as general purpose port. PFR28.7 0 - Port is in general purpose port mode.