Digital Power Starter Kit 3 Firmware
DM330017-3, Rev.3.0
dsPIC33C Buck Converter Peak Current Mode Control Example
v_loop_extensions.h
1
/* Microchip Technology Inc. and its subsidiaries. You may use this software
2
* and any derivatives exclusively with Microchip products.
3
*
4
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
5
* EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
6
* WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
7
* PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
8
* WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
9
*
10
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
11
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
12
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
13
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
14
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
15
* IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF
16
* ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
17
*
18
* MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
19
* TERMS.
20
*/
21
22
/*
23
* File:
24
* Author:
25
* Comments:
26
* Revision history:
27
*/
28
29
// This is a guard condition so that contents of this file are not included
30
// more than once.
31
#ifndef BUCK_CONVERTER_CONTROL_EXTENSIONS_H
32
#define BUCK_CONVERTER_CONTROL_EXTENSIONS_H
33
34
#include <xc.h>
// include processor files - each processor file is guarded.
35
36
struct
BUCK_SYNC_CONTROL_s
{
37
38
volatile
uint16_t*
prtIOCtrlRegister
;
// Pointer to PGxIOCONL register to set override bits of sync switch
39
volatile
uint16_t
OvrEnBitLocation
;
// bit location of the control bit within the control register
40
volatile
uint16_t
OnThreshold
;
// threshold value turning on sync rectifier switch drive
41
volatile
uint16_t
OffThreshold
;
// threshold value turning off sync rectifier switch drive
42
};
43
typedef
struct
BUCK_SYNC_CONTROL_s
BUCK_SYNC_CONTROL_t
;
44
45
/* FUNCTION PROTOTYPES OF BUCK CONVERTER EXTENSION FUNCTIONS */
46
47
65
//extern __attribute__((near)) void buck_SyncRectControl( // Cycle-by-cycle synchronous rectifier control
66
// volatile struct BUCK_SYNC_CONTROL_s* sync_control
67
// );
68
69
extern
void
__attribute__((near)) buck_SyncRectControl(
void
);
// Cycle-by-cycle synchronous rectifier control
70
71
72
#endif
/* BUCK_CONVERTER_CONTROL_EXTENSIONS_H */
73
BUCK_SYNC_CONTROL_s
Definition:
v_loop_extensions.h:36
BUCK_SYNC_CONTROL_s::OvrEnBitLocation
volatile uint16_t OvrEnBitLocation
Definition:
v_loop_extensions.h:39
BUCK_SYNC_CONTROL_s::OffThreshold
volatile uint16_t OffThreshold
Definition:
v_loop_extensions.h:41
BUCK_SYNC_CONTROL_s::prtIOCtrlRegister
volatile uint16_t * prtIOCtrlRegister
Definition:
v_loop_extensions.h:38
BUCK_SYNC_CONTROL_s::OnThreshold
volatile uint16_t OnThreshold
Definition:
v_loop_extensions.h:40
dpsk_buck_pcmc.X
sources
power_control
drivers
v_loop_extensions.h
© 2021, Microchip Technology Inc.