Question
STM32-MAT Matlab target. Problem with GPIO
Posted on November 05, 2015 at 08:17
I am now trying to make stm32 matlab target work with stm32 discovery f3 board.
The problem i have is when i am using GPIO_write block in simulink it updates GPIO only once on reset. C code line HAL_GPIO_WritePin(GPIOE, GPIO_PIN_13, SimpleGPIO_B.DataTypeConversion); is present only in initialize procedure and does not appear in step(). If i copy this line to step() everything works fine. Input signal for GPIO_Write block is not constant, i can see it changes if i use debugger. Also in simulink itself GPIO_Write block is marked as constant. It looks like code generator considers this block constant and does not update in inside step() despite it has variable input. Is there a proper way to fix this without changing generated code each time? #st32-mat-matlab-simulink-gpio