Hello,
I have installed the MBD toolbox for S32K3XX 1.2.0 version and S32 Design Studio.
1) I know that, In MBDT for S32K3XX 1.2.0 does not include support for I2C. So, we (Our Team) planned to create a Custom Block for I2C Communication. So, is this possible to create a Custom Block for S32K344?
2) The default .mex contains MCAL components. But we only need the component in Drivers (like Adc_Sar_Ip, Bctu_Ip, Trgmux_Ip, etc.,). So, is it possible to use the .mex file with the drivers component instead of the default .mex?
Please Let me, if you need any other information.
Hi @Ajay_R
Thank you for using our MBDT S32K3 Toolbox.
To address the aforementioned questions:
1. As you said the I2C support is not yet included in our toolbox. For enabling I2C support, you will first need to add and configure the I2C component in the .mex file. Now that the configuration of I2C is completed, to call I2C driver API functions for implementing your application, you could start by using the Custom code block provided by Simulink. Please note that you will also need to include the header files for I2C to be able to use specific I2C functions. Also, you will need to call the initialization function for the added peripheral. A good example for your use is the s32k3xx_isr_custom_code_ebt, where the ICU component, which is not supported by our toolbox, is used with a similar approach. However, in the mentioned example, ICU is configured as an MCAL component.
2. As for the second question, do you want to replace all of the MCAL components with Drivers components, or just use I2C as a Driver component ?
The reason why this clarification is necessary, is because the MBDT for S32K3 blocks generate code on top of the MCAL functions.
Therefore, in case you would like to replace the MCAL components with the Drivers ones, the blocks from our toolbox will not work anymore. You would need to use custom code for calling functions specific to these Drivers configuration.
Hope this helps,
Victor
I would like to apologise for my delayed response to you & thanks for your reply.
For my project, I need to replace all of the MCAL components with Drivers components.
One more thing I need to know, whether MBDT Supports Autosar only? (Or) MBDT Supports both Autosar & Non-Autosar Models?. If MBDT Supports Non Autosar Models, Could you please tell me the steps to create that model.
Please Let me know, if you need any other information