This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

local trimming for 3D LF wake receiver and some docu questions ....

Part Number: RF430F5978
Other Parts Discussed in Thread: MSP430F123, , TMS37126, TMS37F128

We have to replace a MSP430F123 + TMS37122 + sub 1GHz module with the RF430F5978.

The LF communication consists of a 16-bit wakeup pattern with 24 bits of additional data, we don't want/need the transponder functionality !

We are currently testing using out own prototype hw and the source code supplied with the EVM.

We have to cope with an existing hw environment using a 125khz LF xmitter to trigger the LF wakeup. This worked fine with the TMS37122 and we already adjusted the wakeup sequence to the S10 prefix and the bit-timing required for the RF430F5978. And it seems that only with some external Cs on the antennas, we are able to trigger the wakeup receiver (+2 data bits) already (using 125kHz !).

We now want/need to trim the resonance freq. of the 3D wake receiver to the 125khz. As the MRD2 contained in the EVM cannot handle anything besides 134khz, we need to do the trimming locally via SPI and CLK_OUT only. The documentation  (24.11.3.4) is not very specific to when and how long the 125khz has to be sent, if LF wake is required first or when to measure, etc. ....

The rudimentary SPI trimming code in the EVM's source code is also not very helpful. The source code also hints that it is possible to route the CLK_OUT to an external pin (P2.5) but this cannot be found anywhere in the documentation (info on MEM[7:15] is missing !). Maybe there are other signals, which can be routed to pins for testing (EOB) ?

While implementing the wakeup sequence we could also not find any definition of Twake (figure 24-83) (only something similar Twakeup is mentioned in the datasheet ?) or the RSSI burst length/EOF delay required (figure 24-118) , the chapter 2.4.6.5 (data reception) is absent/empty, the Tspi_timeout in 24.9.1.3 is nowhere to find even though this is a vital parameter for the RAIDAES communication !!

We now need a sketch on how to perform local trimming under the above conditions ...

Anynone have an idea/example code ?

Regards

