<?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>Kinetis MicrocontrollersのトピックRe: pdb adc trigger delay problem</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pdb-adc-trigger-delay-problem/m-p/821730#M49720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pau Vilanova,&lt;/P&gt;&lt;P&gt;Sorry for my late reply!&lt;/P&gt;&lt;P&gt;I recommend you read the &lt;A href="https://www.nxp.com/docs/en/application-note/AN4822.pdf"&gt;AN4822: Tips and Tricks Using PDB in Motor Control Applications on Kinetis&lt;/A&gt;&lt;BR /&gt;Then you can see the "Figure 1. Internal arrangement of PDB" and "Table 1. Relation between pre-triggers and result registers".&lt;/P&gt;&lt;P&gt;Please check if you have modify the PreTriggerDelayValue of that corresponding ADC channel.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Internal arrangement of PDB.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/66108iED6B17E2E346DE49/image-size/large?v=v2&amp;amp;px=999" role="button" title="Internal arrangement of PDB.png" alt="Internal arrangement of PDB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I debug the ftm_pdb_adc16 demo, I can see the PDB0_CH0_DLY1 was wrote.&lt;BR /&gt;Then you may need to observe the ADC channel selected by ADC0_RB. (0x1A channel 26 Temperature sensor)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ftm_pdb_adc16.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/66086iBD83442F59FDFECE/image-size/large?v=v2&amp;amp;px=999" role="button" title="ftm_pdb_adc16.png" alt="ftm_pdb_adc16.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jul 2018 07:44:47 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2018-07-23T07:44:47Z</dc:date>
    <item>
      <title>pdb adc trigger delay problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pdb-adc-trigger-delay-problem/m-p/821729#M49719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working with the freedom board mkv11z and I'm trying to implement an ADC triggered with the programable delay block. This PDB is hardware triggered by every high of my flextimer0.&lt;/P&gt;&lt;P&gt;My problem is that the pdb triggers my adc instantenously when it recives my FTM interrupt, summarizing, that I cannot delay my delay block. Changing delay value just ignores me and keeps triggering the ADC at the same time.&lt;/P&gt;&lt;P&gt;I'm using the example code provided by the driver of my freedom board ftm_pdb_adc16 and changing values of delay doesn't change&amp;nbsp; the time that triggers my ADC. I tried to change my ftm to single edge (in the example was combined pwm) and just code one adc channel disabling back to back operation but even doing that PDB delay does not change.&lt;/P&gt;&lt;P&gt;I'm attaching a picture of the signals. the blue one is my pwm and the green one toggles when the adc is triggered by my PDB.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Captura.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/65647i2511C7CCEF225747/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura.JPG" alt="Captura.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And thats my pdb configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdb_config_t pdbConfigStruct;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdb_adc_pretrigger_config_t pdbAdcPreTriggerConfigStruct;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * pdbConfigStruct.loadValueMode = kPDB_LoadValueImmediately;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * pdbConfigStruct.prescalerDivider = kPDB_PrescalerDivider1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * pdbConfigStruct.dividerMultiplicationFactor = kPDB_DividerMultiplicationFactor1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * pdbConfigStruct.triggerInputSource = kPDB_TriggerSoftware;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * pdbConfigStruct.enableContinuousMode = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_GetDefaultConfig(&amp;amp;pdbConfigStruct);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Config PDB */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdbConfigStruct.triggerInputSource = kPDB_TriggerInput8; //FTM0 INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_Init(DEMO_PDB_BASE, &amp;amp;pdbConfigStruct);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Configure the delay interrupt. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_SetModulusValue(DEMO_PDB_BASE, 5000U);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_SetCounterDelayValue(DEMO_PDB_BASE, 1000U);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdbAdcPreTriggerConfigStruct.enableBackToBackOperationMask = 0;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//NO BACK TO BACK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdbAdcPreTriggerConfigStruct.enablePreTriggerMask = (DEMO_PDB_PRETRIGGER_CHANNEL0_MASK );&amp;nbsp;&amp;nbsp; &amp;nbsp;//ENABLE CH0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdbAdcPreTriggerConfigStruct.enableOutputMask =(DEMO_PDB_PRETRIGGER_CHANNEL0_MASK);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//OUTPUT CH0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_SetADCPreTriggerConfig(DEMO_PDB_BASE, DEMO_PDB_TRIGGER_CHANNEL0, &amp;amp;pdbAdcPreTriggerConfigStruct);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Configure the ADC Pre-Trigger. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_SetADCPreTriggerDelayValue(DEMO_PDB_BASE, DEMO_PDB_TRIGGER_CHANNEL0, (pdb_adc_pretrigger_t)DEMO_PDB_PRETRIGGER_CHANNEL0_MASK,200U); //PRETRIGG CH0 DELAY 200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Load PDB register */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDB_DoLoadValues(DEMO_PDB_BASE); //LDOK = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All said, the documentation about pdb on kinetis which I've found on the intered is so confusing. If anyone could send me briefings or documents I'll appreciate that.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2018 11:15:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pdb-adc-trigger-delay-problem/m-p/821729#M49719</guid>
      <dc:creator>pauvilanova</dc:creator>
      <dc:date>2018-07-17T11:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: pdb adc trigger delay problem</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pdb-adc-trigger-delay-problem/m-p/821730#M49720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pau Vilanova,&lt;/P&gt;&lt;P&gt;Sorry for my late reply!&lt;/P&gt;&lt;P&gt;I recommend you read the &lt;A href="https://www.nxp.com/docs/en/application-note/AN4822.pdf"&gt;AN4822: Tips and Tricks Using PDB in Motor Control Applications on Kinetis&lt;/A&gt;&lt;BR /&gt;Then you can see the "Figure 1. Internal arrangement of PDB" and "Table 1. Relation between pre-triggers and result registers".&lt;/P&gt;&lt;P&gt;Please check if you have modify the PreTriggerDelayValue of that corresponding ADC channel.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Internal arrangement of PDB.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/66108iED6B17E2E346DE49/image-size/large?v=v2&amp;amp;px=999" role="button" title="Internal arrangement of PDB.png" alt="Internal arrangement of PDB.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I debug the ftm_pdb_adc16 demo, I can see the PDB0_CH0_DLY1 was wrote.&lt;BR /&gt;Then you may need to observe the ADC channel selected by ADC0_RB. (0x1A channel 26 Temperature sensor)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ftm_pdb_adc16.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/66086iBD83442F59FDFECE/image-size/large?v=v2&amp;amp;px=999" role="button" title="ftm_pdb_adc16.png" alt="ftm_pdb_adc16.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2018 07:44:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pdb-adc-trigger-delay-problem/m-p/821730#M49720</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-07-23T07:44:47Z</dc:date>
    </item>
  </channel>
</rss>

