AnsweredAssumed Answered

DAC Baremetal on FRDM-K64

Question asked by shaul dorf on Jan 15, 2017
Latest reply on Jan 15, 2017 by shaul dorf

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.

 

 

Outcomes