Unable to control PTB9 pad via GPIO or FTM1CH1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to control PTB9 pad via GPIO or FTM1CH1

Jump to solution
811 Views
paulholmquist
Contributor I

I'm trying to configure PTB9 for FlexTimer Channel 1 output (IOMUX-MODE=ALT1).  When that didn't work I tried to manualy control PTB9 via GPIO which also fails (IOMUX-MODE = ALT0).

Then I noticed that PTB9 is part of a daisy-chain and I can't seem to control any pad that is in a daisy-chain.  I was able to control PTB14 via GPIO which is close to PTB9 but PTB14 is NOT in a daisy-chain.  However, even when I tried to set the daisy-chain for ALT1 (same as its reset value) it still doesn't output FTM1Ch1 signal although I've verified the flex timer is running/counting per the CNT register and flags (using EPWM mode).

I've reviewed the vybrid manual several times and triple-checked the location for PTB9 on tower board ( attaching scope probe to J9.37 on Primary expansion board).

For GPIO I use the following mux config code:

   IOMUXC_PTB9 &= ~IOMUXC_RGPIO_MUX_MODE_MASK; // clear all mode bits  

   IOMUXC_PTB9 |= IOMUXC_RGPIO_MUX_MODE(0); // ALT0 is GPIO output

For FTM1Ch1 I use the following mux config code:

   IOMUXC_PTB9 &= ~IOMUXC_RGPIO_MUX_MODE_MASK; // clear all mode bits  

   IOMUXC_PTB9 |= IOMUXC_RGPIO_MUX_MODE(1); // ALT1 is FTM1Ch1 output  

   IOMUXC_FLEXTIMER1_IPP_IND_FTM_CH_1_SELECT_INPUT &= ~(IOMUXC_FLEXTIMER1_IPP_IND_FTM_CH_1_SELECT_INPUT_DAISY_MASK);

So is there some other register I need to configure to get any of the daisy-chain pads like PTB9 to work?

Tags (4)
0 Kudos
1 Solution
616 Views
anthony_huereca
NXP Employee
NXP Employee

Hi Paul,

  What code are you using? The register nomenclature does not match the sample code. If you're using old register names, the IOMUX_PTB9 register does not actually control the PTB9 pin. This is obviously very confusing, which is why it was changed in later reference manuals and register definitions. Also B37 on the elevator board is not connected to PTB9 since the resistor R15 is not populated.

  Using the latest sample code, the following code will enable PTB9 as an output and toggle it on and off:

  IOMUXC->SINGLE.PTB9 = IOMUXC_PTB9_DSE(0x1)| IOMUXC_PTB9_OBE_MASK; //enable GPIO output for PTB9

GPIO0->PTOR|=PIN(31);

  This was verified by putting a multimeter on J13 pin 1.

Regards,

Anthony

View solution in original post

0 Kudos
1 Reply
617 Views
anthony_huereca
NXP Employee
NXP Employee

Hi Paul,

  What code are you using? The register nomenclature does not match the sample code. If you're using old register names, the IOMUX_PTB9 register does not actually control the PTB9 pin. This is obviously very confusing, which is why it was changed in later reference manuals and register definitions. Also B37 on the elevator board is not connected to PTB9 since the resistor R15 is not populated.

  Using the latest sample code, the following code will enable PTB9 as an output and toggle it on and off:

  IOMUXC->SINGLE.PTB9 = IOMUXC_PTB9_DSE(0x1)| IOMUXC_PTB9_OBE_MASK; //enable GPIO output for PTB9

GPIO0->PTOR|=PIN(31);

  This was verified by putting a multimeter on J13 pin 1.

Regards,

Anthony

0 Kudos