TPMS bit timing

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

TPMS bit timing

Jump to solution
715 Views
kumaichi
Contributor III

Hello All,

I'm trying to match an OEM TPMS sensors bit timing using a FXTH87E sensor.  I modified the getting started project, FXTH87_E_FW_Periodic_RF_Tx.

The issue I'm seeing, I'm trying to achieve ~25us bit timing for the data being sent but I have bits that are ~50us and others that are ~25us.  I have tried doubling the Data Rate via RFCR0 to ~40 kbits which fixed the preamble but then I end up with bits that are ~13us.  I'm using Manchester encoding as well.

I can't seem to figure out the correct settings to have the bits all at the same data rate.  I have attached my main.c as well as two logic analyzer captures, one of the OEM TPMS sensor and mine.  I'm trying to duplicate a packet length of ~5ms and bit timing of ~25us.  I'm currently getting a packet length of ~7ms and a variable bit timing of ~50us and ~25us.

Any suggestions would be greatly appreciated.

Kindest regards.

0 Kudos
Reply
1 Solution
590 Views
kumaichi
Contributor III

I believe I've made progress after many hours of experimentation.  I know that the data is Manchester encoded.  Knowing this, I used NRZ so that I could achieve the consistent bit timing of 25us for a single bit and 50us for two consecutive bits.  I then proceeded to encode the data bytes using Manchester encoding.  After a lot of trial and error I was able to duplicate the OEM data packet and could decode it successfully via my receiver.  Thank you for your guidance while I struggled to get this working.

Please consider this issue resolved.

Kindest regards,

Craig

View solution in original post

0 Kudos
Reply
3 Replies
651 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Craig,

From the code in the main, 136 bits are transmitted at a data rate of 19200 bps (RFCR0 configuration). This makes a transmission time of 136/19200 = 7 ms. So from the code, it is completely expected to have a frame lasting 7 ms and not 5 ms.

With a data rate of 19200 bps, one bit lasts ~50 us. From the RF configuration, Manchester encoding is selected at 434 MHz. And in Manchester, there is a high-to-low or low-to-high transition at the middle of the bit (so after ~25 us). It means that a low or high state can last either 25 us or 50 us.

I copied below the extract from the manual (UM11227) showing Manchester encoding.

1.png

So the waveform captured matches the configuration done in the main.c, there is nothing unusual.

BRs, Tomas

0 Kudos
Reply
616 Views
kumaichi
Contributor III

Hello Tomas,

Thank you for your detailed response.  The OEM sensor, that is also using an FXTH87E, must not be using a standard way of sending the data?  The logic analyzer capture below doesn't have transitions like what is displayed in UM11227.  As far as I can tell, consecutive 0's and 1's aren't creating a transition, it just holds the same value for two cycles i.e. ~50us.  The decoded capture is:

010101010101010101010010110010101010101

kumaichi_0-1764305322055.png

 

Is it possible they are somehow modifying the data being sent to create the above data with consecutive bits doubling the bit timing without a transition?  I have tried using the different CODE[1:0] settings and I've also increased the bit timing to 40 kbit to get the ~25us bit timing but it did not remove the transitions.  I apologize for the simple questions; this is my first attempt at trying to duplicate a packet of data.  Any further guidance would be greatly appreciated.

Kindest regards,

Craig

0 Kudos
Reply
591 Views
kumaichi
Contributor III

I believe I've made progress after many hours of experimentation.  I know that the data is Manchester encoded.  Knowing this, I used NRZ so that I could achieve the consistent bit timing of 25us for a single bit and 50us for two consecutive bits.  I then proceeded to encode the data bytes using Manchester encoding.  After a lot of trial and error I was able to duplicate the OEM data packet and could decode it successfully via my receiver.  Thank you for your guidance while I struggled to get this working.

Please consider this issue resolved.

Kindest regards,

