Quadrature Decoder TWR-KV46F150M

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

Quadrature Decoder TWR-KV46F150M

1,874 Views
masumburakşahin
Contributor II

Hi Everybody,

Because of my English is not enough, i couldn't explain my question previous time. I tried to make my sentences clear.

I  am working on reading position information from the quadrature encoder. I have twr-kv46f150m, twr-elev and twr-mc-lv3ph boards and try to run my codes on this setup. I am using MCUXpresso as IDE.

When is check the schematics of the PCB's i see that quad. encoder signals are tied to ch4 and ch6 of FTM3.

My problem is that FTM3_CNT is not increasing when I turn the shaft of the BLDC.

This is the code I have used:

#include <stdio.h>
#include "board.h"
#include "peripherals.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "MKV46F16.h"
#include "fsl_ftm.h"
#include "fsl_port.h"

BOARD_InitBootPins();    //PORT C ADJUSTED
BOARD_InitBootClocks();    //CLOCK SETTİNGS
BOARD_InitDebugConsole();    /* Init FSL debug console. */


ftm_config_t Ftm;
FTM_GetDefaultConfig(&Ftm);    //RESET VALUE
FTM_Init(FTM3, &Ftm);

ftm_phase_params_t ftm_phase;
ftm_phase.enablePhaseFilter = false;
// ftm_phase.phaseFilterVal = 1;
ftm_phase.phasePolarity = kFTM_QuadPhaseNormal;
FTM_SetQuadDecoderModuloValue(FTM3, 0U, 1000U);
FTM_SetupQuadDecode(FTM3, &ftm_phase, &ftm_phase, kFTM_QuadPhaseEncode);

Any suggestion?

Thank you,

Masum Burak

Labels (1)
5 Replies

1,421 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

I am afraid you have to select FTM1 module which support Quadrature Decoder mode.

You can only find FTM1_QD_PHA and FTM1_QD_PHB in "11.5 KV4x Signal Multiplexing and Pin Assignments" of KV4XP100M168RM.

40.1 Chip-specific FTM information.png

Table 40-2. FTM signal descriptions.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,421 Views
masumburakşahin
Contributor II

When I look at the twr-elev and twr-mc-lv3ph schematics, the position information from the encoder comes to the channels of FTM3.

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

This documents are found these websites.

Search Results: SCH-26820 

 

https://cache.nxp.com/downloads/en/schematics/TWR-ELEV-PRI-SCH.pdf?fsrch=1&sr=1&pageNum=1 

 

Search Results: TWRKV46F150M_SCH 

the incoming signal reaches Ftm3.

Any suggestion? 

Thank you?

0 Kudos
Reply

1,421 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

The Get Started of TWR-MC-LV3PH shows: Quick Start for the TWR-MC-LV3PH using the TWR-KV31F120M Controller Card.

TWR-MC-LV3PH TWR-KV31F120M.png
I have check the A33 and A34 of TWR-KV31F120M_SCH, these two pins are connect to FTM1_QD_PHA and FTM1_QD_PHB(does support Quadrature Decoder mode).

A33 A34 TWR-KV31F120M.png

But when using the TWR-KV46F150M Controller Card, these two pins are connect to FTM3(do not support Quadrature Decoder mode).
Sorry for the inconvenience!

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,421 Views
masumburakşahin
Contributor II

Hi Robin,

Thank you for your information. I understand that KV46F is not compatible with LV3PH. LV3PH only compatible with KV31? 

I apologize for keeping you busy

Best Regards,

Masum Burak 

0 Kudos
Reply

1,421 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

As is standard with all Tower System modules, the TWR-MC-LV3PH is interchangeable across the development platform and can be used with many existing modules including: TWR-K60N512, TWR-56F8257, TWR-K40X256, TWR-KV46F150M, TWR-KV31F120M, TWR-KV10Z32 and TWR-KV11Z75M.

But for this situation, you may need to route these signals to FTM1(support Quadrature Decoder) of TWR-KV46F150M by yourself.

Best Regards,

Robin