RF Transmiter FXTH87 Power consumption and reset issues

cancel
Showing results for 
Search instead for 
Did you mean: 

RF Transmiter FXTH87 Power consumption and reset issues

922 Views
Contributor II

Hello everyone! and thanks in advance for reading!

I have been working on the FXTH87 Tire pressure sensor but I have a problem first of all about Reset sources, because I am counting with the Z axis accelerometer every time it turns around (spinning), but for any reason the register that count it, suddenly returns to zero (chip reset!). I have worked, to solve this, over the COP timer and the Periodic hardware (PRST), Reset sources, but nothing change.

In the other hand, I have measured the power consumption on chip and I got 5mA with RF and UUMA peripherals ON, and 1,48mA in STOP1 MODE doing nothing on code! so that is sooo much! I don't know whether the problem of reset is generated in a problem in the chip about power, voltage,... I am using a power supply voltage and works fine but maybe the chip have problems in power consumption and forces it reset itself.

Thanks in advance!

Labels (2)
7 Replies

50 Views
Contributor II

Hi Juan,

I am trying the same and I am getting the same problem. How do you resolve that? (measure the spinning)

Thanks =)

0 Kudos

50 Views
Contributor III

Hi Juan, can you please explain the method you used for measuring these currents? How are you measuring the power consumption? Are you logging the current values somewhere?

0 Kudos

50 Views
NXP Employee
NXP Employee

Hello Juan,

 Please review the information below for a better understanding of the issue:

 - Are you using the TPMS FXTH87 Reference Project LF RF Communication CW10?

 - Have you considered to use the Schematic TPMS FXTH870911 315MHz as a reference for your device connections?   

 - Could you please read the SRS register? Could you please share your results?

 

Regards,

David

0 Kudos

50 Views
Contributor II

Hi and thank you!

Yes, I am using the TPMS FXTH87 Reference Project LF RF Communicaion CW10 now, because before I was using a library called ¨firmware.h¨ but now with this code example the reset was solved but I have another problem... The chip is not executing the code after turning off the chip, I mean, the code works good in transmition and there is not reset problem but I turn off the power supply and the turn it on and the code is not working now.

Because I transmit in 433 MHz I am using the Schematic TPMS FXTH87 434MHz (Figure 2-2. Typical reference demonstrator for FXTH87 434 MHz //  from PDF FXTH87EDRM)... or should I use the  Typical reference demonstrator for FXTH87 315 MHz??

 

About power consumption, I still have the same problem, In Stop1 mode and peripherals and GPIO off the chip consume around 2 mA and it should be, at least, 15 uA, please help me sloving this, with that consumption it is impossible to implement.

Thank you in advance!

This is the code I´m using

******************************************************************************  *   * TPMS FXTH87 LF RF Communication  * Data received by LF is processed  * The RF frame format and RF settings are compatible with the MKW01 receiver.   *   * user_configuration.h : contains the demo parameters configurable by the user  *   * MKW01_Communication.c : contains functions to process LF frame received and  * execute commands accordingly  *     ******************************************************************************/  /*  ******************************************************************************  *  *  Main.c - Code will reside in here.  *  ******************************************************************************  */ #include <hidef.h>                   /* for EnableInterrupts macro       */ #include "derivative.h"              /* include peripheral declarations  */ #include "main.h"                    #include "user_configuration.h" #include "dal.h"                      #include "szk_lf_data_detect.h" #include "szk_ff_tpm.h" #include "MKW01_Communication.h" #include "LED.h"  /*  ******************************************************************************  *  *                                  M A I N  *                          *            Choose demo parameters in user_configuration.h        *  ******************************************************************************  */  /* Be careful: LED5 and LED6 are driven by PTB0 and PTB1 which are also used in priority by the LF block   * So when the LF block is ON, LED5 and LED6 cannot be used.  * Choose in user_configuration.h to use LEDs or not.  */  unsigned long i=0; unsigned int c=0; int PACCZ=0,PACCX=0,P=0; UINT8 RESET @ 0x1800; UINT16 Z=0;  UINT8 u8Status=0x00; UINT16 gu16UUMA[5];// @ 0x01A1; UINT16 u16CompPressure; UINT16 u16CompAccelZ; UINT16 FrameID; UINT32 Tire_ID; UINT8 Firmware_Version; UINT8 Derivative_Descriptor; UINT8 TPMS_ID[6]; UINT8 LFDatagram[5]; UINT16 u16CompAccelX;  //UINT8  TPMS_CONT_ACCEL_GV  @ 0x008Eu; /* Embedded Firmware maps this location */ //UINT8  TPMS_INTERRUPT_FLAG @ 0x008Fu; /* Embedded Firmware maps this location */  UINT32 vueltas=0;   ///////////////////////////////////////////////////////////////////////////////////////////////////////////  UINT8 au8RFDataForCS[15] @ 0x0091; // Maximum length is 32 bytes; size of the RF buffer (in bytes)  void vfnSetupMCU(void); void RF_Setup(void); void InitTPM1CH0(void); void Send_RF_Datagram(void); void Code_Manchester_Frame(unsigned char *ptr); void vfnSetSTOPMode(UINT8 u8Mode); void tire_ID(void); void Init_LF(void); void Decode_LF_Datagram(void); void vfnSetPWU(void);  void main(void) {      UINT8 u8LFCount;      UINT8 u8LFFirst; //     DisableInterrupts;      u8LFFirst = LFDATA;       /* Config GPIO for setup */      vfnSetupGPIO();            vfnSetupMCU();          vfnSetPWU();          RF_Setup();i=0;        while(i<200){i++;}i=0;  // 5000(400ms)  -- 12500(1s)        tire_ID();        vueltas=0;PACCZ=0;PACCX=0;c=0; //       EnableInterrupts;      for (;;) {           __RESET_WATCHDOG();     /* feeds the dog */////////////////////////////////////////////////////////////////////////////////////////               RESET = CLEAR; //              while(i<10000){i++;}i=0;  // 5000(400ms)  -- 12500(1s) //              c++;                //              while(i<10000){i++;}i=0;  // 5000(400ms)  -- 12500(1s) //              c++;               RFCR2=0x0E; RFCR7_RFIACK = SET; //              u8Status=TPMS_READ_VOLTAGE(gu16UUMA); u8Status=TPMS_READ_TEMPERATURE(gu16UUMA);                    u8Status=TPMS_READ_PRESSURE(gu16UUMA,4); //          u8Status=TPMS_READ_ACCEL_X(gu16UUMA,2,0,7);           u8Status=TPMS_READ_ACCEL_Z(gu16UUMA,2,0,7); //TPMS_READ_ACCEL_Z(gu16UUMA,2,0,7);           u8Status=TPMS_COMP_PRESSURE(&u16CompPressure,gu16UUMA);           P=u16CompPressure>>1;           u8Status=TPMS_COMP_ACCEL_Z(&u16CompAccelZ,gu16UUMA); //TPMS_COMP_ACCEL_Z(&u16CompAccelZ,gu16UUMA);           PACCZ=u16CompAccelZ>>1;           Z=gu16UUMA[4];  // Z=gu16UUMA[4];            //          u8Status=TPMS_READ_ACCEL_X(gu16UUMA,2,0,7);  //TPMS_READ_DYNAMIC_ACCEL_Z(1,&u8Offset,UUMA); //        u8Status=TPMS_COMP_ACCEL_X(&u16CompAccelX,gu16UUMA); //         PACCX=u16CompAccelX>>1;           while(Z<315) //<27          Z<315      //  Z<309 (X)               { //                   DisableInterrupts;                    RFCR2=0x0E; RFCR7_RFIACK = SET;  // Clear all Flags            //         RESET = CLEAR;__RESET_WATCHDOG();     /* feeds the dog */ //               u8Status=TPMS_READ_VOLTAGE(gu16UUMA); u8Status=TPMS_READ_TEMPERATURE(gu16UUMA);                u8Status=TPMS_READ_PRESSURE(gu16UUMA,4); //               u8Status=TPMS_READ_ACCEL_X(gu16UUMA,2,0,7);                   u8Status=TPMS_READ_ACCEL_Z(gu16UUMA,2,0,7);  //TPMS_READ_ACCEL_Z(gu16UUMA,2,0,7);                   u8Status=TPMS_COMP_ACCEL_Z(&u16CompAccelZ,gu16UUMA); //TPMS_COMP_ACCEL_Z(&u16CompAccelZ,gu16UUMA);                   PACCZ=u16CompAccelZ>>1; // PTBD=1; //X=UUMA[3];           Z=gu16UUMA[4];  // Z=gu16UUMA[4]; //                  while(i<200){i++;}i=0;  // 5000(400ms)  -- 12500(1s) ///////////                   Send_RF_Datagram();TPMS_RF_WRITE_DATA_REVERSE(sizeof(au8RFDataForCS), &au8RFDataForCS[0u], 0);           //        TPMS_RF_READ_DATA_REVERSE(sizeof(READBuff), &READBuff[0], 0);           //        while(i<350){i++;}i=0;  // 5000(400ms)  -- 12500(1s) ///////////                   RFCR2 = 0x8E;           //        TPMS_RF_SET_TX(119);                   while(i<500){i++;}i=0;  // 5000(400ms)  -- 12500(1s) //////// i<400               }                              while(Z>295) //>17      Z>295       // Z>295 (X)               {           //         DisableInterrupts;                    RFCR2=0x0E; RFCR7_RFIACK = SET;  // Clear all Flags            //         RESET = CLEAR;__RESET_WATCHDOG();     /* feeds the dog */ //                   u8Status=TPMS_READ_VOLTAGE(gu16UUMA); u8Status=TPMS_READ_TEMPERATURE(gu16UUMA);                    u8Status=TPMS_READ_PRESSURE(gu16UUMA,4); //                   u8Status=TPMS_READ_ACCEL_X(gu16UUMA,2,0,7);                   u8Status=TPMS_READ_ACCEL_Z(gu16UUMA,2,0,7);  //TPMS_READ_ACCEL_Z(gu16UUMA,2,0,7);                   u8Status=TPMS_COMP_ACCEL_Z(&u16CompAccelZ,gu16UUMA); //TPMS_COMP_ACCEL_Z(&u16CompAccelZ,gu16UUMA);                   PACCZ=u16CompAccelZ>>1; // PTBD=0; //Z=UUMA[4];           Z=gu16UUMA[4];  // Z=gu16UUMA[4]; //                  while(i<200){i++;}i=0;  // 5000(400ms)  -- 12500(1s) ///////////                   Send_RF_Datagram();TPMS_RF_WRITE_DATA_REVERSE(sizeof(au8RFDataForCS), &au8RFDataForCS[0u], 0);           //        TPMS_RF_READ_DATA_REVERSE(sizeof(READBuff), &READBuff[0], 0);           //        while(i<350){i++;}i=0;  // 5000(400ms)  -- 12500(1s) ///////////                   RFCR2 = 0x8E;           //        TPMS_RF_SET_TX(119);                   while(i<500){i++;}i=0;  // 5000(400ms)  -- 12500(1s) //////// i<400               }               vueltas++; //// Turn it around                  } }  /*  ******************************************************************************  *  *                        vfnSetSTOPMode  *  ******************************************************************************  */ void vfnSetSTOPMode(UINT8 u8Mode) {      /*       Table 3-1. Stop Mode Selection       SIMPOT1  SPMSC2   SPMSC1        BDCSCR       STOPE    PDC      LVDE & LVDSE  ENBDM   Stop Mode       0       x        x             x      Stop modes disabled; illegal opcode reset if STOP instruction executed       1       1        0             0      Stop1       1       x        1             x      Stop4       1       x        x             1      Stop4 with BDM       */      if (u8Mode == STOP1 ) {           SPMSC2 |= SPMSC2_PDC_MASK;           SPMSC1 = (SPMSC1 | SPMSC1_LVDE_MASK)                     & (UINT8) (~((UINT8) (SPMSC1_LVDSE_MASK | SPMSC1_BGBE_MASK)));      } else if (u8Mode == STOP4 ) {           SPMSC2 |= SPMSC2_PDC_MASK;           /* Use BGBE for accurate ADC measurements */           SPMSC1 |= (SPMSC1_LVDSE_MASK | SPMSC1_LVDE_MASK | SPMSC1_BGBE_MASK);      } else {           /* Do nothing */      } } /*  ******************************************************************************  *  *                        vfnSetPWU  *  ******************************************************************************  */ void vfnSetPWU(void) {      /* Configure PWU for a periodic wake-up */      PWUCS0 = 0x1Fu;      PWUCS1 = CLEAR;      PWUDIV = 0x1Fu;       return; }  /*  ******************************************************************************  *  vfnSetupGPIO  ******************************************************************************  */ void vfnSetupGPIO(void) {       // All GPIOs are inputs      PTADD = 0x00;      PTBDD = 0x00;       //     SIMOPT1 = 0X33;//0x33//Disable WDT, Enable Debug BDM, Stop Enable, RF (DIS)(En)able.   0x23(RF Disable)  0x21(No Debug) //            SIMOPT2 = 0X00; // 0x00 Clock BUSCLK 4Mhz   // 0X73  //0X03 //       /*BUSCLKS 00 bUS fREQUENCY = 4Mhz*/ //            SRS = 0x00; //            PWUCS1 = 0x00;       return; }  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void vfnSetupMCU(void)//Archivos de configuracion inicial del FXTH87 Puerto D como salida puerto D apagado y configuracion inicial de registros {        SIMOPT1 = 0X33;//0x33//Disable WDT, Enable Debug BDM, Stop Enable, RF Enable.   0X13  0x11 ////// 0X31        SIMOPT2 = 0X00; // 0x00 Clock BUSCLK 4Mhz  //  0X70   /*BUSCLKS 00 bUS fREQUENCY = 4Mhz*/ //       SRS = 0x00; //       PWUCS1 = 0x00; }  void RF_Setup(void) { //     DisableInterrupts; //      TPMS_RF_ENABLE(1);          RFCR0 = 0x33;      //0x33 Data sent to 9615.4 bps          //  0x19 (19230.8 bps)          RFCR1 = 0x77;    //0x64 set to 38 for 56 bits          RFCR2 = 0x0E;    // RF Transmission OFF - No EOM - Pout=8dBm    - RPAGE=0                          // 00001110    0x14 //         RFCR2 = 0x8E;  //RF Transmission ON - No EOM - Pout=8dBm    - RPAGE=0                                       0x94              RFCR3 = 0x00;    //0x00 RF Output Low - RF Power UP - One Frame Transmitted                          // 00000000              RFCR4 = 0x05;     //0x05 Interframe timing set to 5ms /////////////////////////////////////////////////////////////////////              RFCR5 = 0x00;     //0x80 No Pseudo-random number used VCO highest power consumption level              RFCR6 = 0x01;     //VCO highest Power - interframe timing                          // was 00              RFCR7 = 0x00;     // RF Interrupt (Dis)Enabled - LVD Disable - RFM Not reset               // fDATA0=fXTAL x ((12 + 4 x CF) + AFREQ/8192)              //       = 26MHz x((12 + 4 x 1) + 5644 (10110000 01100) /8192)       /// 5009 (10011101 10001) 431.8977MHz              //       = 433.9131               // fDATA1=fXTAL x ((12 + 4 x CF) + BFREQ/8192)              //       = 26MHz x((12 + 4 x 1) + 5674 (10110001 01010) /8192)       /// 5041 (10011100 10001) 432.0024MHz              //       = 434.0083                // 434.0083 - 433.9131 = 47.6kHz  (x2 95.2 kHz)               /* 434MHz */             PLLCR0=0x9D;// 0xB0 1011 0000                                                              // 0x9D (431.8977MHz)                             //  AFREQ[12:5]              PLLCR1=0x8E;// 0x62  01100    0   10                                                       // 0x8E (431.8977MHz) (POL=1)  8A (POL=0)                             //  AFREQ[4:0] POL CODE[1:0]                              PLLCR2=0x9C;// 0xB1 10110001                                                               // 0x9C (432.0024MHz)              PLLCR3=0x8E;// 0x56 01010 110  CF=1 434MHz   MOD=1 FSK   CKREF=0 DX signal not generated   // 0x8E (432.0024MHz)          //PLLCR3=0x54;   // 01010 100  CF=1 434MHz   MOD=0 OOK   CKREF=0 DX signal not generated               //        EnableInterrupts; }  void InitTPM1CH0(void) { TPM1SC=0x08 | 0x02;// 4F CLOCK TIMER = FBUS=8MHz/128 - set Timer ON TPM1C0SC=0x00; //Configure in TBM , Interrupt Enable address TPM1MODH=0xFF; // FF Fixed the OC every 1.13sec TPM1MODL=0xFF;// FF Fixed the OC every 1.13sec }  void Send_RF_Datagram(void) { //unsigned char i; //DisableInterrupts; /* Specific data’s for MC33696 */      au8RFDataForCS[0]=0xAA;      au8RFDataForCS[1]=0xAA; // AA 10101010 needed to understain that the rest are DATA’s      au8RFDataForCS[2]=0xAA;  // (UINT8) (vueltas >> 24u); //       /* End of Specific data’s for MC33696 */      au8RFDataForCS[3]=(UINT8) (u16CompPressure >> 8u); // Pressure kPA      au8RFDataForCS[4]=(UINT8) (u16CompPressure);       // Pressure kPA      au8RFDataForCS[5]=0xAA;            au8RFDataForCS[6]=(UINT8) (vueltas >> 16u); //            au8RFDataForCS[7]=(UINT8) (vueltas >> 8u);      au8RFDataForCS[8]=(UINT8) (vueltas);      au8RFDataForCS[9]=(UINT8) (Tire_ID >> 24u);                // Tire ID      au8RFDataForCS[10]=(UINT8) (Tire_ID >> 16u);           // Tire ID      au8RFDataForCS[11]=(UINT8) (Tire_ID >> 8u);                   // Tire ID      au8RFDataForCS[12]=(UINT8) (Tire_ID);                      // Tire ID      au8RFDataForCS[13]=0xAA; // (UINT8) (vueltas >> 24u); //        au8RFDataForCS[14]=0xAA; //au8RFDataForCS[15u]=(UINT8) (PACCZ); //au8RFDataForCS[16u]=0xAA; //RFD21=Tx; //RFD32=Tx; InitTPM1CH0(); //RFCR7_RFIACK=1; // Clear all Flags //while(i<2500){i++;}i=0;  // 5000(400ms)  -- 12500(1s) //EnableInterrupts; }  void tire_ID(void) {      TPMS_READ_ID (TPMS_ID); // execution time = 512µs      Firmware_Version = TPMS_ID[0];      Derivative_Descriptor = TPMS_ID[1];      Tire_ID = 0;      Tire_ID |= TPMS_ID[2];      Tire_ID <<= 8;      Tire_ID |= TPMS_ID[3];      Tire_ID <<= 8;      Tire_ID |= TPMS_ID[4];      Tire_ID <<= 8;      Tire_ID |= TPMS_ID[5]; }  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////  /*  ******************************************************************************  *  *  End of file.  *  ******************************************************************************  */
0 Kudos

50 Views
NXP Employee
NXP Employee

Hello Juan,

I am glad to know that the reset issue is solved.

- Once the reference project mentioned before is downloaded, please review the follow the guide attached to this response. The Chapter 2 shows how to program the device. Could you please follow such guide and share your results once the device is flashed?

 

- You may keep using the typical reference demonstrator for FXTH87 at 434 MHz mentioned on the Reference Design. Please let me know if you have any further complication.

 

- The STOP1 refers to a power down of most internal circuits, including RAM, for maximum power savings; voltage regulator in standby. Such current, 15uA is too much. Could you please give us a brief description of your measurement procedure?

Please review the chapter 17.4 from datasheet to review the power consumptions based on the power mode.

I hope this information helps.

Regards,

David

0 Kudos

50 Views
Contributor II

Somebody know how to get the measurements WITHOUT Firmware Calls?

0 Kudos

50 Views
Contributor II

I am focusing on Reset sources, and the only 2 Reset sources that I have problems are "illegal Address" and "Low Voltage Detect". The first one (illegal Address) is the more responsible about Resets. If I don't use a Firmware subroutine like "u8Status=TPMS_READ_ACCEL_Z(UUMA,2,0,7);", the Reset problem is solved... But you know this is not a solution... 

I've communicated this chip with a receiver RFM69HCW, but the only thing I need is that the chip does not reset itself.

0 Kudos