<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use custom code in MBDT 1.4.0 in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966108#M9591</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423" target="_blank"&gt;@dragostoma&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Do you have any suggestions for solutions regarding&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ADC configuration&lt;/STRONG&gt;&lt;/FONT&gt;?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 06:16:59 GMT</pubDate>
    <dc:creator>SuperBeginner</dc:creator>
    <dc:date>2024-10-03T06:16:59Z</dc:date>
    <item>
      <title>How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1962456#M9563</link>
      <description>&lt;P&gt;Dear NXP,&lt;/P&gt;&lt;P&gt;I'm trying out some basic software for an &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ADC driver&lt;/STRONG&gt;&lt;/FONT&gt; to call the functionality of the &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;S32K312&lt;/STRONG&gt;&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;I refer to the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-Battery-Management/ta-p/1119004" target="_blank"&gt;https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-Battery-Management/ta-p/1119004&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-with-Function-to-call-low-level-driver/m-p/1371250" target="_blank"&gt;https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-with-Function-to-call-low-level-driver/m-p/1371250?attachment-id=125490&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, it didn't go as smoothly as expected.&lt;/P&gt;&lt;P&gt;I don't know how to &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;create a custom function from the driver.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I think I need some help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you provide examples to help me, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 07:56:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1962456#M9563</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-09-26T07:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1962628#M9565</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239656"&gt;@SuperBeginner&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Did you check the articles and examples I mentioned in the previous &lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/UART-DMA-amp-SPI-DMA/m-p/1951820/highlight/true#M9468" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;thread&lt;/STRONG&gt;&lt;/A&gt;? Because in the post I'm talking about there are specified Simulink models that use custom code and that you can use as a reference in your application? As well as the threads where the use of custom code is explained step by step.&lt;/P&gt;
&lt;P&gt;What problems did you encounter when trying to use the custom code?&lt;/P&gt;
&lt;P&gt;Let us know if you managed to use custom code in your application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Dragos&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 10:56:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1962628#M9565</guid>
      <dc:creator>dragostoma</dc:creator>
      <dc:date>2024-09-26T10:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1964199#M9579</link>
      <description>&lt;P&gt;Dear&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423" target="_blank" rel="noopener"&gt;@dragostoma&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried following the tutorial you provided to configure the custom code.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/SENT-Protocol-Support-in-S32K3-MBDT/m-p/1783542#M8737" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/SENT-Protocol-Support-in-S32K3-MBDT/m-p...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It works fine when I use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;model headers and system initialization&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for DIO configuration interrupts.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SuperBeginner_0-1727675281378.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/301890i2070F340EDA2EFBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SuperBeginner_0-1727675281378.png" alt="SuperBeginner_0-1727675281378.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;But unfortunately, it is not convenient for people to use BLOCK to view.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I can successfully build the program to the S32K312EVB-Q172, but my &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;interrupt function is not working.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADC_Config.PNG" style="width: 457px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/301892iD218EBF5ADF2E312/image-dimensions/457x233?v=v2" width="457" height="233" role="button" title="ADC_Config.PNG" alt="ADC_Config.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADC_Config_function.PNG" style="width: 450px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/301893iF5520B8088A8392E/image-dimensions/450x321?v=v2" width="450" height="321" role="button" title="ADC_Config_function.PNG" alt="ADC_Config_function.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think this must be a configuration error caused by my unfamiliarity.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I upload my ADC config file "&lt;FONT color="#FF0000"&gt;1_SimulinkCoder_ADC&lt;/FONT&gt;", can you help me to solve this problem?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW,&amp;nbsp;I can use the &lt;FONT color="#008000"&gt;&lt;STRONG&gt;coder.ceval&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG&gt;with Matlab function&lt;/STRONG&gt;&lt;/FONT&gt; to call my own c code externally.&lt;/P&gt;&lt;P&gt;However, if I want to call the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;driver&lt;/FONT&gt; &lt;/STRONG&gt;code generated by the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;S32CT&lt;/FONT&gt;&lt;/STRONG&gt;, do I need to include all &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ADC&lt;/STRONG&gt;&lt;/FONT&gt; related the&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt; .c and .h file&lt;/STRONG&gt;&lt;/FONT&gt; in Matlab function?&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;For example, if I want to use the adc function, do I still need to call the ADC function in the matlab function like this?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if (coder.target('RTW'))
    coder.cinclude('Adc.h');
    coder.updateBuildInfo('addSourceFiles', 'Adc.c');
    %% Call ADC function
    coder.ceval(Adc_SetupResultBuffer(Adc1Group_0, Adc1Group0_ResultBuffer));
end&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Or do I just need to call the adc driver function like this&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if (coder.target('RTW'))
    %% Call ADC function
    coder.ceval(Adc_SetupResultBuffer(Adc1Group_0, Adc1Group0_ResultBuffer));
