cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL55 FSK receive bandwith setting, SubGHz_Phy_Per example

Erlkoenig
Associate III

Hi,

the STM32WL55's reference manual states:

> BW[DSB] > BR + 2 x frequency deviation + frequency error

However, in the SubGHz_Phy_Per example, FSK is configured as follows:

 

 

 

#define FSK_FDEV                                    25000     /* Hz */
#define FSK_DATARATE                                50000     /* bps */
#define FSK_BANDWIDTH                               50000     /* Hz */

 

 

 

Therefore, "BR + 2 x frequency deviation" would be equal to 100000Hz. But the bandwidth is set to just 50000Hz. But the example still works. Why? The gaussian filter (BT=0.5) reduces the bandwith, but not that much.

The reference manual also states:

> In receive mode, the bandwidth is automatically adjusted to match the selected data rate

Does this mean I don't have to specify the bandwidth?

 

Is the following interpretation of the FSK frequency parameters correct?

FSK.png

1 ACCEPTED SOLUTION

Accepted Solutions

For other readers and future reference:

I asked the support directly, and confirmed that the given formula from the datasheet "BW[DSB] > BR + 2 x Fdev + frequency error" is indeed correct and should be used for implementing RF applications. It also also known as Carson's bandwidth rule. "BW[DSB]" means the total bandwidth in kHz, for both side-bands. BR is the bitrate in kbps. Fdev is the frequency deviation to one side in kHz.

The bandwidth setting in the example is wrong. The example still works in good conditions because even though the filter is too narrow, some small signal still gets past it and gets demodulated.

I also used a spectrum analyzer to confirm that my diagram about the frequency configuration is indeed correct. The frequency set by Set_RfFrequency is indeed the center frequency (not the lowest or highest frequency) and Fdev means the deviation of the symbol frequencies from the center frequency (half of the total difference from the "0" symbol frequency to "1" symbol frequency). The center frequency is actually never sent.

The somewhat ambiguous sentence "In transmit mode, the frequency deviation is selected via the modulation index" from the datasheet is wrong, as Fdev is given as a multiple of a fixed FreqStep, not via ratio of Fdev and bit rate.

View solution in original post

3 REPLIES 3
STTwo-32
ST Employee

Hello @Erlkoenig 

Could you explain more about the issue you are wondering about. I'm not understanding well your description.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @STTwo-32 ,

I would like to understand the settings of the SubGHz peripheral so I can configure it optimally for my application.

I think the "FSK_BANDWIDTH" setting in the example is wrong (too small according to the formula from the datasheet), but it still works, why? Is the formula or the example wrong?

I also don't understand the quote "In receive mode, the bandwidth is automatically adjusted to match the selected data rate" from the datasheet - this would mean I don't have to set the bandwidth? Is the quote wrong?

I am also unsure what frequency exactly is set by "Set_RfFrequency" - is it the center frequency, or perhaps the lowest frequency (for "0")?

For other readers and future reference:

I asked the support directly, and confirmed that the given formula from the datasheet "BW[DSB] > BR + 2 x Fdev + frequency error" is indeed correct and should be used for implementing RF applications. It also also known as Carson's bandwidth rule. "BW[DSB]" means the total bandwidth in kHz, for both side-bands. BR is the bitrate in kbps. Fdev is the frequency deviation to one side in kHz.

The bandwidth setting in the example is wrong. The example still works in good conditions because even though the filter is too narrow, some small signal still gets past it and gets demodulated.

I also used a spectrum analyzer to confirm that my diagram about the frequency configuration is indeed correct. The frequency set by Set_RfFrequency is indeed the center frequency (not the lowest or highest frequency) and Fdev means the deviation of the symbol frequencies from the center frequency (half of the total difference from the "0" symbol frequency to "1" symbol frequency). The center frequency is actually never sent.

The somewhat ambiguous sentence "In transmit mode, the frequency deviation is selected via the modulation index" from the datasheet is wrong, as Fdev is given as a multiple of a fixed FreqStep, not via ratio of Fdev and bit rate.