From bde06f7697fcbe09d061e1c77515f962ef09452b Mon Sep 17 00:00:00 2001 From: Anton Staaf Date: Mon, 3 Nov 2014 13:23:30 -0800 Subject: [PATCH] USB: stm32f3: use correct values for USB RAM size and usb_uint The RAM size was copied from the STM32F0 definition which was not correct, and the usb_uint computation was only checking for the STM32F0 family, assuming that all others were the old uint32_t access size. Signed-off-by: Anton Staaf BRANCH=None BUG=None TEST=make buildall -j Change-Id: I28951351601254ea6ebabaec2687d6bfe716b699 Reviewed-on: https://chromium-review.googlesource.com/227210 Tested-by: Anton Staaf Reviewed-by: Vic Yang Reviewed-by: Vincent Palatin Commit-Queue: Anton Staaf --- chip/stm32/config-stm32f373.h | 2 +- include/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chip/stm32/config-stm32f373.h b/chip/stm32/config-stm32f373.h index 2b742bafdf..2553702877 100644 --- a/chip/stm32/config-stm32f373.h +++ b/chip/stm32/config-stm32f373.h @@ -38,4 +38,4 @@ #define CONFIG_IRQ_COUNT 81 /* STM32F3 has a larger USB RAM */ -#define CONFIG_USB_RAM_SIZE 1024 +#define CONFIG_USB_RAM_SIZE 512 diff --git a/include/usb.h b/include/usb.h index bce830ebb3..65dc8236f4 100644 --- a/include/usb.h +++ b/include/usb.h @@ -226,7 +226,7 @@ struct usb_endpoint_descriptor { /* Helpers for managing the USB controller dedicated RAM */ /* primitive to access the words in USB RAM */ -#ifdef CHIP_FAMILY_STM32F0 +#if defined(CHIP_FAMILY_STM32F0) || defined(CHIP_FAMILY_STM32F3) typedef uint16_t usb_uint; #else /* older chips use a weird addressing were 16-bit words are 32-bit appart */