end&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition, I also tried to use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#993300"&gt;C caller&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;FONT color="#993300"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;S-Function&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for configuration on Simulink, but neither of them could realize the ADC configuration.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Can I use them for development?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I saw these two articles mentioned methods, but I'm not sure if they can be used to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;call the ADC Driver.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/C-code-integration/td-p/1640618" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/C-code-integration/td-p/1640618&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Driver-integration-using-C-Caller-or-C-Function-in-i-MX-RT-MBDT/m-p/1355746/highlight/true" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Driver-integration-using-C-Caller-or-C-...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 06:16:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1964199#M9579</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-09-30T06:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1965023#M9585</link>
      <description>BTW, My goal is to change the ADC value by changing the variable resistor (PTA11) on the S32K312EVB-Q172.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 01 Oct 2024 08:07:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1965023#M9585</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-01T08:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966108#M9591</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423" target="_blank"&gt;@dragostoma&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Do you have any suggestions for solutions regarding&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ADC configuration&lt;/STRONG&gt;&lt;/FONT&gt;?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 06:16:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966108#M9591</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-03T06:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966235#M9594</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239656"&gt;@SuperBeginner&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;First of all, why do you want to use custom code to use the ADC functionality, because these functions are already implemented in the &lt;STRONG&gt;ADC block&lt;/STRONG&gt;. Thus you can already use the ADC models that are already in the toolbox, the models that have the prefix &lt;STRONG&gt;s32k3xx&lt;/STRONG&gt; are generally valid for several hardware parts, including S32K312.&lt;/P&gt;
