fcan_s32k_receive - Unrecognized function or variable 'mbd_s32k_fcan_receive_init'

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

fcan_s32k_receive - Unrecognized function or variable 'mbd_s32k_fcan_receive_init'

775 Views
johngreenjets
Contributor III

I have been successfully using the MBDB S32K1 4.3.0 add on, but it has now broke since I installed dSpace Configuration Desk (Release 2022-B) which integrates with MATLAB SImulink.

For some reason, the FCAN Receive blocks now show question marks...

johngreenjets_0-1693911181371.png

 

johngreenjets_1-1693911206565.png

If I try to do an update (CTRL-D) or a build, I now get the following error...

johngreenjets_2-1693911396810.png

If I view the Mask Base of the block, the initialization tab seems to call the function 'mbd_s32k_fcan_receive_init'...

johngreenjets_3-1693911466455.png

I have tried reinstalling MBDB S32K1 4.3.0 and also tried running mbd_s32k_path.m, but the problem still occurs.

If I run "which mbd_s32k_fcan_receive_init" from the MATLAB prompt it says it cannot be found.

Note: I am using the patch from this post which fixed a bug with the CAN extended ID...

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Extended-CAN-ID-not-working-UCANS32K146...M8460

The blocks appear to display correctly in the library browser...

johngreenjets_4-1693911940951.png

However, if I add the block from the library browser to the simulink model, it displays the question marks and I get the same error.

How can I fix this ?

 

 

0 Kudos
3 Replies

741 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @johngreenjets 

Could you please let us know if the patch applied from this thread solved the reported issue as well? 

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Extended-CAN-ID-not-working-UCANS32K146...

Regards,

Marius

0 Kudos

738 Views
johngreenjets
Contributor III

Hi Marius

The patch fixed the extended CAN ID bug (I marked the post as solved).

But there is this new issue with the FCAN receive blocks i.e. Unrecognized function or variable 'mbd_s32k_fcan_receive_init'.

I'm not sure yet whether the patch has cause this new issue, I'm going to play around with uninstalling and installing etc

I did notice that before the patch, the mask initialization calls the function 'mbd_s32k_fcan_receive'...

johngreenjets_0-1694418803084.png

Whereas after the patch, the mask initialization calls the function 'mbd_s32k_fcan_receive_init'...

johngreenjets_1-1694418898075.png

This seems to work after the patch has been installed, but  it appears that when MATLAB is restarted the blocks then show the 3 question marks and generates the error 'Unrecognized function or variable 'mbd_s32k_fcan_receive_init'

So that might be a clue ?

 

0 Kudos

677 Views
johngreenjets
Contributor III

I managed to find a work around.

In the following folder...

C:\MATLABAddOns\Toolboxes\NXP_MBDToolbox_S32K1xx\mbdtbx_s32k\mscripts\fcan

I made a copy of 'mbd_s32k_fcan_receive.p' and renamed the copy to 'mbd_s32k_fcan_receive_init.p' as shown in the screenshot below...

johngreenjets_0-1694512948730.png

 

This appears to have fixed the problem, including the the bug with the extended CAN ID.

The patch to fix the extended CAN ID seems to change the function call in the the mask base of the FCAN receive block. 

Before the patch, the initialization tab calls the function 'mbd_s32k_fcan_receive'.

After the patch, the initialization tab calls the function 'mbd_s32k_fcan_receive_init' (when MATLAB has been restarted after installing the patch).

What I dont know is if there is a difference between the two functions ''mbd_s32k_fcan_receive' and 'mbd_s32k_fcan_receive_init' ?

Because the 'mbd_s32k_fcan_receive_init' file is not included in the patch.

 

 

0 Kudos