2021-09-08 06:05 PM
Hi,
I have a single PDM mic connected to DFSDM2, channel 0 on the NUCLEO. I have configured the peripheral for 16kHz and I have verified that the clock generated is 1MhZ and the mic sends PDM data when clocked.
I have checked the signals going to the uC and they are OK but the interrupt isnt being generated on pin PD2. I'm not sure what the issue is.
Conversion is started with:
HAL_DFSDM_FilterRegularStart_DMA
Is the configuration correct?
What should I look at?
2021-09-09 02:53 AM
Hi,
It looks like a bug it CubeMX because it calls MX_DMA_Init(); after the MX_DFSDM_Init();
How can you specify this order?
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* Configure the peripherals common clocks */
PeriphCommonClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_ADC1_Init();
MX_DFSDM2_Init();
MX_I2S2_Init();
MX_USB_OTG_FS_PCD_Init();
MX_SAI1_Init();
MX_UART4_Init();
MX_TIM6_Init();
MX_DMA_Init();
MX_USART2_UART_Init();