Skip to content

Commit

Permalink
Another attempt to adopt to varying flash size and geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
jsphuebner committed May 6, 2021
1 parent 6cd5bd1 commit 0bda553
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
##

OUT_DIR = obj
space :=
space +=
PREFIX ?= arm-none-eabi
CONTROL ?= SINE
CONTROLLC := $(shell echo $(CONTROL) | tr A-Z a-z)
Expand Down
3 changes: 3 additions & 0 deletions include/hwdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

//Address of parameter block in flash
#define PARAM_BLKSIZE 1024
#define PARAM_BLKNUM 1 //last block of 1k
#define CAN_BLKSIZE 1024
#define CAN_BLKNUM 2 //second to last block of 1k

#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
4 changes: 2 additions & 2 deletions src/hwinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
*/
void clock_setup(void)
{
rcc_clock_setup_in_hse_8mhz_out_72mhz();
rcc_clock_setup_pll(&rcc_hse_configs[RCC_CLOCK_HSE8_72MHZ]);

//Run ADC at 12 MHz
rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV6);
rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV6);

//The reset value for PRIGROUP (=0) is not actually a defined
//value. Explicitly set 16 preemtion priorities
Expand Down

0 comments on commit 0bda553

Please sign in to comment.