STM32开发笔记89: SX1268驱动程序设计(电源控制)

一笑奈何 提交于 2019-11-29 04:55:25

单片机型号:STM32L053R8T6


本系列开发日志,将详述SX1268驱动程序的整个设计过程,本篇介绍电源控制的相关驱动程序。

一、使用DC-DC或者LDO

Two forms of voltage regulation (DC-DC buck converter or linear LDO regulator) are available depending upon the design priorities of the application. The linear LDO regulator is always present in all modes but the transceiver will use DC-DC when selected. Alternatively a high efficiency DC to DC buck converter (DC-DC) can be enabled in FS, Rx and Tx modes.(根据设计需求,有2种电源可供选择:DCDC或LDO,LDO存在于任何模式,但是当DCDC被选择时,收发器将使用DCDC。DCDC可以在FS、Rx和Tx模式使用

DCDC被2个时钟源驱动:

  • in STDBY_XOSC: RC13M is used to supply clock and the frequency is RC13M / 4 so the switching frequency of the DC-DC converter will be 3.25 MHz(在STDBY_XOSC模式,RC13M/4=3.25M用于DCDC
  • in FS, RX, TX: the PLL is used to supply clock and the frequency is ~5MHz; every time the command SetRFFrequency(...) is called the divider ratio is recalculated so that the switching frequency is as close as possible to the 5 MHz target.(在FS、RX和TX模式,由PLL供给时钟,频率约为5MHz,每次调用SetRFFrequency函数,分频器都会重新计算,以确保尽可能接近5MHz

各种模式,电源的使用情况如下图所示,切换由SetRegulatorMode函数完成,该函数必须在STDBY_RC模式下调用。

When the DC-DC is enabled, the LDO will remain On and its target voltage is set 50 mV below the DC-DC voltage to ensure voltage stability for high current peaks. If the DC-DC voltage drops to this level due to high current peak, the LDO will cover for the current need at the expense of the energy consumption of the radio which will be increased.(DCDC使能后,LDO依然处于打开状态,已满足峰值电流需求

二、SetRegulatorMode函数

三、程序实现

typedef enum
{
    USE_LDO                                 = 0x00, // default
    USE_DCDC                                = 0x01,
}RadioRegulatorMode_t;
void SX126xSetRegulatorMode(RadioRegulatorMode_t mode);
void CSX1268::SX126xSetRegulatorMode(RadioRegulatorMode_t mode)
{
	SX126xWriteCommand(RADIO_SET_REGULATORMODE, (uint8_t*)&mode, 1);
}

 

 

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

 

 

 

 

 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!