Craig

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2247501%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ETPMS%20bit%20timing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2247501%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3EI'm%20trying%20to%20match%20an%20OEM%20TPMS%20sensors%20bit%20timing%20using%20a%20FXTH87E%20sensor.%26nbsp%3B%20I%20modified%20the%20getting%20started%20project%2C%26nbsp%3BFXTH87_E_FW_Periodic_RF_Tx.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20issue%20I'm%20seeing%2C%20I'm%20trying%20to%20achieve%20~25us%20bit%20timing%20for%20the%20data%20being%20sent%20but%20I%20have%20bits%20that%20are%20~50us%20and%20others%20that%20are%20~25us.%26nbsp%3B%20I%20have%20tried%20doubling%20the%20Data%20Rate%20via%20RFCR0%20to%20~40%20kbits%20which%20fixed%20the%20preamble%20but%20then%20I%20end%20up%20with%20bits%20that%20are%20~13us.%26nbsp%3B%20I'm%20using%20Manchester%20encoding%20as%20well.%3C%2FP%3E%3CP%3EI%20can't%20seem%20to%20figure%20out%20the%20correct%20settings%20to%20have%20the%20bits%20all%20at%20the%20same%20data%20rate.%26nbsp%3B%20I%20have%20attached%20my%20main.c%20as%20well%20as%20two%20logic%20analyzer%20captures%2C%20one%20of%20the%20OEM%20TPMS%20sensor%20and%20mine.%26nbsp%3B%20I'm%20trying%20to%20duplicate%20a%20packet%20length%20of%20~5ms%20and%20bit%20timing%20of%20~25us.%26nbsp%3B%20I'm%20currently%20getting%20a%20packet%20length%20of%20~7ms%20and%20a%20variable%20bit%20timing%20of%20~50us%20and%20~25us.%3C%2FP%3E%3CP%3EAny%20suggestions%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3EKindest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2250144%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20TPMS%20bit%20timing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2250144%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Craig%2C%3C%2FP%3E%0A%3CP%3EFrom%20the%20code%20in%20the%20main%2C%20136%20bits%20are%20transmitted%20at%20a%20data%20rate%20of%2019200%20bps%20(RFCR0%20configuration).%20This%20makes%20a%20transmission%20time%20of%20136%2F19200%20%3D%207%20ms.%20So%20from%20the%20code%2C%20it%20is%20completely%20expected%20to%20have%20a%20frame%20lasting%207%20ms%20and%20not%205%20ms.%3C%2FP%3E%0A%3CP%3EWith%20a%20data%20rate%20of%2019200%20bps%2C%20one%20bit%20lasts%20~50%20us.%20From%20the%20RF%20configuration%2C%20Manchester%20encoding%20is%20selected%20at%20434%20MHz.%20And%20in%20Manchester%2C%20there%20is%20a%20high-to-low%20or%20low-to-high%20transition%20at%20the%20middle%20of%20the%20bit%20(so%20after%20~25%20us).%20It%20means%20that%20a%20low%20or%20high%20state%20can%20last%20either%2025%20us%20or%2050%20us.%3C%2FP%3E%0A%3CP%3EI%20copied%20below%20the%20extract%20from%20the%20manual%20(UM11227)%20showing%20Manchester%20encoding.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20735px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20735px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20735px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20735px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367532i36202B134F5B9067%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.png%22%20alt%3D%221.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESo%20the%20waveform%20captured%20matches%20the%20configuration%20done%20in%20the%20main.c%2C%20there%20is%20nothing%20unusual.%3C%2FP%3E%0A%3CP%3EBRs%2C%20Tomas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2250793%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20TPMS%20bit%20timing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2250793%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Tomas%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20detailed%20response.%26nbsp%3B%20The%20OEM%20sensor%2C%20that%20is%20also%20using%20an%20FXTH87E%2C%20must%20not%20be%20using%20a%20standard%20way%20of%20sending%20the%20data%3F%26nbsp%3B%20The%20logic%20analyzer%20capture%20below%20doesn't%20have%20transitions%20like%20what%20is%20displayed%20in%20UM11227.%26nbsp%3B%20As%20far%20as%20I%20can%20tell%2C%20consecutive%200's%20and%201's%20aren't%20creating%20a%20transition%2C%20it%20just%20holds%20the%20same%20value%20for%20two%20cycles%20i.e.%20~50us.%26nbsp%3B%20The%20decoded%20capture%20is%3A%3CBR%20%2F%3E%3CBR%20%2F%3E010101010101010101010010110010101010101%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22kumaichi_0-1764305322055.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kumaichi_0-1764305322055.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22kumaichi_0-1764305322055.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367697iB3EC8BE6F5088E8D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22kumaichi_0-1764305322055.png%22%20alt%3D%22kumaichi_0-1764305322055.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIs%20it%20possible%20they%20are%20somehow%20modifying%20the%20data%20being%20sent%20to%20create%20the%20above%20data%20with%20consecutive%20bits%20doubling%20the%20bit%20timing%20without%20a%20transition%3F%26nbsp%3B%20I%20have%20tried%20using%20the%20different%20CODE%5B1%3A0%5D%20settings%20and%20I've%20also%20increased%20the%20bit%20timing%20to%2040%20kbit%20to%20get%20the%20~25us%20bit%20timing%20but%20it%20did%20not%20remove%20the%20transitions.%26nbsp%3B%20I%20apologize%20for%20the%20simple%20questions%3B%20this%20is%20my%20first%20attempt%20at%20trying%20to%20duplicate%20a%20packet%20of%20data.%26nbsp%3B%20Any%20further%20guidance%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3EKindest%20regards%2C%3C%2FP%3E%3CP%3ECraig%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2251491%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20TPMS%20bit%20timing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2251491%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20believe%20I've%20made%20progress%20after%20many%20hours%20of%20experimentation.%26nbsp%3B%20I%20know%20that%20the%20data%20is%20Manchester%20encoded.%26nbsp%3B%20Knowing%20this%2C%20I%20used%20NRZ%20so%20that%20I%20could%20achieve%20the%20consistent%20bit%20timing%20of%2025us%20for%20a%20single%20bit%20and%2050us%20for%20two%20consecutive%20bits.%26nbsp%3B%20I%20then%20proceeded%20to%20encode%20the%20data%20bytes%20using%20Manchester%20encoding.%26nbsp%3B%20After%20a%20lot%20of%20trial%20and%20error%20I%20was%20able%20to%20duplicate%20the%20OEM%20data%20packet%20and%20could%20decode%20it%20successfully%20via%20my%20receiver.%26nbsp%3B%20Thank%20you%20for%20your%20guidance%20while%20I%20struggled%20to%20get%20this%20working.%3C%2FP%3E%3CP%3EPlease%20consider%20this%20issue%20resolved.%3C%2FP%3E%3CP%3EKindest%20regards%2C%3C%2FP%3E%3CP%3ECraig%3C%2FP%3E%3C%2FLINGO-BODY%3E