Vlad Simionescu

STM32-MAT - Hall Sensor Input limitation

Discussion created by Vlad Simionescu on Sep 13, 2017

Hello,

 

I am trying to use the STM32-MAT but after getting it to run on one of the examples I observed what I think to be a limitation:

   if in CubeMX you configure a timer, i.e. TIM3 as Hall sensor input, then the pins connected to the hall inputs are in the AF mode. This means that from the Simulink you won't be able to read them because it is expecting to find them marked in the .ioc file as Input not AF. 

 

Is there any nice solution; so far the only dirty hack that I found is to manually edit the .ioc and do something like: 

PE3.GPIOParameters=GPIO_Label
PE3.GPIO_Label=HALL_2
PE3.Locked=true
PE3.Signal=GPIO_Input
PE3.Signal=S_TIM3_CH2

 

I didn't generate the code yet because I get some other errors but this hack is not very good anyway because each time I load the .ioc in the cube it removes one of the 2 signal properties from the pins.

 

Thank you,

Vlad

Outcomes