cancel
Showing results for 
Search instead for 
Did you mean: 

ADC channels unavailable when using STM32 MAT / TARGET with Matlab R2018b and STM32CubeMX

TKal
Associate

Hi,

I've setup the pin configuration for my device using STM32CubeMX and setup the STM32 MAT / TARGET environment in Simulink along with the necessary add-ons e.g. embedded code generation and MatLab code generation.

Now when trying to build a simulation GPIO blocks work as expected although ADC blocks have no channels available.

Has anyone run into this issue before and have a possible solution? I've also tried Matlab 2021a with latest STM32CubeMX and run into the same issue.

0693W00000BcFaJQAV.png 

my configuration .ioc file is as follows:

File.Version=6
GPIO.groupedBy=
KeepUserPlacement=false
Mcu.Family=STM32L0
Mcu.IP0=ADC
Mcu.IP1=NVIC
Mcu.IP2=RCC
Mcu.IP3=SYS
Mcu.IPNb=4
Mcu.Name=STM32L083C(B-Z)Tx
Mcu.Package=LQFP48
Mcu.Pin0=PA0
Mcu.Pin1=PA1
Mcu.Pin2=PA2
Mcu.Pin3=PA3
Mcu.Pin4=PA4
Mcu.Pin5=VP_SYS_VS_Systick
Mcu.PinsNb=6
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32L083CZTx
MxCube.Version=5.6.0
MxDb.Version=DB.5.0.60
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true
PA0.Locked=true
PA0.Mode=IN0
PA0.Signal=ADC_IN0
PA1.Locked=true
PA1.Signal=GPIO_Input
PA2.Locked=true
PA2.Signal=GPIO_Input
PA3.Locked=true
PA3.Signal=GPIO_Output
PA4.Locked=true
PA4.Mode=IN4
PA4.Signal=ADC_IN4
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=false
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32L083CZTx
ProjectManager.FirmwarePackage=STM32Cube FW_L0 V1.11.3
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=0
ProjectManager.MainLocation=Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=stm32old.ioc
ProjectManager.ProjectName=stm32old
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=EWARM V8.32
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=
RCC.48CLKFreq_Value=24000000
RCC.AHBFreq_Value=2097000
RCC.APB1Freq_Value=2097000
RCC.APB1TimFreq_Value=2097000
RCC.APB2Freq_Value=2097000
RCC.APB2TimFreq_Value=2097000
RCC.FamilyName=M
RCC.HSE_VALUE=8000000
RCC.HSI16_VALUE=16000000
RCC.HSI48_VALUE=48000000
RCC.HSI_VALUE=16000000
RCC.I2C1Freq_Value=2097000
RCC.I2C3Freq_Value=2097000
RCC.IPParameters=48CLKFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FamilyName,HSE_VALUE,HSI16_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C3Freq_Value,LCDFreq_Value,LPTIMFreq_Value,LPUARTFreq_Value,LSE_VALUE,LSI_VALUE,MSI_VALUE,PLLCLKFreq_Value,PWRFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,TIMFreq_Value,USART1Freq_Value,USART2Freq_Value,VCOOutputFreq_Value,WatchDogFreq_Value
RCC.LCDFreq_Value=37000
RCC.LPTIMFreq_Value=2097000
RCC.LPUARTFreq_Value=2097000
RCC.LSE_VALUE=32768
RCC.LSI_VALUE=37000
RCC.MSI_VALUE=2097000
RCC.PLLCLKFreq_Value=24000000
RCC.PWRFreq_Value=2097000
RCC.RTCFreq_Value=37000
RCC.RTCHSEDivFreq_Value=4000000
RCC.SYSCLKFreq_VALUE=2097000
RCC.TIMFreq_Value=2097000
RCC.USART1Freq_Value=2097000
RCC.USART2Freq_Value=2097000
RCC.VCOOutputFreq_Value=48000000
RCC.WatchDogFreq_Value=37000
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
board=custom

0 REPLIES 0