[H8-ML(5729)] RE: [H8-ML(5714)] H8-2212 の歩調同期シリアル通信について
From: "Kobayashi.N" <kobayasi@xxxxxxxxxxxxxxxxxxxxxxx>
Date: 2005年10月26日(水)12時01分56秒
H8SのSCIを確認してみました
初期化の先頭でMSTPCRBを設定すれば、これまでと同様に
出力できました


--------------------------------------------------------------------------
; void inizSciRegs (void)
_inizSciRegs:
    ;(H8S)update module-stop-control-register to access SCI
	mov.b	#0b00011111,r0l		;** SCI0,1,2: enabled
		;  ||||_____(reserved)should be 1
		;  |||_SCI2
		;  ||_SCI1
		;  |_SCI0
	mov.b	r0l,@MSTPCRB:24

    ;inactive all channels
	mov.l	#chTbl,er1
	mov	#3,e0			;num. of SCI ch
	xor	r0l,r0l			;inactive (TE=0,RE=0)
0:	mov.l	@er1+,er2		;(er1=channel 0 base)
	mov.b	r0l,@(oSCR,er2)		;(TE=0,RE=0)
	mov.b	r0l,@(oSCMR,er2)	;smart card mode (no SmartCard)
	dec.w	#1,e0
	bne	0b
    ;interrupt priority level
	mov.l	#IPRB,er2
	mov.b	@er2,r0l
	and.b	#0b11110000,r0l
		;  ||||||||_(reserved)
		;  |||||||_SCI2 (0/1)=(high/low) priority group
		;  ||||||_SCI1 (0/1)=(high/low) priority group
		;  |||||_SCI0 (0/1)=(high/low) priority group
	mov.b	r0l,@er2
	rts


スレッド概略
[5714(R)](起点)
 └[表示中]


投稿順に移動
[←前の記事へ(P)]
[→次の記事へ(N)]


リスト表示へ
[このスレッド(T)]
[本記事の前後(L)]