Add an alternate STM32 I2C driver that works around errata in the F103 chip (and maybe others). From Patrizio Simona
This commit is contained in:
parent
59e254d1f6
commit
6018da5181
|
@ -831,10 +831,10 @@
|
|||
* bits[7:4] of each field, bits[3:0] read as zero and ignore writes.
|
||||
*/
|
||||
|
||||
#define NVIC_SYSH_PRIORITY_MIN 0xf0 /* All bits[7:4] set is minimum priority */
|
||||
#define NVIC_SYSH_PRIORITY_DEFAULT 0x80 /* Midpoint is the default */
|
||||
#define NVIC_SYSH_PRIORITY_MAX 0x00 /* Zero is maximum priority */
|
||||
#define NVIC_SYSH_PRIORITY_STEP 0x10 /* Four bits of interrupt priority used */
|
||||
#define NVIC_SYSH_PRIORITY_MIN 0xf0 /* All bits[7:4] set is minimum priority */
|
||||
#define NVIC_SYSH_PRIORITY_DEFAULT 0x80 /* Midpoint is the default */
|
||||
#define NVIC_SYSH_PRIORITY_MAX 0x00 /* Zero is maximum priority */
|
||||
#define NVIC_SYSH_PRIORITY_STEP 0x10 /* Four bits of interrupt priority used */
|
||||
|
||||
/* If CONFIG_ARMV7M_USEBASEPRI is selected, then interrupts will be disabled
|
||||
* by setting the BASEPRI register to NVIC_SYSH_DISABLE_PRIORITY so that most
|
||||
|
|
|
@ -3052,6 +3052,17 @@ endmenu
|
|||
menu "I2C Configuration"
|
||||
depends on STM32_I2C
|
||||
|
||||
config STM32_I2C_ALT
|
||||
bool "Alternate I2C implementation"
|
||||
default n if !STM32_PERFORMANCELINE
|
||||
default y if STM32_PERFORMANCELINE
|
||||
---help---
|
||||
This selection enables an alternative I2C driver. This alternate
|
||||
driver implements some rather complex workarounds for errata against
|
||||
the STM32 F103 "Performance Line". This selection is an option
|
||||
because: (1) It has not yet been fully verified and (2) It is not
|
||||
certain that he scope of this workaround is needed only for the F103.
|
||||
|
||||
config STM32_I2C_DYNTIMEO
|
||||
bool "Use dynamic timeouts"
|
||||
default n
|
||||
|
|
|
@ -105,11 +105,15 @@ ifeq ($(CONFIG_NUTTX_KERNEL),y)
|
|||
CHIP_CSRCS += stm32_userspace.c stm32_mpuinit.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STM32_I2C_ALT),y)
|
||||
CHIP_CSRCS += stm32_i2c_alt.c
|
||||
else
|
||||
ifeq ($(CONFIG_STM32_STM32F30XX),y)
|
||||
CHIP_CSRCS += stm32f30xxx_i2c.c
|
||||
else
|
||||
CHIP_CSRCS += stm32_i2c.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_USBDEV),y)
|
||||
ifeq ($(CONFIG_STM32_USB),y)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue