Programming the nrf21540 using the SPI interface.

I have been getting results from reading out the registers of the FEM on my nrf21540 DK board. 
After I lower and raise the PDN pin on the FEM, I will read out CONFREG0 and get a hex value of 0x60, which gives a TX_GAIN of 24d. 

> My question is why is this the value on power up? I assumed it might have something to do with CONFREG2 or CONFREG3 setting it as a default value.
However, when I read CONFREG2 or CONFREG3 they read back as all zero.
I am a bit perplexed.

> I have another question, if you change the value of TX_GAIN , does the amplifier gain change immediately? 


I suppose my read back code may not be working correctly.

A M

Parents
  • The factory trimmed value is loaded to CONFREG0 at power up and if you toggle the MODE pin. This will only equal the CONFREG2/3 values if you have written the POUTnSEL in the register chosen by the MODE pin.

    24d looks like the 20dBm setting, if you toggle the MODE pin and read again you should get the 10dBm value. They are typically in the lower 16 steps for 10dBm and upper 16 steps for the 20dBm.

    You should not change the gain while the PA is enabled, this should be done when you are in the PG state. Then the gain will be set when the PA is enabled.

  • For follow up then, this factory trimmed value, does not change and cannot be changed, correct? 

    Section 5.4 now makes total sense to me. I swear, if I don't ask these dumb questions, I never get anywhere. 

  • The factory trimmed values are device dependent, trimmed in Nordic production and can not be changed.

    Device to device spread is too large to get really accurate absolute values so then you do trimming like this.

    And if you are planning to write other values to the register then you must check out the curve for gain vs trim value. The absolute points on this curve will be device dependent but the relationship between n, n-1 and n+1 will be following the curve much better. This is as absolute values are difficult in silicon processing but relative values are much better controlled.

  • Thats great, thanks. I just wanted to make sure I couldn't screw them up.

    and thanks for the answer on the TX_GAIN, I didn't make it clear that I was making the change while in the programming state, but it's good that you added the detail for completeness. 

Reply Children
No Data
Related