Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLASH_SIZE incorrectly reports flash size for cat.2 devices with DEV_ID 0x429 #6

Closed
Xeenych opened this issue Oct 30, 2020 · 4 comments
Assignees
Labels
cmsis CMSIS-related issue or pull-request. hal HAL-LL driver-related issue or pull-request.
Milestone

Comments

@Xeenych
Copy link

Xeenych commented Oct 30, 2020

FLASH_SIZE incorrectly reports flash size for cat.2 devices with DEV_ID 0x429

smt32lxx_hal_flash.h
#define FLASH_SIZE                (uint32_t)((*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU) * 1024U)
From Reference Manual
Note: For DEV_ID = 0x429, only LSB part of F_SIZE: F_SIZE[7:0] is valid. The MSB part 
F_SIZE[15:8] is reserved and must be ignored.
@RKOUSTM RKOUSTM self-assigned this Nov 3, 2020
@RKOUSTM
Copy link
Contributor

RKOUSTM commented Nov 17, 2020

Hi @Xeenych,

Thank you for your contribution. The issue you pointed out has been confirmed, a fix will be implemented and made available in future release. Thank you once again for your contribution.

With regards,

@RKOUSTM RKOUSTM added cmsis CMSIS-related issue or pull-request. hal HAL-LL driver-related issue or pull-request. labels Nov 17, 2020
@RKOUSTM
Copy link
Contributor

RKOUSTM commented Nov 17, 2020

ST Internal Reference: 96492

@RKOUSTM RKOUSTM moved this from To do to Assigned in stm32cube-mcu-fw-dashboard Nov 17, 2020
@RKOUSTM
Copy link
Contributor

RKOUSTM commented Nov 18, 2020

Hi @Xeenych,

Thank you for your contribution. A fix for this code below :

#define FLASH_SIZE (uint32_t)((*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU) * 1024U)

will be published soon in a future release (STM32L1Cube V1.10.3) looks like the following:

+ #if defined (FLASH_CUT1) || defined (FLASH_CUT2)
+ #define FLASH_SIZE                      (uint32_t)((*((uint32_t *)FLASHSIZE_BASE)&0xFFU) * 1024U)
+ #else /*FLASH_CUT3 || FLASH_CUT4 || FLASH_CUT5 || FLASH_CUT6*/
+ #define FLASH_SIZE                      (uint32_t)((*((uint32_t *)FLASHSIZE_BASE)&0xFFFFU) * 1024U)
+ #endif

In the CMSIS files, a specific definition for all device categories (Cat.1, Cat.2, Cat.3, Cat.4, Cat.5 and Cat.6) is added as follows for Cat.2 devices :

+  /*
+   * @brief Specific device feature definitions (not present on all devices in the STM32L1 serie)
+   */
+ #define FLASH_CUT2

Thank you again for your contribution.

With regards,

@RKOUSTM RKOUSTM added this to the v1.10.3 milestone Nov 18, 2020
@RKOUSTM RKOUSTM moved this from Assigned to To release in stm32cube-mcu-fw-dashboard Nov 18, 2020
@RKOUSTM
Copy link
Contributor

RKOUSTM commented Jun 8, 2021

Hi @Xeenych,

I hope you are fine.

The issue you reported has been fixed in the frame of version v1.10.3 of the STM32CubeL1 published recently on GitHub.

Thank you again for having reported.

With regards,

@RKOUSTM RKOUSTM closed this as completed Jun 8, 2021
stm32cube-mcu-fw-dashboard automation moved this from To release to Done Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmsis CMSIS-related issue or pull-request. hal HAL-LL driver-related issue or pull-request.
Projects
Development

No branches or pull requests

2 participants