<?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: Problem with LDOK signal on S12ZVM in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330007#M10431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I moved on a little further. Now I get a nice rotation and have ground where I have to have ground. The only thing now is, that always only two phases can have ground and PWM and not connected stages properly. The third phase seems to have PWM on the high gate but not on the low gate and there is never a ground stage on this phase. And on reset this "not properly looking" phase is working as it should but another is having that problem. Why is that?&lt;/P&gt;&lt;P&gt;I hope you understand my issue. If not I could eventually attach a screenshot from the oscillator.&lt;/P&gt;&lt;P&gt;Here is how the interrupt looks now (the rest of the code is still the same):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unsigned char outc[6] = {0x7, 0xD, 0x1C, 0x34, 0x31, 0x13};&lt;/P&gt;&lt;P&gt;unsigned char msk[6] = {0xC, 0x03, 0x30, 0x0C, 0x03, 0x30};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interrupt VectorNumber_Vtim0ch1 void TIMch1_ISR(void) {&lt;/P&gt;&lt;P&gt;hall_pattern = 0x07 &amp;amp; (PTIT &amp;gt;&amp;gt; 1);/* Capture Hall sensor pattern */&lt;/P&gt;&lt;P&gt;hall_a_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;0);&lt;/P&gt;&lt;P&gt;hall_b_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;1);&lt;/P&gt;&lt;P&gt;hall_c_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;switch(hall_pattern) {&lt;/P&gt;&lt;P&gt;case 0x6:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 +msk[0];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[0]; break;&lt;/P&gt;&lt;P&gt;case 0x4:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[1];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[1]; break;&lt;/P&gt;&lt;P&gt;case 0x5:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[2];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[2]; break;&lt;/P&gt;&lt;P&gt;case 0x1:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[3];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[3]; break;&lt;/P&gt;&lt;P&gt;case 0x3:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[4];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[4]; break;&lt;/P&gt;&lt;P&gt;case 0x2:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[5];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[5]; break;&lt;/P&gt;&lt;P&gt;default:&lt;/P&gt;&lt;P&gt;PMFOUTB = 0x0;&lt;/P&gt;&lt;P&gt;PMFOUTC = 0x3f; break; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Oct 2014 12:32:26 GMT</pubDate>
    <dc:creator>erikwieser</dc:creator>
    <dc:date>2014-10-29T12:32:26Z</dc:date>
    <item>
      <title>Problem with LDOK signal on S12ZVM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330004#M10428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the MC9S12ZVM to control a BLDC motor with one pole pair. As the sample project didn't work out so well, I tried to make a simple project to have basic rotation.&lt;/P&gt;&lt;P&gt;I can move the rotor to every of the 6 possible hall sectors, I do this by simply just changing the PMFVAL0..6 with the corresponding PMFOUTB and PMFOUTC registers. Unfortunately when I try to put all the 6 stages into a loop, it seems that only two of the six stages can be applied.&lt;/P&gt;&lt;P&gt;In the reference manual I read that PMFVALx is buffered and needs the LDOK Signal. Inserted that after every change of PMFVALx but it doesnt make a difference. PMFOUTB and PMFOUTC are unbuffered, because PMFFCG1_ENCE is set to 0.&lt;/P&gt;&lt;P&gt;I also watched some the registers I'm writing to. It seems that every register gets its proper value, except for PMFOUTB which only seems to know two values.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Or what did I forget?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would really appreciate your help, many thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 11:18:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330004#M10428</guid>
      <dc:creator>erikwieser</dc:creator>
      <dc:date>2014-10-16T11:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with LDOK signal on S12ZVM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330005#M10429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, kindly attach your project here. It would be good to look in the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;iggi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 09:14:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330005#M10429</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2014-10-22T09:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Problem with LDOK signal on S12ZVM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330006#M10430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi iggi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the meantime I managed to move on a bit. The motor is now rotating. The only thing is that on every phase in each sector where there should be ground there is 12V now. Also I don't have a NC stage on the phases, only 12V or Complementary PWMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Code (had some difficulties to copy it into this editor):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;hidef.h&amp;gt; /* for EnableInterrupts macro */&lt;/P&gt;&lt;P&gt;#include "derivative.h" /* include peripheral declarations */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define PWM_MODULO 1200&lt;/P&gt;&lt;P&gt;#define PWM_DEADTIME 10&lt;/P&gt;&lt;P&gt;#define PWM_PRSCA 0&lt;/P&gt;&lt;P&gt;#define LED1 PTS_PTS4&lt;/P&gt;&lt;P&gt;#define LED2 PTS_PTS5&lt;/P&gt;&lt;P&gt;#define PWM 300&lt;/P&gt;&lt;P&gt;#define HIGH 1300&lt;/P&gt;&lt;P&gt;unsigned int period = 30;&lt;/P&gt;&lt;P&gt;unsigned char hall_pattern = 0;&lt;/P&gt;&lt;P&gt;unsigned char hall_a_input = 0;&lt;/P&gt;&lt;P&gt;unsigned char hall_b_input = 0;&lt;/P&gt;&lt;P&gt;unsigned char hall_c_input = 0;&lt;/P&gt;&lt;P&gt;//CW&lt;/P&gt;&lt;P&gt;unsigned char outb[6] = {0x7, 0xD, 0x1C, 0x34, 0x31, 0x13};&lt;/P&gt;&lt;P&gt;unsigned char outctl[6] = {0x0C, 0x03, 0x30, 0x0C, 0x03, 0x30};&lt;/P&gt;&lt;P&gt;unsigned int pmf0[6] = {PWM, HIGH, HIGH, HIGH, HIGH, PWM};&lt;/P&gt;&lt;P&gt;unsigned int pmf2[6] = {HIGH, PWM, PWM, HIGH, HIGH, HIGH};&lt;/P&gt;&lt;P&gt;unsigned int pmf4[6] = {HIGH, HIGH, HIGH, PWM, PWM, HIGH};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interrupt VectorNumber_Vtim0ch1 void TIMch1_ISR(void) {&lt;/P&gt;&lt;P&gt;hall_pattern = 0x07 &amp;amp; (PTIT &amp;gt;&amp;gt; 1);/* Capture Hall sensor pattern */&lt;/P&gt;&lt;P&gt;hall_a_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;0);&lt;/P&gt;&lt;P&gt;hall_b_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;1);&lt;/P&gt;&lt;P&gt;hall_c_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;switch(hall_pattern) {&lt;/P&gt;&lt;P&gt;case 0x6:&lt;/P&gt;&lt;P&gt;PMFOUTB = outb[0];&lt;/P&gt;&lt;P&gt;PMFOUTC = outctl[0];&lt;/P&gt;&lt;P&gt;PMFVAL0 = pmf0[0];&lt;/P&gt;&lt;P&gt;PMFVAL2 = pmf2[0];&lt;/P&gt;&lt;P&gt;PMFVAL4 = pmf4[0]; break;&lt;/P&gt;&lt;P&gt;case 0x4:&lt;/P&gt;&lt;P&gt;PMFOUTB = outb[1];&lt;/P&gt;&lt;P&gt;PMFOUTC = outctl[1];&lt;/P&gt;&lt;P&gt;PMFVAL0 = pmf0[1];&lt;/P&gt;&lt;P&gt;PMFVAL2 = pmf2[1];&lt;/P&gt;&lt;P&gt;PMFVAL4 = pmf4[1]; break;&lt;/P&gt;&lt;P&gt;case 0x5:&lt;/P&gt;&lt;P&gt;PMFOUTB = outb[2];&lt;/P&gt;&lt;P&gt;PMFOUTC = outctl[2];&lt;/P&gt;&lt;P&gt;PMFVAL0 = pmf0[2];&lt;/P&gt;&lt;P&gt;PMFVAL2 = pmf2[2];&lt;/P&gt;&lt;P&gt;PMFVAL4 = pmf4[2]; break;&lt;/P&gt;&lt;P&gt;case 0x1:&lt;/P&gt;&lt;P&gt;PMFOUTB = outb[3];&lt;/P&gt;&lt;P&gt;PMFOUTC = outctl[3];&lt;/P&gt;&lt;P&gt;PMFVAL0 = pmf0[3];&lt;/P&gt;&lt;P&gt;PMFVAL2 = pmf2[3];&lt;/P&gt;&lt;P&gt;PMFVAL4 = pmf4[3]; break;&lt;/P&gt;&lt;P&gt;case 0x3:&lt;/P&gt;&lt;P&gt;PMFOUTB = outb[4];&lt;/P&gt;&lt;P&gt;PMFOUTC = outctl[4];&lt;/P&gt;&lt;P&gt;PMFVAL0 = pmf0[4];&lt;/P&gt;&lt;P&gt;PMFVAL2 = pmf2[4];&lt;/P&gt;&lt;P&gt;PMFVAL4 = pmf4[4]; break;&lt;/P&gt;&lt;P&gt;case 0x2:&lt;/P&gt;&lt;P&gt;PMFOUTB = outb[5];&lt;/P&gt;&lt;P&gt;PMFOUTC = outctl[5];&lt;/P&gt;&lt;P&gt;PMFVAL0 = pmf0[5];&lt;/P&gt;&lt;P&gt;PMFVAL2 = pmf2[5];&lt;/P&gt;&lt;P&gt;PMFVAL4 = pmf4[5]; break;&lt;/P&gt;&lt;P&gt;default:&lt;/P&gt;&lt;P&gt;PMFOUTB = 0x0;&lt;/P&gt;&lt;P&gt;PMFOUTC = 0x3f; break; }&lt;/P&gt;&lt;P&gt;// Clear flag&lt;/P&gt;&lt;P&gt;TIM0TFLG1 = TIM0TFLG1_C1F_MASK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void main(void) {&lt;/P&gt;&lt;P&gt;/*********CPMU Init**************/&lt;/P&gt;&lt;P&gt;// Wait for stable supply after power up&lt;/P&gt;&lt;P&gt;while (GDUF_GLVLSF) {&lt;/P&gt;&lt;P&gt;GDUF_GLVLSF = 1; }&lt;/P&gt;&lt;P&gt;CPMUREFDIV_REFDIV = 0;&lt;/P&gt;&lt;P&gt;CPMUREFDIV_REFFRQ = 0;&lt;/P&gt;&lt;P&gt;CPMUSYNR_SYNDIV = 24;&lt;/P&gt;&lt;P&gt;CPMUSYNR_VCOFRQ = 1;&lt;/P&gt;&lt;P&gt;CPMUPOSTDIV_POSTDIV = 1;&lt;/P&gt;&lt;P&gt;while (CPMUIFLG_LOCK == 0) {}&lt;/P&gt;&lt;P&gt;//Clear PORF and LVRF&lt;/P&gt;&lt;P&gt;CPMURFLG&amp;nbsp; = 0x60;&lt;/P&gt;&lt;P&gt;/*********PIM Init**************/&lt;/P&gt;&lt;P&gt;// TIM0 input capture channel 1 is connected to logic XOR of PT1, PT2, PT3&lt;/P&gt;&lt;P&gt;MODRR2_T0IC1RR = 1;&lt;/P&gt;&lt;P&gt;// Hall sensor PT1, PT2, PT3 pull-ups enabled&lt;/P&gt;&lt;P&gt;PERT = 0x0E;&lt;/P&gt;&lt;P&gt;// Enable EVDD1&lt;/P&gt;&lt;P&gt;// PP0 +5V&lt;/P&gt;&lt;P&gt;PTP_PTP0 = 1;&lt;/P&gt;&lt;P&gt;// PP0 output&lt;/P&gt;&lt;P&gt;DDRP_DDRP0 = 1;&lt;/P&gt;&lt;P&gt;// PS4 output&lt;/P&gt;&lt;P&gt;DDRS_DDRS4 = 1;&lt;/P&gt;&lt;P&gt;// PS5 output&lt;/P&gt;&lt;P&gt;DDRS_DDRS5 = 1;&lt;/P&gt;&lt;P&gt;PTP_PTP1 = 1;&lt;/P&gt;&lt;P&gt;PTP_PTP2 = 1;&lt;/P&gt;&lt;P&gt;/*********TIM Init**************/&lt;/P&gt;&lt;P&gt;// TIM ch1 input capture&lt;/P&gt;&lt;P&gt;TIM0TIOS_IOS1 = 0;&lt;/P&gt;&lt;P&gt;// Precision timer disabled&lt;/P&gt;&lt;P&gt;TIM0TSCR1_PRNT = 0;&lt;/P&gt;&lt;P&gt;// TIM ch1 input capture on any edge&lt;/P&gt;&lt;P&gt;TIM0TCTL4_EDG1A = 1;&lt;/P&gt;&lt;P&gt;TIM0TCTL4_EDG1B = 1;&lt;/P&gt;&lt;P&gt;// Load prescaler value&amp;nbsp; &lt;/P&gt;&lt;P&gt;TIM0TSCR2_PR = 7;&amp;nbsp; &lt;/P&gt;&lt;P&gt;// Disconnect all output compare pins&lt;/P&gt;&lt;P&gt;TIM0OCPD = 0xFF; &lt;/P&gt;&lt;P&gt;// TIM ch1 interrupt enable TIM0TIE_C1I = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;// TIM global enable&lt;/P&gt;&lt;P&gt;TIM0TSCR1_TEN = 1;&lt;/P&gt;&lt;P&gt;/**********PMF Init************/&lt;/P&gt;&lt;P&gt;PMFCFG0_EDGEA = 1;&lt;/P&gt;&lt;P&gt;// Reload every PWM cycle&lt;/P&gt;&lt;P&gt;PMFFQCA = 0;&lt;/P&gt;&lt;P&gt;// PWM clock = core clock / PWM_PRSCA = 25MHz / PWM_PRSCA&lt;/P&gt;&lt;P&gt;PMFFQCA_PRSCA = PWM_PRSCA;&lt;/P&gt;&lt;P&gt;// Load modulo timer A&lt;/P&gt;&lt;P&gt;PMFMODA = PWM_MODULO;&lt;/P&gt;&lt;P&gt;// Load dead time timer A&lt;/P&gt;&lt;P&gt;PMFDTMA = PWM_DEADTIME;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PMFOUTC = 0x3F;&lt;/P&gt;&lt;P&gt;PMFENCA_PWMENA = 1;&lt;/P&gt;&lt;P&gt;/**********GDU Init************/&lt;/P&gt;&lt;P&gt;// Enable Charge pump GDUE_GCPE = 1;&lt;/P&gt;&lt;P&gt;// Set coil current limit to maximum 750mA&lt;/P&gt;&lt;P&gt;GDUBCL = 0x0F;&lt;/P&gt;&lt;P&gt;// Set boost frequency ~ 1MHz &lt;/P&gt;&lt;P&gt;GDUCLK1_GBOCD = 0b01100;&lt;/P&gt;&lt;P&gt;// Set duty cycle to 75%&lt;/P&gt;&lt;P&gt;GDUCLK1_GBODC = 0b11;&lt;/P&gt;&lt;P&gt;// Enable boost GDUE_GBOE = 1;&lt;/P&gt;&lt;P&gt;// Charge pump clock = fbus / 32&lt;/P&gt;&lt;P&gt;GDUCLK2_GCPCD = 2; &lt;/P&gt;&lt;P&gt;// Blanking time ~13us&lt;/P&gt;&lt;P&gt;GDUCTR = 0x13;&lt;/P&gt;&lt;P&gt;// GDU High level set to 26V&lt;/P&gt;&lt;P&gt;GDUCTR_GHHDLVL = 1;&lt;/P&gt;&lt;P&gt;// Desaturation level 1.35V&lt;/P&gt;&lt;P&gt;GDUDSLVL = 0x77;&lt;/P&gt;&lt;P&gt;// Enable pre-driver&lt;/P&gt;&lt;P&gt;GDUE_GFDE = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EnableInterrupts;&lt;/P&gt;&lt;P&gt;for(;;) {&lt;/P&gt;&lt;P&gt;__RESET_WATCHDOG(); /* feeds the dog */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(int i = 0; i &amp;lt; period; i++){}&lt;/P&gt;&lt;P&gt;if(PMFENCA_LDOKA == 0)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;PMFENCA_LDOKA = 1;&lt;/P&gt;&lt;P&gt;} /* loop forever */&lt;/P&gt;&lt;P&gt;/* please make sure that you never leave main */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned in OP I just want to create a simple rotation and fuly understand how the PMF works with all dependencies like PMFOUTC, PMFOUTB and PMFCFG_MSK and so on.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 13:17:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330006#M10430</guid>
      <dc:creator>erikwieser</dc:creator>
      <dc:date>2014-10-24T13:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with LDOK signal on S12ZVM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330007#M10431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I moved on a little further. Now I get a nice rotation and have ground where I have to have ground. The only thing now is, that always only two phases can have ground and PWM and not connected stages properly. The third phase seems to have PWM on the high gate but not on the low gate and there is never a ground stage on this phase. And on reset this "not properly looking" phase is working as it should but another is having that problem. Why is that?&lt;/P&gt;&lt;P&gt;I hope you understand my issue. If not I could eventually attach a screenshot from the oscillator.&lt;/P&gt;&lt;P&gt;Here is how the interrupt looks now (the rest of the code is still the same):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unsigned char outc[6] = {0x7, 0xD, 0x1C, 0x34, 0x31, 0x13};&lt;/P&gt;&lt;P&gt;unsigned char msk[6] = {0xC, 0x03, 0x30, 0x0C, 0x03, 0x30};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interrupt VectorNumber_Vtim0ch1 void TIMch1_ISR(void) {&lt;/P&gt;&lt;P&gt;hall_pattern = 0x07 &amp;amp; (PTIT &amp;gt;&amp;gt; 1);/* Capture Hall sensor pattern */&lt;/P&gt;&lt;P&gt;hall_a_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;0);&lt;/P&gt;&lt;P&gt;hall_b_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;1);&lt;/P&gt;&lt;P&gt;hall_c_input = 0x01 &amp;amp; (hall_pattern&amp;gt;&amp;gt;2);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;switch(hall_pattern) {&lt;/P&gt;&lt;P&gt;case 0x6:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 +msk[0];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[0]; break;&lt;/P&gt;&lt;P&gt;case 0x4:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[1];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[1]; break;&lt;/P&gt;&lt;P&gt;case 0x5:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[2];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[2]; break;&lt;/P&gt;&lt;P&gt;case 0x1:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[3];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[3]; break;&lt;/P&gt;&lt;P&gt;case 0x3:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[4];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[4]; break;&lt;/P&gt;&lt;P&gt;case 0x2:&lt;/P&gt;&lt;P&gt;PMFCFG2_MSK = 0x40 + msk[5];&lt;/P&gt;&lt;P&gt;PMFOUTC = outc[5]; break;&lt;/P&gt;&lt;P&gt;default:&lt;/P&gt;&lt;P&gt;PMFOUTB = 0x0;&lt;/P&gt;&lt;P&gt;PMFOUTC = 0x3f; break; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 12:32:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330007#M10431</guid>
      <dc:creator>erikwieser</dc:creator>
      <dc:date>2014-10-29T12:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Problem with LDOK signal on S12ZVM</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330008#M10432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;It’s not clear what the value of OUTB is. This is necessary to know to understand what output is there in the SW controlled channels.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Compared to our Hall sensor example code, the MSK and OUTC settings are reversed. Attached is the excel sheet with comparison.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Please note that the settings for each sector are actually shifted, if you compare the tables below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;This may be just due to a different assignment of the Hall sensor patterns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;iggi&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 10:56:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-with-LDOK-signal-on-S12ZVM/m-p/330008#M10432</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2014-10-31T10:56:57Z</dc:date>
    </item>
  </channel>
</rss>

