Skip to content

Commit

Permalink
Fix prohibited register (FLSCL) writing
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrir-naru committed Feb 25, 2016
1 parent f2d2481 commit 7796806
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions firmware/f38x_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ static void prologue(){
ea_orig = EA; // Preserve EA
EA = 0; // Disable interrupts

FLSCL_orig = FLSCL;
FLSCL_orig = FLSCL & 0x90;
if(SYSCLK > 25000000UL){ // check clock speed
FLSCL |= 0x10;
FLSCL = (FLSCL_orig | 0x10);
}

VDM0CN_orig = VDM0CN;
if(!(VDM0CN & 0x80)){
VDM0CN |= 0x80; // Enable VDD monitor
VDM0CN = (VDM0CN_orig | 0x80); // Enable VDD monitor
wait_us(100);
}
RSTSRC_orig = RSTSRC & 0xA6;
Expand Down

0 comments on commit 7796806

Please sign in to comment.