2018-01-30 12:47 AM
Hi,
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:
MATLAB: R2017a
STM32 MAT/TARGET Library: 4.4.2
Best Regard,
qxj
#stm32-mat/target-matlab #simulinkSolved! Go to Solution.
2018-01-31 09:27 PM
Hi, qxj
The bug is fixed.
Please replace the following files with the attached files.
C:\MATLAB\STM32-MAT\STM32\blks\REG_Lib.slx
C:\MATLAB\STM32-MAT\STM32\blks\mdl\STM32_REG_Access.mdl
Best Regard,
________________ Attachments : replaceFile.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy51&d=%2Fa%2F0X0000000b3h%2F1iHt2.bHldbM4hSOZl2jiPBlH038dMlV6Q1FbLHs89Q&asPdf=false2018-01-30 08:29 PM
Hello, qxj.
Could you please give me more information?
for example:
- which STM32 you use?
- If you provide a little test case if possible or at least an ioc file.
Thanks.
Panuwat
2018-01-31 12:59 AM
Hello Aimagin,
my board is STM32F4 Discovery Board, but Idon't think this bug is relatedwith the board.
I attached my project. You can finda simulink model (version: r2017a)and an ioc file in the zip archiv.
As you can see, I want to use this block to read the value stored in SPI->DR. But when you re-open the model, it comes back toNVIC.
Thank you for your help!
Best Regards,
qxj
________________ Attachments : project.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy4d&d=%2Fa%2F0X0000000b3l%2FFVqXL7tYmg.c18YJ05m8Iovb0V.OTXHI.8Uon0JFxm0&asPdf=false2018-01-31 03:48 AM
You're welcome and thank you for attached file.
I found the same problem with you. So, I will try to solve the problem.
Best Regards.
2018-01-31 08:14 AM
Hi Panuwat,
Thank you. I'm looking forward to the next release.
Best Regards.
2018-01-31 09:27 PM
Hi, qxj
The bug is fixed.
Please replace the following files with the attached files.
C:\MATLAB\STM32-MAT\STM32\blks\REG_Lib.slx
C:\MATLAB\STM32-MAT\STM32\blks\mdl\STM32_REG_Access.mdl
Best Regard,
________________ Attachments : replaceFile.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy51&d=%2Fa%2F0X0000000b3h%2F1iHt2.bHldbM4hSOZl2jiPBlH038dMlV6Q1FbLHs89Q&asPdf=false2018-02-01 01:32 AM
Hello,
It works. Thank you for your help!
Best Regard,
qxj
2018-02-01 01:44 AM
You're welcome.
2020-09-30 10:39 PM
The same bug still continues in R2020a/R2020b version. Any solution?