Associate
July 24, 2022
Solved
Issues with code generation for DFSDM peripheral - a) a variable is declared twice b) an initialization sequence is executed in wrong order
- July 24, 2022
- 1 reply
- 1178 views
The attached simple project contains an ioc-files where the DFSDM peripheral is configured: channel 0 and channel 1; filter 0 for channel 0 and filter 1 for channel 1. In addition i have configured TIM6; but that's not relevant for the issue. This all is based on a real project; but i have narrowed it down to a minimum because only the code generation process is relevant.
The issues are in generated file dfsdm.c in sub folder Src. After generation, the file contains two errors:
- The code between lines 43 and 67 MUST be executed after line 102. In other words: first the channel must be configured and THEN the filter. This is an old error ... maybe two years old or even more. I don't recall where i have read that the present order is wrong. But in order to make my application work, i need to swap the generated order.
- The statment "static uint32_t DFSDM1_Init = 0;" occurs twice: in line 119 and in line 175 causing build-error. This is an error which must have been introduced during the last two years.
Please fix.
Regards ... Matthias.
