cancel
Showing results for 
Search instead for 
Did you mean: 

STR710Lib mapping in the apb.h file is not correct ?

bernd2399
Associate
Posted on August 24, 2005 at 14:23

STR710Lib mapping in the apb.h file is not correct ?

1 REPLY 1
bernd2399
Associate
Posted on August 24, 2005 at 14:23

I think the correct mapping for the APBn_SWRES and APBn_CKDIS registers in the apbh.h file of the STR710Lib must be

/* APB1 Peripherals */

#define I2C0_Periph 0x0001

#define I2C1_Periph 0x0002

#define UART0_Periph 0x0008

#define UART1_Periph 0x0010

#define UART2_Periph 0x0020

#define UART3_Periph 0x0040

#define USB_Periph 0x0080

#define CAN_Periph 0x0100

#define BSPI0_Periph 0x0200

#define BSPI1_Periph 0x0400

#define HDLC_Periph 0x2000

/* APB2 Peripherals */

#define XTI_Periph 0x0001

#define GPIO0_Periph 0x0004

#define GPIO1_Periph 0x0008

#define GPIO2_Periph 0x0010

#define ADC12_Periph 0x0040

#define CKOUT_Periph 0x0080

#define TIM0_Periph 0x0100

#define TIM1_Periph 0x0200

#define TIM2_Periph 0x0400

#define TIM3_Periph 0x0800

#define RTC_Periph 0x1000

#define WDG_Periph 0x2000

#define EIC_Periph 0x4000

and not

/* APB1 Peripherals */

#define I2C0_Periph 0x0002

#define I2C1_Periph 0x0004

#define UART0_Periph 0x0010

#define UART1_Periph 0x0020

#define UART2_Periph 0x0040

#define UART3_Periph 0x0080

#define USB_Periph 0x0100

#define CAN_Periph 0x0200

#define BSPI0_Periph 0x0400

#define BSPI1_Periph 0x0800

#define HDLC_Periph 0x2000

/* APB2 Peripherals */

#define XTI_Periph 0x0002

#define GPIO0_Periph 0x0004

#define GPIO1_Periph 0x0008

#define GPIO2_Periph 0x0010

#define ADC12_Periph 0x0080

#define TIM0_Periph 0x0200

#define TIM1_Periph 0x0400

#define TIM2_Periph 0x0800

#define TIM3_Periph 0x1000

#define RTC_Periph 0x2000

#define WDG_Periph 0x4000

#define EIC_Periph 0x8000

as in the actual version (V3.0) of the Str710Lib

these mapping is used in the APB_SwResetConfig and APB_ClockConfig calls.