Question: Fill in the missing values to 1nake this program output the array at 100p|sec intervals //DtoASine.c /*This program outpus samples of an integer array at

 Fill in the missing values to 1nake this program output the

Fill in the missing values to 1nake this program output the array at 100p|sec intervals //DtoASine.c /*This program outpus samples of an integer array at 100 micro-second intervals #include "stm32f446 . h" int main() int 1 int sine[] RCC. AHB1ENR RCC-APB 1 ENR RCC-APB1ENR 1 1= 1= //Bit e is GPIOA clock enable bit //Bit 29 is DAC clock enable bit //Enable peripheral timer for timer 3 (bit 1) GPIOA MODER GP10A PUPDR &= DAC-CR 1 //PA4-PAS are analog //Pins PA4 PAS are no pull up and no pull down //Bits 3, 4, 5 111 for software trigger ch1 //Bit 2 1 for ch 1 trigger enabled //Bit 1 for ch 1 output buffer enabled DAC-CR 1 TIM3. CRI ! TIM3 PSC TIM3_ CR1 while(1) //Bit for ch 1 enabled //Timer 3 bits //Auto reload is buffered //one pulse mode is on. ADD THIS LINE //Don't use prescaling //16 MHz/160 1@000 Hz //Enable Timer 3 (DAC-DHR12R1 = 1:(1 + 1) % 10; DAC-SWTRIGR 1 while( TIM3. CRI ! //start the D/A conversion ) //Wait here until timer runs out //Restart timer Fill in the missing values to 1nake this program output the array at 100p|sec intervals //DtoASine.c /*This program outpus samples of an integer array at 100 micro-second intervals #include "stm32f446 . h" int main() int 1 int sine[] RCC. AHB1ENR RCC-APB 1 ENR RCC-APB1ENR 1 1= 1= //Bit e is GPIOA clock enable bit //Bit 29 is DAC clock enable bit //Enable peripheral timer for timer 3 (bit 1) GPIOA MODER GP10A PUPDR &= DAC-CR 1 //PA4-PAS are analog //Pins PA4 PAS are no pull up and no pull down //Bits 3, 4, 5 111 for software trigger ch1 //Bit 2 1 for ch 1 trigger enabled //Bit 1 for ch 1 output buffer enabled DAC-CR 1 TIM3. CRI ! TIM3 PSC TIM3_ CR1 while(1) //Bit for ch 1 enabled //Timer 3 bits //Auto reload is buffered //one pulse mode is on. ADD THIS LINE //Don't use prescaling //16 MHz/160 1@000 Hz //Enable Timer 3 (DAC-DHR12R1 = 1:(1 + 1) % 10; DAC-SWTRIGR 1 while( TIM3. CRI ! //start the D/A conversion ) //Wait here until timer runs out //Restart timer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!