You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dspic33a_bootloader_and_firmware_upgrade_demo/flashProtectionExample.X/mcc_generated_files/system/clock_types.h
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
*
8
8
* @brief This is the generated driver types header file for the CLOCK driver
Copy file name to clipboardExpand all lines: dspic33a_bootloader_and_firmware_upgrade_demo/flashProtectionExample.X/mcc_generated_files/system/src/clock.c
+44-23Lines changed: 44 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
*
9
9
* @brief This is the generated source file for CLOCK driver
10
10
*
11
-
* @version PLIB Version 1.1.0
11
+
* @version PLIB Version 1.1.2
12
12
*
13
13
* @skipline Device : dsPIC33AK128MC106
14
14
*/
@@ -42,6 +42,9 @@
42
42
#include"../clock.h"
43
43
#include"../clock_types.h"
44
44
45
+
#definePLL1FOUT_SOURCE 0x5U
46
+
#definePLL2VCODIV_SOURCE 0x8U
47
+
45
48
// Section: Static Variables
46
49
47
50
@@ -58,65 +61,83 @@ void CLOCK_Initialize(void)
58
61
PLL 1 VCO Out frequency : 200 MHz
59
62
60
63
*/
61
-
62
-
/* Always switch to FRC before making clock changes. */
63
-
CLK1CONbits.NOSC=1; // FRC_CLK
64
-
CLK1CONbits.OSWEN=1;
65
-
while(CLK1CONbits.OSWEN){}
64
+
65
+
66
+
//If CLK GEN 1 (system clock) is using a PLL, switch to FRC to avoid risk of over-clocking the CPU while changing PLL settings
0 commit comments