DAC Baremetal on FRDM-K64

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DAC Baremetal on FRDM-K64

Jump to solution
782 Views
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

 

 

Labels (1)
0 Kudos
1 Solution
481 Views
shauldorf
Contributor V

I solved this problem by using SCGC2 register.

pastedImage_1.png

View solution in original post

0 Kudos
1 Reply
482 Views
shauldorf
Contributor V

I solved this problem by using SCGC2 register.

pastedImage_1.png

0 Kudos