Skip to content

Commit fe572f6

Browse files
committed
MPAE-7936 fixing opamp init
1 parent 02e2e64 commit fe572f6

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

.main-meta/main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"content": {
55
"metaDataVersion": "1.1.0",
66
"name": "com.microchip.mcu8.mplabx.project.avr128db48-using-opamp-as-a-regulated-power-supply-mplab",
7-
"version": "1.0.1",
7+
"version": "1.0.2",
88
"displayName": "Using OPAMP as a Regulated Power Supply",
99
"projectName": "avr128db48-using-opamp-as-a-regulated-power-supply-mplab",
1010
"shortDescription": "This MPLAB X bare metal example in Using the Internal OPAMP as Regulated Power Supply for MVIO (AN3636) shows how to use the OPAMP as a regulated power supply for a second voltage domain. This removes the need for a second external power supply. The regulated power supply features is showcased by acting as the second power supply for the Multi-Voltage I/O (MVIO)",

using-external-resistors.X/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void op_amp_init()
6464
/*Set up op amp*/
6565
OPAMP.CTRLA = OPAMP_ENABLE_bm;
6666
OPAMP.TIMEBASE = (uint8_t) ceil(CLK_PER*0.000001)-1; /*Number of peripheral clock cycles that amounts to 1us*/
67-
OPAMP.OP1CTRLA = OPAMP_RUNSTBY_bm | OPAMP_ALWAYSON_bm | OPAMP_OP1CTRLA_OUTMODE_NORMAL_gc;
67+
OPAMP.OP0CTRLA = OPAMP_RUNSTBY_bm | OPAMP_ALWAYSON_bm | OPAMP_OP0CTRLA_OUTMODE_NORMAL_gc;
6868
OPAMP.OP0SETTLE = OPAMP_MAX_SETTLE_TIME; //As the settle time is unknown, the maximums should be set
6969
}
7070

using-external-resistors.X/nbproject/configurations.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
</compileType>
5959
<makeCustomizationType>
6060
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
61+
<makeUseCleanTarget>false</makeUseCleanTarget>
6162
<makeCustomizationPreStep></makeCustomizationPreStep>
6263
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
6364
<makeCustomizationPostStep></makeCustomizationPostStep>
@@ -161,8 +162,52 @@
161162
<property key="stack-size-main" value="auto"/>
162163
<property key="stack-type" value="compiled"/>
163164
<property key="user-pack-device-support" value=""/>
165+
<property key="wpo-lto" value="false"/>
164166
<appendMe value="-std=gnu99"/>
165167
</XC8-config-global>
168+
<nEdbgTool>
169+
<property key="AutoSelectMemRanges" value="auto"/>
170+
<property key="communication.activationmode" value="nohv"/>
171+
<property key="communication.interface" value="updi"/>
172+
<property key="communication.speed" value="0.500"/>
173+
<property key="debugoptions.useswbreakpoints" value="false"/>
174+
<property key="firmware.path"
175+
value="Press to browse for a specific firmware version"/>
176+
<property key="firmware.toolpack"
177+
value="Press to select which tool pack to use"/>
178+
<property key="firmware.update.action" value="firmware.update.use.latest"/>
179+
<property key="freeze.timers" value="false"/>
180+
<property key="memories.aux" value="false"/>
181+
<property key="memories.bootflash" value="true"/>
182+
<property key="memories.configurationmemory" value="true"/>
183+
<property key="memories.configurationmemory2" value="true"/>
184+
<property key="memories.dataflash" value="true"/>
185+
<property key="memories.eeprom" value="true"/>
186+
<property key="memories.exclude.configurationmemory" value="true"/>
187+
<property key="memories.flashdata" value="true"/>
188+
<property key="memories.id" value="true"/>
189+
<property key="memories.instruction.ram.ranges"
190+
value="${memories.instruction.ram.ranges}"/>
191+
<property key="memories.programmemory" value="true"/>
192+
<property key="memories.programmemory.ranges" value="0-ffff"/>
193+
<property key="memories.rww" value="true"/>
194+
<property key="poweroptions.powerenable" value="false"/>
195+
<property key="programoptions.eraseb4program" value="true"/>
196+
<property key="programoptions.preservedataflash" value="false"/>
197+
<property key="programoptions.preservedataflash.ranges"
198+
value="${memories.dataflash.default}"/>
199+
<property key="programoptions.preserveeeprom" value="false"/>
200+
<property key="programoptions.preserveeeprom.ranges" value="1400-15ff"/>
201+
<property key="programoptions.preserveprogram.ranges" value=""/>
202+
<property key="programoptions.preserveprogramrange" value="false"/>
203+
<property key="programoptions.preserveuserid" value="false"/>
204+
<property key="programoptions.programuserotp" value="false"/>
205+
<property key="toolpack.updateoptions"
206+
value="toolpack.updateoptions.uselatestoolpack"/>
207+
<property key="toolpack.updateoptions.packversion"
208+
value="Press to select which tool pack to use"/>
209+
<property key="voltagevalue" value=""/>
210+
</nEdbgTool>
166211
</conf>
167212
<conf name="pro" type="2">
168213
<toolsSet>
@@ -197,6 +242,7 @@
197242
</compileType>
198243
<makeCustomizationType>
199244
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
245+
<makeUseCleanTarget>false</makeUseCleanTarget>
200246
<makeCustomizationPreStep></makeCustomizationPreStep>
201247
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
202248
<makeCustomizationPostStep></makeCustomizationPostStep>
@@ -300,6 +346,7 @@
300346
<property key="stack-size-main" value="auto"/>
301347
<property key="stack-type" value="compiled"/>
302348
<property key="user-pack-device-support" value=""/>
349+
<property key="wpo-lto" value="false"/>
303350
<appendMe value="-std=gnu99"/>
304351
</XC8-config-global>
305352
</conf>

0 commit comments

Comments
 (0)