<?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: Module 6: Current Sensing (Part 2/2) in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717990#M1392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/sohyunjang"&gt;sohyunjang&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might not be the best person to answer these questions - but for the sake of convenience since the topics are somehow related with the subject of this article - i'm going to give it a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="1. 현재, DC link 전압, DC link 전류, 각각 상전압을 센싱받아 AD하는 부분 코드를 보면  &amp;nbsp;  "&gt;1.&amp;nbsp;For sensing&amp;nbsp;the DC link voltage, DC link current, Phase voltage,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;PDB_DRV_SetTimerModulusValue (INST_PDLY0, HALF_PWM_MODULO);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;Is there any reason to set 2000 to 4000 instead of Full PWM?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="HALF_PWM으로 설정 시 0~2000 동안 AD 컨버전이 가능하고 2000~4000까지는 AD 컨버전이 불가능한 것인지 알고싶습니다.  &amp;nbsp;  &amp;nbsp;  "&gt;When setting to HALF_PWM, I want to know if AD conversion is possible for 0 ~ 2000 and AD conversion is not possible for 2000 ~ 4000.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SW you are using is a reference design from NXP and if you check the fast control loop execution you will see that the current measurements&amp;nbsp;are performed at every other second PWM update.&lt;/P&gt;&lt;P&gt;The FTM3 PWM module which triggers&amp;nbsp;a whole “chain” of peripheral blocks FTM3_initialization-&amp;gt;PDB0/1-&amp;gt;ADC0/1 has an operating frequency of 20 kHz (you want to have the PWM as high as possible to eliminate audible noise and limit the EMI)&lt;/P&gt;&lt;P&gt;Since in Sensorless mode you need to perform a lot of computations in the fast control loop (10kHz) - which is in sync with the ADC measurements - you need to make sure you have enough time to finish you computation before being interrupted by other tasks (slow loop, data aquisition, etc) that also need to be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, NXP has employed a trick - skips one PWM&amp;nbsp;update interrupt&amp;nbsp;and measure the ADC signals at every second one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition there are 2 other aspects we need to count for:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the motor phase currents are read with shunts resistors that are mounted in the lower part of the inverter&lt;/LI&gt;&lt;LI&gt;the PWM signals are generated based on center-aligned method&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These 2 aspects ensure that in the middle of the PWM (2000)&amp;nbsp; out of full PWM (4000) we will find the lower transistor in conduction and we will be able to measure the motor phase current.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the PBD is triggered at every other second PWM initialization event, then the PDB counter is set to count only till the half of the PWM period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you can measure values like DC bus voltage at any point between 0-4000 but the phase current can only be acquired in a specific points when using shunt resistors in lower inverter legs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="2. DC Link 전류의 경우, PWM 중앙에서 센싱하기 위해 PDB delay를 0으로,  &amp;nbsp;  "&gt;2.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="현재, 다른 센서들의 값 정보가 필요하여 4채널 정도를 추가로 AD 해야하는대요.  &amp;nbsp;  "&gt;At present, the&amp;nbsp;information of other sensors is required, so it is necessary to add about 4 channel ADC.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="따라서 현재 AD하는 시퀀스 중간에 PDB delay를 설정하여 AD 해야합니다.  &amp;nbsp;  "&gt;Therefore, the PDB delay must be add in&amp;nbsp;AD sequence.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;I want to know the minimum PDB delay time for other AD conversions after one AD conversion in PDB_DRV_SetAdcPreTriggerDelayValue().&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;There is no problem in adding additional ADC triggered conversions. Now the delay depends on your particular system. You can see my analysis here:&amp;nbsp;&lt;A href="https://community.nxp.com/thread/469445"&gt;Module 6: Current Sensing (Part 1/2)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the beginning you can start by adding a 200-300 range PDB delay for each of the triggered ADC conversion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep in mind that you can also tweak the ADC settings in order to make if faster but will consume more power.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;3.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Is there any other way not to add PDB delays?&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;For example, a continuous ADC.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you wish to have a chain of events between the PWM-PDB-ADC i think that might be the only feasible way to go forward. In the end that is why Programmable - Delay - Block was invented :-)&lt;/P&gt;&lt;P&gt;Anyhow - you might trigger jobs execution based on a various trigger events but that means a lot of overhead in SW. I think the best thing here is to stick with PDB, understand your HW design delays (eventually measure those with an oscilloscope) and offload all these chaining events from CPU to the dedicated peripherals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2018 07:04:01 GMT</pubDate>
    <dc:creator>Daniel_Popa</dc:creator>
    <dc:date>2018-05-25T07:04:01Z</dc:date>
    <item>
      <title>Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717985#M1387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;P&gt;This is the part 2 of&amp;nbsp;&lt;A href="https://community.nxp.com/thread/469445" rel="noopener noreferrer" target="_blank"&gt;Module 6: Current Sensing (Part 1/2)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333399; font-size: 22px;"&gt;&lt;STRONG&gt;PDB&amp;nbsp;Configuration&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;We finally reached to the most important part of the whole module.&amp;nbsp;You may say that we "saved the best for last". This part make all the difference between reading the currents accurately or reading a total garbage. As a disclaimer, there is no bullet-proof method to setup the proper times for ADC reading. You will have to perform a series of tests that might be&amp;nbsp;separated into 2 main categories:&lt;/P&gt;&lt;UL style="padding: 0px 0px 0px 30px; text-align: justify;"&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;STRONG&gt;trial and error&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;- start from an approximation of the known delays value and change the values steps by steps until you obtain the expected results;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;combination of actual measurements and experiments&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to make sure the ADC sampling happens at the correct time intervals.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;To demonstrate what i'm trying to say about these two methods let me share some oscilloscope captures with you that will prove my point. Now, i think is obvious for you why we have spent the time to implement the simple V/f open loop scalar control in&amp;nbsp;&lt;A href="https://community.nxp.com/thread/467938" rel="noopener noreferrer" target="_blank"&gt;Module 5: V/F Scalar Control&lt;/A&gt;&amp;nbsp;. Having the possibility to drive the motor at various speeds allows us to investigate in detail how the current measurement works under real life conditions.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Lets start with Fig. 32, that shows the PDB interrupt triggered by the FTM PWM counter re-initialization. The interrupt is highlighted by a simple GPIO output pin toggle. Going further we have Fig. 33, that shows the phase A and B current variation. If we synchronize the PDB interrupt with the actual input to the ADC channel for one of the current and measure the waveform that corespondents to the worst case scenario as defined in Fig. 6, then we see that we might have up to 86us delay between the moment when the FTM is initialized and the moment when the lower transistor goes in conduction for the top speed we want to achieve. This is delay we want to consider for the PDB configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pic_24_2.bmp"&gt;&lt;IMG alt="pic_24_2.bmp" src="https://community.nxp.com/t5/image/serverpage/image-id/51154i8E68EAD44D739C10/image-size/large?v=v2&amp;amp;px=999" title="pic_24_2.bmp" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 32: Synchronization between PWM command for the lower switch (cyan) and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;PDB Interrupt (yellow) as result of FTM initialization trigger&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pic_24_13.bmp"&gt;&lt;IMG alt="pic_24_13.bmp" src="https://community.nxp.com/t5/image/serverpage/image-id/51155i31C0A11F64DEE979/image-size/large?v=v2&amp;amp;px=999" title="pic_24_13.bmp" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 33: Phase A (yellow) and Phase B (cyan) voltage drop on the current shunt resistors&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pic_24_18.bmp"&gt;&lt;IMG alt="pic_24_18.bmp" src="https://community.nxp.com/t5/image/serverpage/image-id/51156i16F71DCA3793973D/image-size/large?v=v2&amp;amp;px=999" title="pic_24_18.bmp" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 34: PDB interrupt (yellow) vs. phase current (cyan) at the highest speed we want to achieve. Note the 86us delay between FTM initialization trigger and the actual motor when the lower transistor goes in conduction&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Furthermore, if we check the DC-link shunt voltage drop that corresponds to the current that is drown from the power supply we can see its variation and the delay relative to the beginning of the PWM period. That is another information we want to consider for the PDB configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pic_24_16.bmp"&gt;&lt;IMG alt="pic_24_16.bmp" src="https://community.nxp.com/t5/image/serverpage/image-id/51157i4ED0732566772EE9/image-size/large?v=v2&amp;amp;px=999" title="pic_24_16.bmp" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 35: PDB interrupt (yellow) vs the DC-link current (cyan) at the highest speed we want to achieve. Note the 70us delay between FTM initialization trigger and peak of the DC-link current&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Based on the hardware&amp;nbsp;measurement for the phase currents at high speeds&amp;nbsp;and various experiments I've reached to the ADC triggering&amp;nbsp;timings diagram shown in Fig. 36.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;This diagram is valid for 10kHz PWM switching frequency only and shows how the ADC conversions are controlled via the PDB pre-triggers that are in turn delayed compared with the beginning of the PWM period. Please note that how the phase current ADC conversion are synchronized to happen in the same time for both ADC modules.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51158iBF3079DC1296AC75/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 36: FTM-PDB-ADC triggering timings diagram&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Based on the information shown in Fig. 36, we can configure the PDB0 and PDB1 instances directly from Simulink blocks&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="border: inherit solid inherit; font-size: inherit; padding: 5px;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51159i2E1426E8F996C559/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51160i0F5BD78FF8E31146/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 37: PDB0 and PDB1 global configurations: trigger source, external trigger type and PDB counter value&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="border: inherit solid inherit; font-size: inherit; padding: 5px;"&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;IMG alt="pastedImage_4.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51161iE63214DAC3E57729/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_4.png" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;IMG alt="pastedImage_5.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51162i7E2B6D6EF70E707B/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 38: PDB0 and PDB1 ADC pre-triggers and delays configuration with the timings shown in Fig.36&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;This way the PDB0 and PDB1 will trigger the ADC0 and ADC1 conversions at specific time intervals and all that remains for the CPU is to read those values and use them for FOC. To ADC0 and ADC1 conversion results are read on PDB1 interrupt handler that is triggered each time the PBD counter is re-initialized.&amp;nbsp;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51163i6D0A1FCC606E372D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 39: PDB0 and PDB1 interrupt configurations&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;IMG alt="pastedImage_8.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51164iA9F6946D18B42CCD/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_8.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 40: ADC conversion reading based on PDB interrupt&amp;nbsp;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 15px;"&gt;For the moment the ADC conversion are read based on the PDB interrupt. This will be later on changed to read the values as soon as the last ADC hardware conversion is ready. This will ensure a minimal delay between the moment when the phase current are acquired and the moment when the next commutation sequence is updated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;&lt;SPAN style="font-size: 15px;"&gt;For most of the common application that deals with relative small speed range this kind of mechanism is robust enough, but once you go into high speed regions like tens of thousandth of RPM the delay between the moment the current are measured and the computation of the rotor position is becoming critical. In practice to deal with such scenario you will need to perform electric angle compensation to avoid the lost of de-synchronization of PMSM.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333399; font-size: 22px;"&gt;&lt;STRONG&gt;MEASUREMENT OF CURRENTS and VOLTAGE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Once the ADC conversion are ready we need to transform those into actual currents and voltages by applying various scaling factors and offset compensation. We are not going crazy with explanations about how the ADC conversion works and how the read hardware implements the shunt voltage drop scaling. If you wish to get more information about this subject you may consult the&amp;nbsp;&lt;A href="https://community.nxp.com/thread/452213" rel="noopener noreferrer" target="_blank"&gt;Motor Control Class: Lecture 3 - Input Commands&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;The PMSM phase current measurement model is shown in Fig. 41. All you need to know is that the ADCs were configured to use 12bit precision and the shunts resistors can measure an instantaneous AC currents with the peak-to-peak amplitude of 31.25Amps&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;IMG alt="pastedImage_2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51165iA41FBBD9B2BB4ABD/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 41: Phase current measurements - scaling and offsetting&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;The DC-link bus voltage measurement Simulink model is shown in Fig. 42. Depending on the MotorGD DevKit jumper settings the DC voltage that can be measured via the voltage resistors divider network is up to 45Volts DC.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;IMG alt="pastedImage_6.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51166i7CB1E56498498C3E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_6.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 42: DC-link bus voltage measurement Simulink model&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;And finally for the DC-link current the Simulink model used to covert the ADC acquisitions into actual Amps is shown in Fig. 43.&amp;nbsp;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="border: inherit solid inherit; font-size: inherit; padding: 5px;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;IMG alt="pastedImage_9.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51167iE9891F5DADA9C574/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_9.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 43: DC-link current measurement Simulink model&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&lt;SPAN style="border: 0px; padding: 0px; color: #333399; font-weight: bold; font-size: 30px;"&gt;&lt;STRONG&gt;EXPERIMENTAL RESULTS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px; text-align: justify;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; padding: 0px; color: #4c4c4c; font-weight: inherit;"&gt;If you reached to this point - then congratulations - it is now time to build the model and flash it into the MCU memory.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px; text-align: justify;"&gt;&lt;SPAN style="border: 0px; background-color: #ffffff; padding: 0px; color: #4c4c4c; font-weight: inherit;"&gt;Using the FreeMASTER project attached ADC_Sensing.pmp we can visualize in real time the results of ADC conversions and validate the results.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="height: 439px;"&gt;&lt;TD style="text-align: center; height: 439px;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_11.png"&gt;&lt;IMG alt="pastedImage_11.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51168i1AD8F46D53C612BF/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_11.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="text-align: center; height: 25px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 44: ADC conversion raw data: (yellow) - phase A current, (cyan) - phase B current, (red) - DC link current, (blue) - DC bus voltage&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51169i16675E4C031181EB/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 45: 1000RPM PMSM phase currents: (yellow) - phase A current measured, (cyan) - phase B current measured,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;(green) - phase C current computed&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_8.png"&gt;&lt;IMG alt="pastedImage_8.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51170iDA1AAF61778539B4/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_8.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 46: 3000RPM PMSM phase currents: (yellow) - phase A current measured, (cyan) - phase B current measured,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;(green) - phase C current computed&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;For DC bus values acquisitions we are going to modify the power supply voltage levels. The ADC acquisition from the target shall follow those variations.&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;IMG alt="pastedImage_4.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51171i91FEA8C3113DD437/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_4.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 47: (blue) - DC bus voltage and (red) - DC bus current&amp;nbsp;acquisitions&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Due to the scalar control method that keeps constant V/f ratio the DC-link current is going to follow the variations in the DC bus voltage.&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN&gt;As a final validation we can check the PMSM startup&amp;nbsp;&lt;/SPAN&gt;sequence and how the values of the currents are changing over the time.&amp;nbsp;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6; border-width: 1px; border-color: #ffffff;" width="100%"&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_11.png"&gt;&lt;IMG alt="pastedImage_11.png" src="https://community.nxp.com/t5/image/serverpage/image-id/51172i41E69E9EC4C863D1/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_11.png" /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="font-size: 13px;"&gt;Fig. 48: PMSM open loop V/f scalar control start-up sequence&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&lt;SPAN style="border: 0px; padding: 0px; color: #333399; font-weight: bold; font-size: 30px;"&gt;&lt;STRONG&gt;CONCLUSIONS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;After going thru this module you should now have a good understanding about the hardware and software techniques required to perform various system measurements. You should now be aware of various tips &amp;amp; tricks to measure the most important quantities needed for Field Oriented Control. Depending on the hardware your are working on there might be slightly different hardware modules involved but the generic approach is the same: you need to synchronize the ADC readings with the PWM commands.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Another aspect that is highlighted in these&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;2 parts article is the correspondence between the actual analogue signals and the values used application. As you have seen the sensing information is totally different than what you normally expect as current waveform and it is up to the software to assemble all the pieces together and form the AC quantities we are all used with.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;In the end I would like to highlight that each system engineer that is involved in the area of power drivers should always verify the measurements since those represent a very important factor in the overall control strategy. As you can see the measurements are polluted with EMI noise that may create us lot of problems later on. Understanding the rood cause of the noise and delay is a key factor towards a robust motor control solution.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; color: #800000; font-weight: bold;"&gt;&lt;STRONG&gt;Update January 28th 2019 -&amp;nbsp;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;This&amp;nbsp;Simulink model is now available on MATLAB 2018b and MBDT for S32K14x 2018.R1 release&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="info" __jive_macro_name="alert" alert="info" class="jive_text_macro jive_macro_alert"&gt;&lt;P&gt;Before using the new models make sure you apply all the hot-patches from here:&amp;nbsp;&lt;A _jive_internal="true" data-objecttype="1" href="https://community.nxp.com/thread/489947" rel="noopener noreferrer" style="color: #3d9ce7; background-color: transparent; border: 0px; font-weight: inherit; padding: 1px 0px 1px calc(12px + 0.35ex);" target="_blank"&gt;HotFix: MBD Toolbox 2018.R1 for S32K&lt;/A&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 2pt 0in;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;&lt;SPAN style="border: 0px; font-weight: bold; font-size: 16px;"&gt;&lt;STRONG&gt;Update revisions&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 2pt 0in;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 11.5pt;"&gt;March&amp;nbsp;18, 2019&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px 0.0001pt;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;update the model&amp;nbsp;to work with&amp;nbsp;&lt;A _jive_internal="true" data-objecttype="102" href="https://community.nxp.com/docs/DOC-342724" rel="noopener noreferrer" style="color: #3d9ce7; background-color: transparent; border: 0px; font-weight: inherit; font-size: 16px; padding: 1px 0px 1px calc(12px + 0.35ex);" target="_blank"&gt;&lt;SPAN style="color: blue; border: 0px; font-weight: inherit; font-size: 16px;"&gt;Model-Based Design Toolbox for MPC57xx Automotive Version 3.0.0&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp; .&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; margin: 2pt 0in;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 11.5pt;"&gt;May 06, 2020&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px 0.0001pt;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12pt;"&gt;update the model&amp;nbsp;to work with&amp;nbsp;&lt;A _jive_internal="true" data-objecttype="102" href="https://community.nxp.com/docs/DOC-346265" rel="noopener noreferrer" style="color: #3d9ce7; background-color: transparent; border: 0px; font-weight: inherit; font-size: 16px; padding: 1px 0px 1px calc(12px + 0.35ex);" target="_blank"&gt;&lt;SPAN style="color: blue; border: 0px; font-weight: inherit; font-size: 16px;"&gt;Model-Based Design Toolbox for MPC57xx Automotive Version 3.2.0&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp; .&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717985#M1387</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2020-11-02T14:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717986#M1388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The PMSM phase current measurement model is shown in Fig. 41. All you need to know is that the ADCs were configured to use 12bit precision and the shunts resistors can measure an instantaneous AC currents with the peak-to-peak amplitude of 31.25Amps&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Where did you found this Information of 31.25 Peak-to-Peak Amplitude ?&lt;/P&gt;&lt;P&gt;For the Motor GD Kit I only found 5A phase current (RMS) in the overview.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/support/developer-resources/hardware-development-tools/ultra-reliable-mcus-development-platform/low-cost-motor-control-solution-for-devkit-platform:DEVKIT-MOTORGD"&gt;https://www.nxp.com/support/developer-resources/hardware-development-tools/ultra-reliable-mcus-development-platform/low-cost-motor-control-solution-for-devkit-platform:DEVKIT-MOTORGD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I didn't found a schematic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 12:20:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717986#M1388</guid>
      <dc:creator>lethuer</dc:creator>
      <dc:date>2018-02-28T12:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717987#M1389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Leon,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, the schematics of the MotorGD DevKit are not yet available on the website. I've made a note to NXP persons responsible for uploading the documentation. I do not have a public approved version therefore i can't share it here.&lt;/P&gt;&lt;P&gt;What i can share is how the current measurement is implemented. PHA_I goes directly on MCU ADC pin just like the other signals for the B and C phase currents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20845i69DFC9736FF2B865/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm not an electronic engineer, but apparently if you do the math, that's the theoretical range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:39:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717987#M1389</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2018-02-28T15:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717988#M1390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the image. If I'm correct the J9 is connected between pin 1 and 2.&lt;/P&gt;&lt;P&gt;Then&amp;nbsp;J9 pin 2 should be connected with J4 Pin&amp;nbsp;5 in the&amp;nbsp;image below ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Motor GD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23083i7E70A8269601BE5C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;S32K&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;J4 Pin 5 is then connected on s32k PTB0&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23261i787648C2258120B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt.PNG" alt="Unbenannt.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PTB0 you have configured in the adc block.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt2.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/21775i0F645F7B2087F091/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt2.PNG" alt="Unbenannt2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is correct then the + terminal of the Operation amplifier is connected to the upper side of the shunt (PHA_I_POS) while the - terminal is connected to the lower side of the shunt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a difference to the High Voltage Development Platform !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MC3PH&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here the + terminal of the Operation amplifier for current measurements is connected to the lower side of the shunt while the - terminal is connected to the upper side.&lt;/P&gt;&lt;P&gt;So with MC3PH here the Inversion of the sign is&amp;nbsp;already&amp;nbsp;done and I do not need to&amp;nbsp;consider&amp;nbsp;this in Software?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The note in the schematic "1.65V +/- 1.65V @ +/- Imax" would be okay !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt4.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/21741i1004FA5F54934EE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt4.PNG" alt="Unbenannt4.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt3.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22023iC2123C7AC460A9BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt3.PNG" alt="Unbenannt3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the Basis&amp;nbsp;of my previous model&amp;nbsp;for measuring the currents I have configured a LUT like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt5.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22676i9402E4325EEEFAEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt5.PNG" alt="Unbenannt5.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt6.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22985iE25708496B862E53/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt6.PNG" alt="Unbenannt6.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 09:13:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717988#M1390</guid>
      <dc:creator>lethuer</dc:creator>
      <dc:date>2018-03-01T09:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717989#M1391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use &lt;A data-content-finding="Community" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DMTRDEVKSBNK144_SW%26appType%3Dlicense" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;MTRDEVKSBNK144 Application Software&lt;/SPAN&gt;&lt;/A&gt;.&lt;SPAN lang="en"&gt;&lt;SPAN title="유라코퍼레이션 장소현입니다.  &amp;nbsp;  "&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="유선상 말씀드린 것처럼 application code를 보다가 궁금한 점이 생겨 문의드립니다.  &amp;nbsp;  &amp;nbsp;  "&gt;I have a question about the application code.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="1. 현재, DC link 전압, DC link 전류, 각각 상전압을 센싱받아 AD하는 부분 코드를 보면  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="유선상 말씀드린 것처럼 application code를 보다가 궁금한 점이 생겨 문의드립니다.  &amp;nbsp;  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="1. 현재, DC link 전압, DC link 전류, 각각 상전압을 센싱받아 AD하는 부분 코드를 보면  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="1. 현재, DC link 전압, DC link 전류, 각각 상전압을 센싱받아 AD하는 부분 코드를 보면  &amp;nbsp;  "&gt;1.&amp;nbsp;For sensing&amp;nbsp;the DC link voltage, DC link current, Phase voltage,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;PDB_DRV_SetTimerModulusValue (INST_PDLY0, HALF_PWM_MODULO);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;Is there any reason to set 2000 to 4000 instead of Full PWM?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="HALF_PWM으로 설정 시 0~2000 동안 AD 컨버전이 가능하고 2000~4000까지는 AD 컨버전이 불가능한 것인지 알고싶습니다.  &amp;nbsp;  &amp;nbsp;  "&gt;When setting to HALF_PWM, I want to know if AD conversion is possible for 0 ~ 2000 and AD conversion is not possible for 2000 ~ 4000.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="2. DC Link 전류의 경우, PWM 중앙에서 센싱하기 위해 PDB delay를 0으로,  &amp;nbsp;  "&gt;2.&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN title="현재, 다른 센서들의 값 정보가 필요하여 4채널 정도를 추가로 AD 해야하는대요.  &amp;nbsp;  "&gt;At present, the&amp;nbsp;information of other sensors is required, so it is necessary to add about 4 channel ADC.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="따라서 현재 AD하는 시퀀스 중간에 PDB delay를 설정하여 AD 해야합니다.  &amp;nbsp;  "&gt;Therefore, the PDB delay must be add in&amp;nbsp;AD sequence.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;I want to know the minimum PDB delay time for other AD conversions after one AD conversion in PDB_DRV_SetAdcPreTriggerDelayValue().&lt;/SPAN&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;3. &lt;SPAN&gt;Is there any other way not to add PDB delays?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, a continuous ADC.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;Thanks you.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 00:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717989#M1391</guid>
      <dc:creator>sohyunjang</dc:creator>
      <dc:date>2018-05-23T00:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717990#M1392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/sohyunjang"&gt;sohyunjang&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might not be the best person to answer these questions - but for the sake of convenience since the topics are somehow related with the subject of this article - i'm going to give it a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="1. 현재, DC link 전압, DC link 전류, 각각 상전압을 센싱받아 AD하는 부분 코드를 보면  &amp;nbsp;  "&gt;1.&amp;nbsp;For sensing&amp;nbsp;the DC link voltage, DC link current, Phase voltage,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="PDB_DRV_SetTimerModulusValue(INST_PDLY0, HALF_PWM_MODULO);으로 셋팅을 해주게 되는대,  &amp;nbsp;  "&gt;PDB_DRV_SetTimerModulusValue (INST_PDLY0, HALF_PWM_MODULO);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;Is there any reason to set 2000 to 4000 instead of Full PWM?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="Full PWM 인 4000이 아닌 2000으로 설정하는 이유가 따로 있나요?  &amp;nbsp;  "&gt;&lt;SPAN lang="en" style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;" title="HALF_PWM으로 설정 시 0~2000 동안 AD 컨버전이 가능하고 2000~4000까지는 AD 컨버전이 불가능한 것인지 알고싶습니다.  &amp;nbsp;  &amp;nbsp;  "&gt;When setting to HALF_PWM, I want to know if AD conversion is possible for 0 ~ 2000 and AD conversion is not possible for 2000 ~ 4000.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SW you are using is a reference design from NXP and if you check the fast control loop execution you will see that the current measurements&amp;nbsp;are performed at every other second PWM update.&lt;/P&gt;&lt;P&gt;The FTM3 PWM module which triggers&amp;nbsp;a whole “chain” of peripheral blocks FTM3_initialization-&amp;gt;PDB0/1-&amp;gt;ADC0/1 has an operating frequency of 20 kHz (you want to have the PWM as high as possible to eliminate audible noise and limit the EMI)&lt;/P&gt;&lt;P&gt;Since in Sensorless mode you need to perform a lot of computations in the fast control loop (10kHz) - which is in sync with the ADC measurements - you need to make sure you have enough time to finish you computation before being interrupted by other tasks (slow loop, data aquisition, etc) that also need to be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, NXP has employed a trick - skips one PWM&amp;nbsp;update interrupt&amp;nbsp;and measure the ADC signals at every second one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition there are 2 other aspects we need to count for:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the motor phase currents are read with shunts resistors that are mounted in the lower part of the inverter&lt;/LI&gt;&lt;LI&gt;the PWM signals are generated based on center-aligned method&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These 2 aspects ensure that in the middle of the PWM (2000)&amp;nbsp; out of full PWM (4000) we will find the lower transistor in conduction and we will be able to measure the motor phase current.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the PBD is triggered at every other second PWM initialization event, then the PDB counter is set to count only till the half of the PWM period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you can measure values like DC bus voltage at any point between 0-4000 but the phase current can only be acquired in a specific points when using shunt resistors in lower inverter legs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="2. DC Link 전류의 경우, PWM 중앙에서 센싱하기 위해 PDB delay를 0으로,  &amp;nbsp;  "&gt;2.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="현재, 다른 센서들의 값 정보가 필요하여 4채널 정도를 추가로 AD 해야하는대요.  &amp;nbsp;  "&gt;At present, the&amp;nbsp;information of other sensors is required, so it is necessary to add about 4 channel ADC.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="따라서 현재 AD하는 시퀀스 중간에 PDB delay를 설정하여 AD 해야합니다.  &amp;nbsp;  "&gt;Therefore, the PDB delay must be add in&amp;nbsp;AD sequence.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;" title="한번 AD 컨버전 후 다른 AD 컨버전을 위한 최소 PDB delay 시간을 알고싶습니다."&gt;I want to know the minimum PDB delay time for other AD conversions after one AD conversion in PDB_DRV_SetAdcPreTriggerDelayValue().&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;There is no problem in adding additional ADC triggered conversions. Now the delay depends on your particular system. You can see my analysis here:&amp;nbsp;&lt;A href="https://community.nxp.com/thread/469445"&gt;Module 6: Current Sensing (Part 1/2)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the beginning you can start by adding a 200-300 range PDB delay for each of the triggered ADC conversion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep in mind that you can also tweak the ADC settings in order to make if faster but will consume more power.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;3.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Is there any other way not to add PDB delays?&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;For example, a continuous ADC.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you wish to have a chain of events between the PWM-PDB-ADC i think that might be the only feasible way to go forward. In the end that is why Programmable - Delay - Block was invented :-)&lt;/P&gt;&lt;P&gt;Anyhow - you might trigger jobs execution based on a various trigger events but that means a lot of overhead in SW. I think the best thing here is to stick with PDB, understand your HW design delays (eventually measure those with an oscilloscope) and offload all these chaining events from CPU to the dedicated peripherals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 07:04:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717990#M1392</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2018-05-25T07:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717991#M1393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am currently working with the&amp;nbsp;MTRDEVKSBNK144 development kit, using MATLAB 2018b. I downloaded&amp;nbsp;&lt;A _jive_internal="true" data-content-finding="Community" href="https://community.nxp.com/servlet/JiveServlet/download/469526-1-440461/M6_2018.R1.zip" style="color: #3d9ce7; background-color: #f7f7f7; border: 0px; font-weight: 600; text-decoration: none; font-size: 12px;"&gt;M6_2018.R1.zip&lt;/A&gt;&amp;nbsp;and I had it uploaded on S32. I did apply the Cumulative Patch found in the HotFix thread beforehand (The "Replace All" message appeared) .&lt;BR /&gt;Unfortunately, I cannot succeed in making it do the right thing. I posted below my FreeMaster results&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85704i67BCEA5E06996E40/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;BR /&gt;(This warning comes out every time I build the model, but I don't think this is the cause)&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85705i884C7C199F341E78/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85706i12AEE69A350CFCFD/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ia, Ib and Ic are supposed to be sine waves.&lt;BR /&gt;Regarding the picture containing the ADC_IB and ADC_IB, the phase shift seems good, but the amplitude of ADC_IA is too low. Also, isn't the ADC_IDC shape odd?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Andrei Cador&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2019 12:11:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717991#M1393</guid>
      <dc:creator>andreicador13</dc:creator>
      <dc:date>2019-06-09T12:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717992#M1394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/andreicador13@gmail.com"&gt;andreicador13@gmail.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed the current reading are wrong.&lt;/P&gt;&lt;P&gt;Have you set the &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MTRDEVKSBNK144&lt;SPAN&gt;&amp;nbsp;to operate in the PMSM mode (J11/J10/J09)?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Are you absolutely&amp;nbsp;sure you have installed:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;- Toolbox:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-341052"&gt;https://community.nxp.com/docs/DOC-341052&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;- Patch:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/489947#comment-1106251"&gt;https://community.nxp.com/thread/489947#comment-1106251&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;The text and the screenshots from the article was written for a slightly older toolbox. In the latest toolbox we have changed a bit the UIs. The models with *_2018.R1* were tested and validated before being uploaded here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Best regards,&lt;BR /&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 08:05:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717992#M1394</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2019-06-10T08:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717993#M1395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your fast response, &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;‌.&lt;BR /&gt;Seems like I did not change those jumpers for PMSM operating mode. I&amp;nbsp;thought&amp;nbsp;it was the default mode and I did not go through that part of the guide.&lt;BR /&gt;I wish to add one more question to be sure that my motor is functioning the way it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the measurements for 2000RPM regime too noisy? I think it's important to mention that 2000RPM is the biggest value I can set, providing the fact that Fig. 46 showed 3000 RPM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85815i06BC846669226675/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85816i08BBA282F6FC56FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85817iEEB78779ECC21F20/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;Best regards,&lt;BR /&gt;Andrei Cador&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 11:35:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717993#M1395</guid>
      <dc:creator>andreicador13</dc:creator>
      <dc:date>2019-06-10T11:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717994#M1396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/andreicador13@gmail.com"&gt;andreicador13@gmail.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The motor which is part of the kit is a BLDC motor (the back-emf waveform is square). Also, keep in mind that the motor max speed is 4000 rpm @ 24V. The DC bus voltage used on the kit is only 12Vdc hence you can't drive the motor stable for more than 2000rpm.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are some aspects that you need to consider when you drive this default motor. If you have a change to change the motor with a more reliable 12V motor with sine back emf waveform, then please do it - the quality if the currents will be drastically improved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 13:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717994#M1396</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2019-06-10T13:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717995#M1397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for explanation, it does help a lot (si proiectul meu de licenta va multumeste).&lt;BR /&gt;&lt;BR /&gt;Have a nice day,&amp;nbsp;&lt;BR /&gt;Andrei Cador&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 13:57:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717995#M1397</guid>
      <dc:creator>andreicador13</dc:creator>
      <dc:date>2019-06-10T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717996#M1398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I downloaded the M6_2018.R1 file and i had to reroute the ADC Instance for current A from SE4 to SE2 because the SE4 instance is used by the LSPI Config Block and at 20 KHz PWM&amp;nbsp;i got the following results &lt;span class="lia-inline-image-display-wrapper" image-alt="ADC_Sensing.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81751i438733D59777419B/image-size/large?v=v2&amp;amp;px=999" role="button" title="ADC_Sensing.jpg" alt="ADC_Sensing.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried the same procedure for 10 KHz with the same data that you used for PDB0 and PDB1 configurations but the motor didn't turn at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A second issue was with the torque Control model i did the same rerouting for Phase A but the board keeps going into the fault mode (Red LED).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to avoid the LSPI block ? or did this rerouting caused the error with the torque Control?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Ali Terro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 11:46:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717996#M1398</guid>
      <dc:creator>ali_terro</dc:creator>
      <dc:date>2019-07-17T11:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Module 6: Current Sensing (Part 2/2)</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717997#M1399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to use the hardware trigger of ADC for sample the CAN msg. The bit rate of CAN msg is 500Kbit/sec. When I set the options of the blocks PDB0_Init I choose as cycles 160 (ratio between 80MHz and 500KHz). It is possible to synchronize the ADC with the CAN with hardware trigger? I realized the communication on Model Based Design.&lt;BR /&gt;When I build my project I have this problem:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;#if ( UCHAR_MAX != (0xFFU) ) || ( SCHAR_MAX != (0x7F) )&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#error Code was generated for compiler with different sized uchar/char. \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Consider adjusting Test hardware word size settings on the \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Hardware Implementation pane to match your compiler word sizes as \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;defined in limits.h of the compiler. Alternatively, you can \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;select the Test hardware is the same as production hardware option and \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;select the Enable portable word sizes option on the Code Generation &amp;gt; \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Verification pane for ERT based targets, which will disable the \&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;preprocessor word size checks.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Certainly I wrong Somethingand I need of help. Can someone help me?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1x5dUjxN9-x9FFXcp2AblMfNxMwZqBTB1/view?usp=sharing"&gt;https://drive.google.com/file/d/1x5dUjxN9-x9FFXcp2AblMfNxMwZqBTB1/view?usp=sharing&lt;/A&gt; &lt;BR /&gt;&lt;A class="link-titled" href="https://drive.google.com/file/d/1GPFNSz14H9iEizeagQXPiuADF9A3ij5a/view?usp=sharing" title="https://drive.google.com/file/d/1GPFNSz14H9iEizeagQXPiuADF9A3ij5a/view?usp=sharing"&gt;https://drive.google.com/file/d/1GPFNSz14H9iEizeagQXPiuADF9A3ij5a/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2020 15:50:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Module-6-Current-Sensing-Part-2-2/m-p/717997#M1399</guid>
      <dc:creator>p_decesare</dc:creator>
      <dc:date>2020-07-01T15:50:16Z</dc:date>
    </item>
  </channel>
</rss>

