micropython / stm32lib

STM32 Cube library - CMSIS and HAL for F4, F7 and L4 microcontrollers
63 stars 71 forks source link

[stm32h743] Errata version Y #3

Closed rolandvs closed 4 years ago

rolandvs commented 5 years ago

Dear Damien,

I noticed a bit reversal in the version Y Errata sheet of the STM32H743. How to cope with such "features" as they vanish with the next silicon revision?

#define RCC_BDCR_LSEDRV_Pos                    (3U)
#define RCC_BDCR_LSEDRV_Msk                    (0x3U << RCC_BDCR_LSEDRV_Pos)   /*!< 0x00000018 */
#define RCC_BDCR_LSEDRV                        RCC_BDCR_LSEDRV_Msk
#define RCC_BDCR_LSEDRV_0                      (0x2U << RCC_BDCR_LSEDRV_Pos)   /*!< ERRATE BIT REVERSED 0x00000010 */
#define RCC_BDCR_LSEDRV_1                      (0x1U << RCC_BDCR_LSEDRV_Pos)   /*!< ERRATE BIT REVERSED 0x00000008 */

// SEE ERRATE SHEET REV Y CHIPS ORIGINAL
//#define RCC_BDCR_LSEDRV_0                      (0x1U << RCC_BDCR_LSEDRV_Pos)   /*!< 0x00000008 */
//#define RCC_BDCR_LSEDRV_1                      (0x2U << RCC_BDCR_LSEDRV_Pos)   /*!< 0x00000010 */

#define RCC_BDCR_LSECSSON_Pos                  (5U)
#define RCC_BDCR_LSECSSON_Msk                  (0x1U << RCC_BDCR_LSECSSON_Pos) /*!< 0x00000020 */
dpgeorge commented 5 years ago

How to cope with such "features" as they vanish with the next silicon revision?

It's probably best to follow how ST handle it in their Cube HAL: they might have run-time detection of the silicon version, or compile-time selection. But in any case, this particular bug has low impact because swapping these two bits just swaps the meaning of "medium low drive" and "medium high drive".

rolandvs commented 4 years ago

Is it possible to update the HAL to the latest version 1.6. There seems to be some improvements that also have to do with the die change revision V. I have some problems with the Flash with the Rev V that did not occur in the Rev Y. Especially the Flash gets corrupted after programming the image.

dpgeorge commented 4 years ago

Yes it would be good to update it. Hopefully the update includes support for 480MHz SYSCLK as well.

dpgeorge commented 4 years ago

The H7 HAL is now updated to v1.6.0, currently on branch work-F0-1.9.0+F4-1.16.0+F7-1.7.0+H7-1.6.0+L0-1.11.2+L4-1.8.1+WB-1.6.0