2017-06-21 12:25 AM
Hello,
I am using stm32f051 and as far as I know there is no injected scan mode but when the STM32MATTarget generates the c-code there is this line :
ADC_DataLink.InjectedCurrentRank = ADC_INJECTED_RANK_1;
which when I try to debug it I get :
Error[Pe020]: identifier 'ADC_INJECTED_RANK_1' is undefined C:\MATLAB\STM32-MAT\STM32\STM32demos\CodeGeneration\su3\untitled\Src\ds.c 112
Additionally, whenever I enable DMA for the ADC, the below line is generated but I think since the array size is zero
HAL_ADC_Start_DMA(&hadc0, (uint32_t*)&ADC_RegularConvertedValue[0], 4);
I get this error
Error[Pe020]: identifier 'ADC_RegularConvertedValue' is undefined C:\MATLAB\STM32-MAT\STM32\STM32demos\CodeGeneration\su3\untitled\Src\ds.c 133
I found a similar question in the forum but the work around does n t work ( I set the dma buffer size to 2,3,4,.. ) but it does not solve the problem.
I wonder if I should switch to an older version of stm32mattarget or there is a fix for it ?!
#dma #stm32mattarget #adc #c-code2017-06-21 08:10 AM
Hi Reza,
this is because L0/F0 families are not supported.
Generated code doesn't make any sense.
Best regards
Pascal
2017-06-21 10:50 AM
REYNAUD.PASCAL
Hi reynaud,
So can you please tell me which MCU families are supported by the stm32mattarget and among them which is known to be the most compatible and with the least possible issues?
Regards
Reza
2017-06-22 04:08 AM
Hi Reza,
STM32-MAT/TARGET is generic and should be available for all STM32 .. except 0 families (F0/L0).
Best regards
Pascal REYNAUD