I use the REG_Access block to read the value stored in the data register of the SPI1. So I change the "Peripheral" option from NVIC to SPI1.
But it always goes back to NVIC, once the the simulink model is closed and reopened again. If I don't notice this change and don't manually set it again, it will lead to errors while compiling the code in the IDE.
My software versions are as below:
STM32 MAT/TARGET Library: 4.4.2