/*
*Copyright (C),2023 , NANOCHAP
*File name:   ENS1_BOOST.C          
*Author:      
*Version:     V1.0 
*Date:        2023-11-                   
*Description: 升压电压选择功能实现
*Function List: 
     1  void boost_voltage_select_11V(void);
     2  void boost_voltage_select_15V(void);
     3  void boost_voltage_select_26V(void);
     4  void boost_voltage_select_45V(void);
     5  void boost_voltage_select_55V(void);
History: 
1.V1.0
Date:          
Author: 
Modification: 初版
*/

#include <stdio.h>
#include "ENS1_BOOST.h"

//占空比：1-20%=80% ,256分频 ,10.5A ,11V , 关闭功率,电压,内部升压使用
void boost_voltage_select_11V(void)
{
		CMSDK_ANAC->BOOST_CTRL =0x77013;//内部升压	
		CMSDK_ANAC->PMU_CTRL = 0x10;
}

//占空比：1-20%=80% ,256分频 ,10.5A,15V  关闭功率,电压,内部升压使用
void boost_voltage_select_15V(void)
{
		CMSDK_ANAC->BOOST_CTRL =0x77113;	
		CMSDK_ANAC->PMU_CTRL = 0x10;
}

//占空比：1-20%=80% ,256分频 ,10.5A ,26V,关闭功率,电压,内部升压使用
void boost_voltage_select_26V(void)
{
		//占空比64分频  10.5A   26V  关闭功率   内部升压
		CMSDK_ANAC->BOOST_CTRL =0x77213;//内部升压	
		CMSDK_ANAC->PMU_CTRL = 0x10;
}

//占空比：1-10%=90% ,16分频 ,10.5A ,45V,关闭功率,电压,内部升压使用
void boost_voltage_select_45V(void)
{
		CMSDK_ANAC->BOOST_CTRL =0x97413;//内部升压
		CMSDK_ANAC->PMU_CTRL = 0x10;
}

//占空比：1-10%=90% ,16分频 ,10.5A ,55V,关闭功率,电压,内部升压使用
void boost_voltage_select_55V(void)
{
		CMSDK_ANAC->BOOST_CTRL =0x97713;//内部升压	
		CMSDK_ANAC->PMU_CTRL = 0x10;
}
