cancel
Showing results for 
Search instead for 
Did you mean: 

Bug found while using the REG_Access block from the MAT/TARGET Library

Sam Q.
Associate III
Posted on January 30, 2018 at 09:47

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 #simulink
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on February 01, 2018 at 06:27

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=false

View solution in original post

8 REPLIES 8
Posted on January 31, 2018 at 05:29

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

Posted on January 31, 2018 at 08:59

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=false
Posted on January 31, 2018 at 11:48

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.

Posted on January 31, 2018 at 16:14

Hi Panuwat,

Thank you. I'm looking forward to the next release.

Best Regards.

Posted on February 01, 2018 at 06:27

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=false
Posted on February 01, 2018 at 09:32

Hello,

It works. Thank you for your help!

Best Regard,

qxj

Posted on February 01, 2018 at 09:44

You're welcome.

ÇSütu.1
Associate II

The same bug still continues in R2020a/R2020b version. Any solution?