&lt;P&gt;So if, for example, in the &lt;STRONG&gt;s32k3xx_adc_single_read_s32ct&lt;/STRONG&gt; model you set the hardware part &lt;STRONG&gt;S32K312-Q172&lt;/STRONG&gt;, you can use the functionality mentioned in your application, without having to use custom code. The use of custom code is recommended when you want to use drivers that are not implemented in the Simulink library blocks.&lt;/P&gt;
&lt;P&gt;In this way, you reduce the potential errors that may arise from improper use of custom code&amp;nbsp;and your application may not meet your expectations.&lt;/P&gt;
&lt;P&gt;I recommend that you initially use the already existing models, together with going through the help of the models and to learn more about the functionalities you want to use in the Reference Manual.&lt;/P&gt;
&lt;P&gt;Let us know how it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Dragos&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 08:19:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966235#M9594</guid>
      <dc:creator>dragostoma</dc:creator>
      <dc:date>2024-10-03T08:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966658#M9604</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423"&gt;@dragostoma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;When I use the Example project - &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s32k3xx_adc_single_read_s32ct&lt;/STRONG&gt;&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;it works fine&lt;/STRONG&gt;. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The ADC value can change with the resistor on my EVB. I can also see value changes in FreeMaster.&lt;/P&gt;&lt;P&gt;As for the reason why I will use custom code to develop the ADC function, it is because I think it is a relatively uncomplicated function on EVB.&lt;/P&gt;&lt;P&gt;This may allow me to become familiar with how to use Custom Code to call programs from S32CT.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Because I need to implement many functions that are currently not supported by MBDT, such as DMA, WDG, RTE, SENT, RTOS, etc., and even I2C (MBDT 1.4.0).&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;As for why I didn’t choose &lt;STRONG&gt;DIO&lt;/STRONG&gt; for learning, it’s because I can easily use Model Header and System Initialzation to achieve the functions I need. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I think this is because it is &lt;STRONG&gt;too simple&lt;/STRONG&gt;, so &lt;STRONG&gt;I tested it with ADC.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I checked some articles: such as the implementation of &lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-implement-watchdog-for-S32K344-in-Simulink/m-p/1942869" target="_self"&gt;WDG&lt;/A&gt; and &lt;A href="https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-Can-I-use-RTOS-in-MBD-toolbox-for-spc5744/m-p/761755/highlight/true" target="_self"&gt;RTOS&lt;/A&gt; on MBDT.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;At present, it is recommended to use &lt;STRONG&gt;Model Header&lt;/STRONG&gt; and &lt;STRONG&gt;System initialization&lt;/STRONG&gt; to implement it. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;There is no example project provided yet, so I think I need to understand and be familiar with &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;how to call the program generated by S32CT.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;This allows me to use the relevant functions correctly.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If I can't even call the adc function correctly, I think it will be difficult for me to conduct follow-up research at all.&lt;/P&gt;&lt;P&gt;All that said, this is &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;why I don't use the adc example project.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;I'm very sorry for any inconvenience caused to you.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I can also follow your suggestion and call the program from s32ct through the &lt;STRONG&gt;Model Header&lt;/STRONG&gt; and &lt;STRONG&gt;System Initialization&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;But I think I still need to understand why I can't implement the adc function&amp;nbsp;through the &lt;STRONG&gt;Model Header&lt;/STRONG&gt; and &lt;STRONG&gt;System Initialization &lt;/STRONG&gt;now.&lt;/P&gt;&lt;P&gt;To simplify the problem, I only reserved the &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ADC_POT0&lt;/STRONG&gt;&lt;/FONT&gt; channel to &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;read the ADC&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;with interrupt.&lt;/P&gt;&lt;P&gt;In my opinion it should reproduce the same results as Example Project -&amp;nbsp;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s32k3xx_adc_single_read_s32ct.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Could you tell me reason, please?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I think this is a great help to me.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 01:47:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966658#M9604</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-04T01:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966759#M9606</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423"&gt;@dragostoma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I looked at the example project -&lt;STRONG&gt; "s32k3xx_adc_single_read_s32ct"&lt;/STRONG&gt; c code to figure out why I couldn't use the custom code correctly.&lt;/P&gt;&lt;P&gt;Thank you for your suggestion.&lt;/P&gt;&lt;P&gt;I'm attaching my configuration here, hoping it can help anyone in need.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADC_Config.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/302689iB9EEF1A66080E603/image-size/large?v=v2&amp;amp;px=999" role="button" title="ADC_Config.PNG" alt="ADC_Config.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 06:42:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966759#M9606</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-04T06:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966796#M9612</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423" target="_blank" rel="noopener"&gt;@dragostoma&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry, please forgive me for interrupting again.&lt;/P&gt;&lt;P&gt;I have a question about custom code with Matlab function (&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;coder.ceval&lt;/STRONG&gt;&lt;/FONT&gt;).&lt;/P&gt;&lt;P&gt;In order to facilitate people's viewing, I want to implement&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;ADC function&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;configuration on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;Matlab Function.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;But I don't know how I can call "ADC1Group0" configured under S32CT.&lt;/FONT&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;If using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Model Header&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;System Initialize&lt;/STRONG&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Function,&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I always just enter the name of Adc directly, such as "Adc1Group_0".&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;So how should I do it on Matlab Function to set ADC Group?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SuperBeginner_0-1728028495905.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/302701iF3360203DBE14295/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SuperBeginner_0-1728028495905.png" alt="SuperBeginner_0-1728028495905.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks in advance&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 07:55:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1966796#M9612</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-04T07:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1967785#M9618</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199423"&gt;@dragostoma&lt;/a&gt;,&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/100054" target="_blank"&gt;@Irina_Costachescu&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203572" target="_blank"&gt;@CristinaB&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/221383" target="_blank"&gt;@Adrian_Gherca&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Could you please help explain how I can &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;call variables from S32CT&lt;/STRONG&gt;&lt;/FONT&gt; through &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Matlab function (coder.ceval)&lt;/FONT&gt;&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;For example, &amp;nbsp;I just&amp;nbsp;enter "&lt;STRONG&gt;&lt;FONT color="#008080"&gt;Adc_EnableGroupNotification(Adc1Group_0)"&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;in&lt;STRONG&gt; System Initialize&lt;/STRONG&gt; Block (Simulink Coder) that I can call&amp;nbsp;custom code to enable Adc1Group_0.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So what should I do if I want to use &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Matlab function to access Adc1Group_0&lt;/STRONG&gt;&lt;/FONT&gt;?&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Can I visually access Adc1Group_0 through a block like data store memory?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Please forgive me for tagging every engineer who has helped me previously, I really want to know the answer.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks in advance&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 09:24:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1967785#M9618</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-07T09:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1967789#M9620</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239656"&gt;@SuperBeginner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check the following article to find out more information on how to use custom C code inside your Simulink application.&amp;nbsp;&lt;A href="https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-Battery-Management/ta-p/1119004" target="_self"&gt;https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-Battery-Management/ta-p/1119004&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The information in this article should be helpful for achieving your use case.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Irina&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 09:30:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1967789#M9620</guid>
      <dc:creator>Irina_Costachescu</dc:creator>
      <dc:date>2024-10-07T09:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom code in MBDT 1.4.0</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1967796#M9621</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/100054"&gt;@Irina_Costachescu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I have viewed the website you provided before. It is really helpful for calling my own c code and I also can call it successfully.&lt;/P&gt;&lt;P&gt;But my question is how to configure variables from S32CT in a visual way, like&amp;nbsp;&lt;STRONG&gt;Adc1Group_0&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Neither the website nor the program mentions any way to visually configure variables from S32CT/EB_Tresos.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Could you provide any additional suggestions, please?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 09:39:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/How-to-use-custom-code-in-MBDT-1-4-0/m-p/1967796#M9621</guid>
      <dc:creator>SuperBeginner</dc:creator>
      <dc:date>2024-10-07T09:39:44Z</dc:date>
    </item>
  </channel>
</rss>

