常用元器件使用方法27:LoRa芯片SX1268的使用方法(模式)

限于SX1268芯片的高频设计方法,本人并不能很好掌握,所以硬件设计使用现有模块,可参考日志:常用元器件使用方法25:LoRa模块E22-400M22S的使用方法。本文在常用元器件使用方法26:LoRa芯片SX1268的使用方法(概述)基础上介绍其操作模式。

一、启动:

At power-up or after a reset, the chip goes into STARTUP state, the control of the chip being done by the sleep state machine operating at the battery voltage. The BUSY pin is set to high indicating that the chip is busy and cannot accept a command. When the digital voltage and RC clock become available, the chip can boot up and the CPU takes control. At this stage the BUSY line goes down and the device is ready to accept commands.(上电或复位以后,芯片进入启动状态,其受控于电池电压供电下的睡眠状态机。BUSY引脚处于高电平状态,以标识此时不能接收命令。当数字电压和RC时钟可用时,芯片启动,CPU得以控制。BUSY引脚变低,器件可以准备接收命令)。——芯片上电或复位后,等待BUSY引脚变成低电平,再向其发送命令。

二、校正:

Calibration procedure is automatically called in case of POR or via the calibration command. Parameters can be added to the calibrate command to identify which section of calibration should be repeated. (上电或接收到校正命令后,校正进程会自动调用。可以将参数添加到校准命令中,以确定应该替代哪个校准部分)

以下模块可以被校正:

  • RC64k using the 32 MHz crystal oscillator as reference
  • RC13M using the 32 MHz crystal oscillator as reference
  • PLL to select the proper VCO frequency and division ratio for any RF frequency
  • RX ADC
  • Image (RX mode with defined tone)

Once the calibration is finished, the chip enters STDBY_RC mode.(一旦校正完成,芯片将进入RC旁路模式)

对特定带宽的镜频校正:

