READ REGISTER MBD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

READ REGISTER MBD

1,497 Views
ykarata1
Contributor IV

Dear All,

 

We are trying to use Read Register block in MBD for S32K144. But as we try to use, we get error that is depicted below.

 

Do you have any idea about the problem and possible solution way ?

 

Thanks.

 

 

 

figure1.pngfigure2.png

0 Kudos
7 Replies

1,464 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ykarata1 ,

I tried adding both Read and Write blocks in a moel and it seems to work.

mariuslucianand_0-1609746811367.png

Now, the Toolbox displays those values based on some .mat files for each peripherals. It looks to me, that on your model, the block can not find all the .mat files required.

Can you access the following path to see if you have a bunch of mat files there?

mariuslucianand_1-1609747350141.png

Regards,

Marius

1,432 Views
ykarata1
Contributor IV

Dear @mariuslucianand ,

I want to thank you for your detailed replies for any kind of MBD issue. 

I used your advice to check whether related file exist in the directory. You can see the related figure at below. I can not any folder as S32K144. As far as I understand we need a file which name is ".mat" inside S32K144 in the related directory.

 

1. I could not see any S32K144 folder at the "C:\Users\ykarata1\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\devices\S32K146\signal_description" directory. 

 

2. Are we looking a file that has no name with .mat ? Is any file can be nameless like that ? 

 

3. If I do not have related folder and file, how can I add them ?

 

Thanks. Regards.

 

NXP.PNG

 

 

0 Kudos

1,421 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ykarata1 ,

I am glad that you find my contribution to this community useful! I really appreciate that!

Going to the mbdtbx_s32k/devices, you should be able to find the following folders:

image.png

Every one of these folders contains information related to the dropdown options showed inside the read/write blocks that you mentioned before. 

If I open the S32K144, you can see that there are many files that have the extension .mat.

 

image.png

To answer your questions:

1. I am sorry, now I've realized what is happening there: Instead of looking in the devices\S32K144, the toolbox is looking inside the devices\S32K146\signal_description\S32K144 which obviously this folder is empty. Unfortunately, I can't figure out why is this happening...

2. No, there should be no file like that. Most likely the peripheral input in the Read_Register is empty and for that reason, it looks after a blank .mat file.

3. That's the tricky one :D. Can you please open the rw_registers_s32k14x.mdl example in our toolbox to see if you still encountering this issue? Is this only happens on your computer?

Waiting for your reply,

Marius

 

 

0 Kudos

1,377 Views
ykarata1
Contributor IV

Dear @mariuslucianand ,

 

I am sorry for the latency. I just tried your suggestion and got result that I showed below. Actually it succesfully build code and send it to S32K144. I see a GREEN LED blink on the board. But when we click to the register blocks it gives that same error which we had seen in our own model.

 

I also checked whether that error belongs to only me becauuse of the misconfiguration of sth on may laptop. We tried same issue on @oeren5 laptop and same issue exists in not only my PC but also Ozan's one.

 

We are trying to use registers due to the problem that I shared that below. On that community reply, @PetrS advised us to check related registers.

https://community.nxp.com/t5/S32K/CAN-Messages-is-not-Transmitted-Unless-HW-Reset-MBD/m-p/1180152

How can we proceed? How can we solve that issue?

 

Thanks.

 

 

ykarata1_0-1611649842871.png

ykarata1_1-1611650021399.png

 

0 Kudos

1,049 Views
TOM_ScuderiaMensaFSG
Contributor I

TOM_ScuderiaMensaFSG_1-1661794969074.png

working with s32144 and having the same problem.
@ykarata1 @mariuslucianand  have you found a solution to the problem?

 

0 Kudos

1,045 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @TOM_ScuderiaMensaFSG,

A solution has been posted on this page. https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Read-register-block-error-S32k142/m-p/1...

Please apply the mscripts.zip patch and let me know if this worked on your side. We plan to release an update for the S32K1xx soon in which this problem will be solved.

Hope this helps,

Marius

 

1,043 Views
TOM_ScuderiaMensaFSG
Contributor I

Thank you for the quick response
I did a copy of the existing folder into the folder that was missing (i created the missing S32K144 folder)
which seemed to also solve the problem.

Best Regards

0 Kudos