cancel
Showing results for 
Search instead for 
Did you mean: 

RCC problem for dma + dac and tim3 imputCapture

akesk
Associate II

With nucleo-f429ZI board, I want to measure the signal fminance in imputCapture (tim3_ch1) with dma + dac to generate a known frequency signal. but :

When doing rcc settings like this, imputCapture calculates the correct frequency. On the dma + dac side the signal is distorted.

         RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
	  RCC_OscInitStruct.HSEState = 16;                             
	  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
	  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
	  RCC_OscInitStruct.PLL.PLLM = 16;
	  RCC_OscInitStruct.PLL.PLLN = 144;
	  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
	  RCC_OscInitStruct.PLL.PLLQ = 7;
	  HAL_RCC_OscConfig(&RCC_OscInitStruct);

When I restore the settings like this, the dma + dac produces a flat signal. but imputCapture incorrectly calculates the frequency.

         RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
	 RCC_OscInitStruct.HSICalibrationValue = 16;
	  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
	  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
	  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
	  RCC_OscInitStruct.PLL.PLLM = 16;
	  RCC_OscInitStruct.PLL.PLLN = 144;
	  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
	  RCC_OscInitStruct.PLL.PLLQ = 7;
	  HAL_RCC_OscConfig(&RCC_OscInitStruct);

project files: https://drive.google.com/file/d/1Smj3ENY84PsjHePukjg5GNNs3mQ9DQZ0/view?usp=sharing

0 REPLIES 0