The image calibration is done through the command CalibrateImage(...) for a given range of frequencies defined by the parameters freq1 and freq2. Once performed, the calibration is valid for all frequencies between the two extremes used as parameters. Typically, the user can select the parameters freq1 and freq2 to cover any specific ISM band.(通过命令CalibrateImage(…)对由参数freq1和freq2定义的给定频率范围进行镜频校正。一旦执行,校正对用作参数的两个数值之间的所有频率都是有效的。通常,用户可以选择参数freq1和freq2来覆盖任何特定的ISM波段。

常用元器件使用方法27:LoRa芯片SX1268的使用方法(模式)_第1张图片

In case of POR or when the device is recovering from Sleep mode in cold start mode, the image calibration is performed as part of the initial calibration process and for optimal image rejection in the band 470 - 510 MHz. However at this stage the internal state machine has no information whether an XTAL or a TCXO is fitted. When the 32 MHz clock is coming from a TCXO, the calibration will fail and the user should request a complete calibration after calling the function SetDIO3AsTcxoCtrl(...).(芯片上电或者芯片从冷启动的睡眠模式恢复,镜频校正作为初始化校正进程的一部分将被执行,并对470-510MHz的频段进行优化镜频抑制。然而,在此阶段,内部状态机不知道是否安装了XTAL或TCXO,当选用来自TCXO的32MHz的时钟时,校正失败。用户在调用SetDIO3AsTcxoCtrl函数后,应执行一个完整的校正。)——上电或从冷启动睡眠状态回复,芯片会自动对470-510MHz的频段进行镜频校正,在调用SetDIO3AsTcxoCtrl函数后,必须校正。

By default, the image calibration is made in the band 470 - 510 MHz. Nevertheless, it is possible to request the device to perform a new image calibration at other frequencies.(默认情况下,镜频校正在470 - 510 MHz频段进行。不过,也可以要求该设备在其他频率下执行新的镜频校正。)

三、睡眠模式:

In this mode, most of the radio internal blocks are powered down or in low power mode and optionally the RC64k clock and the timer are running. The chip may enter this mode from STDBY_RC and can leave the SLEEP mode if one of the following events occurs:(在这种模式下,大多数射频内部块断电或处于低功耗模式,RC64k时钟和定时器可以选择运行。芯片可以从STDBY_RC进入该模式,如果发生以下情况之一,则可以离开休眠模式:)

  • NSS pin goes low in any case
  • RTC timer generates an End-Of-Count (corresponding to Listen mode)

When the radio is in Sleep mode, the BUSY pin is held high.(当射频处于睡眠模式时,BUSY引脚保持高电平)

四、旁路模式:

In standby mode the host should configure the chip before going to RX or TX modes. By default in this state, the system is
clocked by the 13 MHz RC oscillator to reduce power consumption (in all other modes except SLEEP the XTAL is turned ON).
However if the application is time critical, the XOSC block can be turned or left ON.(在待机模式下,主机应在进入RX或TX模式之前配置芯片。默认情况下,系统选择13MHZ的RC振荡器,以降低功耗。除睡眠模式外,其它模式XTAL时钟处于打开状态。然而,如果应用程序对时钟要求严格,则可以打开XOSX模块,并让它始终处于打开状态。

XOSC or RC13M selection in standby mode is determined by mode parameter in the command SetStandby(...).(旁路模式下的XOSC或RC13M选择由命令SetStandby(…)中的模式参数决定。

The mode where only RC13M is used is called STDBY_RC and the one with XOSC ON is called STDBY_XOSC.(只使用RC13M的模式称为STDBY_RC,打开XOSC的模式称为STDBY_XOSC。

If DC-DC is to be used, the selection should be made while the circuit is in STDBY_RC mode by using the SetRegulatorMode(...) command, then the DC-DC will automatically switch ON when entering STDBY_XOSC mode. The DC-DC will be clocked by the RC13M. The LDO will remain active with a target voltage 50 mV lower than the DC-DC one.(如果要使用DC-DC,则应在电路处于STDBY_RC模式时使用SetRegulatorMode(…)命令进行选择,当进入STDBY_XOSC模式时,DCDC会自动打开。DCDC使用RC13M时钟,当目标电压比DC-DC低50 mV时,LDO将保持活跃状态。

五、频率合成模式:

In FS mode, PLL and related regulators are switched ON. The BUSY goes low as soon as the PLL is locked or timed out.For debugging purposes the chip may be requested to remain in this mode by using the SetFs() command.Since the SX1268 uses low IF architecture, the RX and TX frequencies are different. The RX frequency is equal to TX one minus the intermediate frequency (IF). In FS or TX modes, the RF frequency is directly programmed by the user.(在FS模式下,锁相环和相关的调节器被打开。锁相环锁定或超时后,BUSY引脚将变为低电平。出于调试目的,可以使用SetFs()请求芯片保持这种模式。由于SX1268采用低中频结构,RX和TX频率不同。RX频率等于TX减去中频频率。在FS或TX模式,射频频率直接由用户编程指定。

六、RX模式

In RX mode, the RF front-end, RX ADC and the selected modem (LoRa® or FSK) are turned ON. In RX mode the circuit can
operate in different sub-modes:(在RX模式,射频前端,RX ADC和选择的调制解调器将被打开。在RX模式,电路可以操作在以下不同的子模式。

  • Continuous mode: the device remains in RX mode and waits for incoming packet reception until the host requests a different mode,(连续模式:设备保持RX模式,等待接收到的数据包,直到主机请求另一种模式
  • Single mode: the device returns automatically to STDBY_RC mode after packet reception,(单模式:数据包接收后设备自动返回STDBY_RC模式
  • Single mode with timeout: the device returns automatically to STDBY_RC mode after packet reception or after the selected timeout,(带超时的单模态:设备接收数据包或选择超时后自动返回STDBY_RC模式
  • Listen mode: the device alternate between Sleep and Rx mode until an IRQ is triggered.(监听模式:设备在休眠模式和Rx模式之间切换,直到IRQ被触发

In RX mode, BUSY will go low as soon as the RX is up and ready to receive data.(在RX模式,BUSY引脚变为低,即可接受数据)

The SX1268 can operate in a Rx Boosted gain setup or in a Rx power saving gain setup. In the Rx power saving gain, the radio will consume less power at a small cost in sensitivity. In Rx Boosted gain, the radio will consume more power to improve the sensitivity.(SX1268可以运行在RX增益提高模式或者RX省电增益模式。在Rx省电增益模式中,射频将以较小的灵敏度成本消耗较少的功率。在RX提高增益模式,射频将消耗较多的电能以提高灵敏度。

In LoRa® mode, the user can also use the command SetLoRaSymbNumTimeout(...) to perform a quick and immediate assessment of the presence (or not) of LoRa preamble symbols. If the user defined parameter SymbNum is different from 0, the modem will wait for a total of SymbNum LoRa® symbol to validate, or not, the correct detection of a LoRa® packet. If the various states of the demodulator are not locked at this moment, the radio will generate the RxTimeout IRQ. Otherwise, the radio will stay in Rx for the full duration of the packet.

七、TX模式:

In TX mode after ramping-up the Power-Amplifier (PA) transmits the data buffer. In TX mode the circuit can operate in different sub-modes: single mode or single with timeout mode.(在TX模式下,功率放大器(PA)启动后传输数据缓冲区。在TX模式下,电路可以在不同的子模式下工作:单模式或单超时模式。

The timeout in Tx mode can be used as a security to ensure that if for any reason the Tx is aborted or does not succeed (ie. the TxDone IRQ never is never triggered), the TxTimeout will prevent the system from waiting for an undefined amount of time. Using the timeout while in Tx mode removes the need to use resources from the host MCU to perform the same task.(Tx模式中的超时可以用作一种安全措施,以确保由于任何原因Tx被中止或没有成功。Tx超时模式将阻止系统进入等待未知的时间量。Tx超时模式可以避免用户MCU使用更多的资源执行同一个任务。

In TX mode, BUSY will go low as soon as the PA has ramped-up and transmission of preamble starts.(在TX模式,一旦PA使用并传递报文,则BUSY引脚就会变为低电平。

The ramping of the PA can be selected while setting the output power by using the command SetTxParams(...).(可以通过SetTxParams命令选择不同的PA启动消耗能量。

The PA ramp time can be selected to go from 10 us up to 3.4 ms.(PA启动时间可以设置为10us到3.5ms。

八、状态机转换图

 

原创性文章,转载请注明出处CSDN:http://blog.csdn.net/qingwufeiyang12346。

你可能感兴趣的:(#,常用元器件使用方法)