Benno

  • Hello Benno,

    a lot of question and will try to help with that. I see that the documentation is definitely missing a few things.

    For the Twake time you are right this is the Twakeup time which is specified as min. 500us and typ. 560us.

    The SPI timeout is specified with min. 220ms and typ. 286ms.

    Regarding the trimming I have to check what is possible and if there is a way to switch out the CLK_OUT or if there is a different way to do the trimming.

    I will check that with a colleague and come back to you the next days.

    Best regards,

    Helfried 

  • Thanks for Your efforts ...

    In the meantime, we compared the TMS37122 and RF430F59xx documentation and it now seems to us, that the trimming does not require an external signal, but oscillation is triggered internally by the OSCM_EN (see figure 24-111) !

    We put together a small routine (see below) using the already available routines in RAIDAES.c but the CLK_OUT signal seems to be the culprit, as we always end up waiting for a CLK_OUT timer capture interrupt, which never occurs :-(

    Timer/Clock etc. is running maybe the CLK_OUT signal routing/setup in the 3D LFE is at fault/incomplete/wrong .....

    We even used the EVM module, to make sure our hw is not at fault, but the same result ......

    It always hangs in the first TrimChan() waiting for the TIMER1_A0 interrupt....

    void do_trim( void )
    {
            int trrc;
    
            VCLdiode_ON;                                    // charge VCL to VBAT-Vdiode~2.6V
            CMDStatusRead( &cr_stat );
    
            SPI_LFTrim(ANT1, 0x00);
            SPI_LFTrim(ANT2, 0x00);
            SPI_LFTrim(ANT3, 0x00);
            //-- VCLdiode_OFF;                                   // disable VCL charging
    
            printf( "LF-TRIM: Done Clear.\n" );
    
            CMDStatusRead( &cr_stat );
            trrc = TrimChan( ANT1 );
            printf( "LF-TRIM: ANT%d = %d trim= %x\n", ANT1+1, trrc, ucTrimBytes[ANT1] );
    
            CMDStatusRead( &cr_stat );
            trrc = TrimChan( ANT2 );
            printf( "LF-TRIM: ANT%d = %d trim= %x\n", ANT2+1, trrc, ucTrimBytes[ANT2] );
    
            CMDStatusRead( &cr_stat );
            trrc = TrimChan( ANT3 );
            printf( "LF-TRIM: ANT%d = %d trim= %x\n", ANT3+1, trrc, ucTrimBytes[ANT3] );
    
    
            //-- VCLdiode_ON;                                    // charge VCL to VBAT-Vdiode~2.6V
            CMDStatusRead( &cr_stat );
            SPI_LFTrim( ANT1, ucTrimBytes[ANT1] );
            SPI_LFTrim( ANT2, ucTrimBytes[ANT2] );
            SPI_LFTrim( ANT3, ucTrimBytes[ANT3] );
            VCLdiode_OFF;                                   // disable VCL charging
    
            printf( "LF-TRIM: saved.\n" );
    }
    

    Best regards

    Benno

  • Hello Benno,

    in this tread there is the EVM firmware (slcr002.zip) which contains in the file RAIDAES.c also the trimming routine.

    Is this the same firmware (V1.1) you already have?

    https://e2e.ti.com/support/archive/internal/int-msp430/f/167/p/451232/1623795

    Best regards,

    Helfried

  • Hello Helfried,

    sorry, cannot verify the thread - access denied :-(

    But yes, we use the source from the slcr002.zip (downloaded from www.ti.com/.../RF430F5978EVM

    While we were trying to get the code working, it seems to us, that this code could have never run correctly  !!!

    There are 2 nested SPI xfers ?!?!?!  (we reordered the code, but this does not work either ...)

    ui TrimStep(enum _eANTSEL eAnt, uc TrimVal, enum _eTRIMMODE eMode)
    {
            uc ucArr[7];
            ui uiMeas, uiRetVal;
            uc ucTrimControl = GetTrimControl(eAnt, eMode);
            uc i;
    
            TrimVal &= 0x7F;        // Lock bits are not accepted by this routine
    
            ucArr[0] = 6;           // amount of SPI master bytes following
            ucArr[1] = 0xF3;        // TAA
            ucArr[2] = ACTCODE_SPI_LFTRIM;  // action code
    
            ucArr[3] = ucTrimControl;       // Trimming Control
    
            ucArr[4] = TrimVal;     // RF1; which values are actually trimmed is determined by Trimming Control
            ucArr[5] = TrimVal; // RF2
            ucArr[6] = TrimVal; // RF3
    
            for(i=0; i<7; i++)
                    TransceiveSPI(ucArr[i]);
    =======>> starts SPI xfer
    
            switch(eMode)
            {
            case ProgPerm:
                    uiRetVal = ucArr[5];    // return Read Address (contains information if command was executed)
                    break;
            default:        // Meas || ProgTemp
                    uiMeas = Measure();
    ========> runs SPI XFER too -> see below !!!!
                    uiRetVal =  uiMeas;
                    break;
            }
    ========> gets SPI xfer answer from above
            for(i=0; i<7; i++)
                    ucArr[i] = TransceiveSPI(0x00);
            Timer_Wait_SMCLKcycles(0x1000);                         // Wait for oscillation to settle
    
            return uiRetVal;
    }
    
    
    
    unsigned int Measure(void)
    {
        StartValue=0;
        EndValue=0;
        StartCounter=100;
        EndCounter=120;
        counter = 0;
    
        RAID_Control(0x16);
    ========> makes SPI xfer, while TrimStep has SPI answer pending !!!!!!
    
    //      PortMap_LF_Trim();
        __delay_cycles(32000);      //4ms
    
    //      EnableTA0CLK(); // GPIO as clock input from CLK_OUT; Must be mapped as TA0CLK
    
            CLK_Measure[0] = CLK_Measure[1] = CLK_Measure[2] = 0;
    
            P3SEL |= BIT5;
            // Setup Timer
        TA1CTL = TASSEL_2 + MC__CONTINUOUS + TACLR;
        TA1CCTL0 = CAP | CCIE | CCIS_0;
        // Activate Timer A0
        TA1R=0;                                             //reset capture compare register value to 0
        TA1CCTL0 |= CCIE;                                   // enable timer interrupt
            __bis_SR_register(LPM0_bits + GIE);     // Enter LPM3, enable interrupts
        TA1CCTL0 &= ~CCIE;                                  // disable interrupt
    
    //      DisableTA0CLK();
            return CLK_Measure[2] - CLK_Measure[0];
    }
    

    We are really in need of proper solution, as we have a proof-of-concept depending on that !!

    Best regards,

    Benno

  • Hello Benno,

    a few information I got after discussion with colleagues. In principle there are three possibilities for the resonance frequency trimming. For the RF430F5978 it was chosen to trim vi a RSSI measurement. This seem not possible for you because you reader can not supply the needed protocol at 125kHz.

    A second possibility is the SPI trimming which was not fully implemented and tested for the RF430F5978. Because the RF430F5978 uses an older silicon version the software from other RAIDAES products is not fully compatible. One difference I have discovered that the you have to supply VCL via a diode from VBAT in order to be able to do the SPI trimming.

    A third option would be the use of the test interface of theRF430F5978. There is a so call Probe Test Box available (RI-ACC-PTB2-00) which can be ordered at the distributer i.e. Arrow. Software can be provided by us.

    Best regards,

    Helfried

       

  • Hello Helfried,

    oooohhh......

    for the first one: our 125khz is transmit only .. so no communication possible (as we cannot successfully xfer more than 2 data bits @ 125khz ..s.o.). The EVM-MRD2 does not allow for trimming for 125khz - BUT after reading the MRD2 protocol/users manual (SCBU049) it should be possible to communicate via 134khz but trim to 125khz  (maybe as easy as 6.4.3.26 Execute C-trimming ???? but what device type ?) .... would that be a possibility ??

    for the second one: does that mean that the SPI trimming is completely unusable ? or is it just the missing info on how and where to access the required signals (CLK_OUT, MEM[7:15] etc.) ??  The procedures required for trimming seem not very complicated and similar to the previous products. So we don't think it is a sw problem, but just a matter of getting the signals/pins routed correctly (do we need an NDA for that ?) !!! (What transponder type is it really ?)

    The VCL is supplied by P3.7 and a diode, same as on the EVM module ...

    the third one does also not look very promising :-( none of the ususal distributors has it in stock, one even lists it as no longer manufactured (ti webseite says ACTIVE) !!! If we just order it - will it be available from TI ?? Cost ?

    Would it be possible to simulate the test interface via another MCU ? Is the protocol the same as for the TMS37122 ? Or even documented somewhere else ?

    Do we have to resort to a CC430F5/6xxx and a TMS37126 or a TMS37F128 (same trimming problem ?)+ CC110x or similar ???  Oh, no,  my board space ......

    Regards

    Benno

  • Hello Benno,

    when using the RSSI approach a bidirectional communication is not necessary. If you are able to send the protocol as described on page 800 in the User's Guide you can do the RSSI measurement. Because you want to use the wakeup receive you should be able to send the Wake Pattern.

    The Probe Test Box is still an active product but you can buy it only from a distributer. I have to check which one has it on stock.

    Because I am not in the office I will com back to you by end of the week.

    Best regards,

    Helfried