Skip to content

Commit

Permalink
Auto-detect flash size and write parameters to according address
Browse files Browse the repository at this point in the history
Correction in start sequence
  • Loading branch information
jsphuebner committed Apr 21, 2021
1 parent f23c855 commit 393d619
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions include/hwdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
#define OVER_CUR_POS hwRev == HW_BLUEPILL ? TIM_OC2 : TIM_OC3

//Address of parameter block in flash
#define FLASH_PAGE_SIZE 1024
#define PARAM_ADDRESS 0x0801FC00
#define PARAM_BLKSIZE FLASH_PAGE_SIZE
#define CANMAP_ADDRESS 0x0801F800
#define PARAM_BLKSIZE 1024

#define REV_CNT_IC hwRev == HW_REV1 ? TIM_IC3 : TIM_IC1
#define REV_CNT_OC hwRev == HW_REV1 ? TIM_OC3 : TIM_OC1
Expand Down
2 changes: 1 addition & 1 deletion libopencm3
2 changes: 1 addition & 1 deletion libopeninv
1 change: 1 addition & 0 deletions src/stm32_sine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ static void Ms10Task(void)

if (newMode != MOD_OFF)
{
opmode = newMode;
DigIo::dcsw_out.Set();
DigIo::err_out.Clear();
DigIo::prec_out.Clear();
Expand Down

0 comments on commit 393d619

Please sign in to comment.