DAC Baremetal on FRDM-K64

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DAC Baremetal on FRDM-K64

ソリューションへジャンプ
1,331件の閲覧回数
shauldorf
Contributor V

I have very simple working DAC baremetal demo that is working on FRDM-KL25 board.

The tools are KDS v3.2 and KSDK v2

I'm trying to use it also on FRDM-K64.

The DAC init function is

void DAC0_init(void) {

       SIM->SCGC6 |= 0x80000000;   /* clock to DAC module */

       DAC0->C1 = 0;               /* disable the use of buffer */

       DAC0->C0 = 0x80 | 0x20;     /* enable DAC and use software trigger */

}

Executing "DAC0->C0 = 0x80 | 0x20;" causes the program jump to HardFault handler.

174434_174434.pngpastedImage_1.png

 

 

ラベル(1)
0 件の賞賛
返信
1 解決策
1,030件の閲覧回数
shauldorf
Contributor V

I solved this problem by using SCGC2 register.

pastedImage_1.png

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,031件の閲覧回数
shauldorf
Contributor V

I solved this problem by using SCGC2 register.

pastedImage_1.png

0 件の賞賛
返信