无线模块-芯科si4463/si4438信号强度值读取

文章介绍了如何通过API调用来获取无线信号的RSSI值,包括在接收模式下直接读取和利用同步字检测中断的方法。RSSI的测量涉及解调后的信号强度估计,可通过配置MODEM_RSSI_CONTROL属性进行更新频率和平均。锁存的RSSI值可以在特定事件后存储,如前导码检测或同步检测。RSSI值可以通过线性方程转换为dBm单位,并可以通过MODEM_RSSI_COMP属性进行微调以补偿不同设计的前端插入损耗。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

驱动底层没有直接读取信号强度这个操作,需要用户自行操作来完成这个信号强度的获取。我们可以在解调同步字阶段读取信号强度,大概操作步骤如下:

API

uint8_t vRadio_getRssi(void)
{
    si446x_get_modem_status(0);
    return Si446xCmd.GET_MODEM_STATUS.CURR_RSSI;
}

uint8_t vRadio_getPacketRssi(void)
{
    return Si446xCmd.GET_MODEM_STATUS.CURR_RSSI;
}

获取环境信号强度值

在接收模式下直接调用vRadio_getRssi

获取接收数据包信号强度

  1. 打开同步字检测中断
    si446x_set_property(SI446X_PROP_GRP_ID_INT_CTL, 1,
                        SI446X_PROP_GRP_INDEX_INT_CTL_MODEM_ENABLE,
                        SI446X_PROP_INT_CTL_MODEM_ENABLE_SYNC_DETECT_EN_BIT
                        );
  1. 等待同步字中断产生
    bMain_IT_Status = bRadio_Check_Tx_RX();
    if(bMain_IT_Status == SI446X_CMD_GET_INT_STATUS_REP_MODEM_PEND_SYNC_DETECT_PEND_BIT)
    {
        rfRxPacket.rssi = (int16_t)vRadio_getPacketRssi()/2-64-70;
    }
  1. 解析实际信号强度值
rfRxPacket.rssi = (int16_t)vRadio_getPacketRssi()/2-64-70;

规格书对信号强度的解释

5.2.3. Received Signal Strength Indicator

The received signal strength indicator (RSSI) is an estimate of the signal strength in the channel to which the receiver is tuned. The RSSI measurement is done after the channel filter, so it is only a measurement of the desired or undesired in-band signal power. There are two different methods for reading the RSSI value and several different options for configuring the RSSI value that is returned. The fastest method for reading the RSSI is to configure one of the four fast response registers (FRR) to return a latched RSSI value. The latched RSSI value is measured once per packet and is latched at a configurable amount of time after RX mode is entered. The fast response registers can be read in 16 SPI clock cycles with no requirement to wait for CTS. The RSSI value may also be read out of the GET_MODEM_STATUS command. In this command, both the current RSSI and the latched RSSI are available. The current RSSI value represents the signal strength at the instant in time the GET_MODEM_STATUS command is processed and may be read multiple times per packet. Reading the RSSI in the GET_MODEM_STATUS command takes longer than reading the RSSI out of the fast response register. After the initial command, it will take 33 μs for CTS to be set and then the four or five bytes of SPI clock cycles to read out the respective current or latched RSSI values.
5.2.3.接收信号强度指示器

接收信号强度指示符(RSSI)是接收机调谐到的信道中的信号强度的估计。RSSI测量是在信道滤波器之后进行的,因此它只是对期望或不期望的带内信号功率的测量。有两种不同的方法用于读取RSSI值,以及几个不同的选项用于配置返回的RSSI值。读取RSSI的最快方法是配置四个快速响应寄存器(FRR)中的一个以返回锁存的RSSI值。每个数据包测量一次锁存的RSSI值,并在进入RX模式后以可配置的时间量锁存。快速响应寄存器可以在16个SPI时钟周期中读取,而不需要等待CTS。RSSI值也可以从GET_MODEM_STATUS命令中读出。在该命令中,当前RSSI和锁存的RSSI都可用。当前RSSI值表示在处理GET_MODEM_STATUS命令的时刻的信号强度,并且每个分组可以被读取多次。读取GET_MODEM_STATUS命令中的RSSI比从快速响应寄存器中读取RSSI花费更长的时间。在初始命令之后,CTS需要33μs才能设置,然后SPI时钟周期的四个或五个字节才能读出相应的当前或锁存的RSSI值。

The RSSI configuration options are set in the MODEM_RSSI_CONTROL API property. The latched RSSI value may be latched and stored based on the following events: preamble detection, sync detection, or a configurable number of bit times measured after the start of RX mode (minimum of 4 bit times). The requirement for four bit times is determined by the processing delay and settling through the modem and digital channel filter. In MODEM_RSSI_CONTROL, the RSSI may be defined to update every bit period or to be averaged and updated every four bit periods. If RSSI averaging over four bits is enabled, the latched RSSI value will be delayed to a minimum of 7 bits after the start of RX mode to allow for the averaging. The latched RSSI values are cleared when entering RX mode so they may be read after the packet is received or after dropping back to standby mode. If the RSSI value has been cleared by the start of RX but not latched yet, a value of 0 will be returned if it is attempted to be read.
The RSSI value read by the API may be translated into dBm by the following linear equation:

RSSI配置选项在MODEM_RSSI_CONTROL API属性中设置。锁存的RSSI值可以基于以下事件被锁存和存储:前导码检测、同步检测或在RX模式开始后测量的可配置比特次数(最小4比特次数)。四位时间的要求由处理延迟和通过调制解调器和数字信道滤波器的设置来确定。在MODEM_RSI_CONTROL中,RSSI可以被定义为每比特周期更新一次,或者每四比特周期被平均和更新一次。如果启用四个比特上的RSSI平均,则在RX模式开始之后,锁存的RSSI值将被延迟到最小7比特,以允许进行平均。锁存的RSSI值在进入RX模式时被清除,因此它们可以在接收到分组之后或者在回落到待机模式之后被读取。如果RSSI值在RX开始时已被清除,但尚未被锁存,则如果试图读取,则返回值0。

API读取的RSSI值可以通过以下线性方程转换为dBm:

The MODEM_RSSI_COMP property provides for fine adjustment of the relationship between the actual RF input level (in dBm) and the returned RSSI value. That is, adjustment of this property allows the user to shift the RSSI vs RF Input Power curve up and down. This may be desirable to compensate for differences in front-end insertion loss between multiple designs (e.g., due to the presence of a SAW preselection filter, or an RF switch). A value of MODEM_RSSI_COMP = 0x40 = 64d is appropriate for most applications.
MODEM_RSI_COMP属性提供了对实际RF输入电平(以dBm为单位)和返回的RSSI值之间关系的微调。也就是说,该特性的调整允许用户上下移动RSSI与RF输入功率的曲线。这可能是为了补偿多种设计之间前端插入损耗的差异(例如,由于SAW预选滤波器或RF开关的存在)。MODEM_RSI_COMP=0x40=64d的值适用于大多数应用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值