Memory-mapped flash on F7 and H7

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

User avatar
Giovanni
Site Admin
Posts: 13345
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 809 times
Been thanked: 708 times
Contact:

Re: Memory-mapped flash on F7 and H7

Postby Giovanni » Sat Feb 20, 2021 8:36 pm

I took it from the F7 code.

Code: Select all

RCC_AHB3ENR_QSPIEN | RCC_AHB3RSTR_QSPIRST


Note that you are mixing constants of 2 different registers here.

Giovanni

andypiper
Posts: 39
Joined: Sat Oct 24, 2020 5:21 pm
Has thanked: 3 times
Been thanked: 2 times

Re: Memory-mapped flash on F7 and H7

Postby andypiper » Sat Feb 20, 2021 10:00 pm

Giovanni wrote:I took it from the F7 code.

Code: Select all

RCC_AHB3ENR_QSPIEN | RCC_AHB3RSTR_QSPIRST


Note that you are mixing constants of 2 different registers here.

Giovanni


I wondered about that, but isn't this the same?

Code: Select all

  rccResetAHB4(~(RCC_APB4RSTR_SYSCFGRST | STM32_GPIO_EN_MASK));

?

User avatar
Giovanni
Site Admin
Posts: 13345
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 809 times
Been thanked: 708 times
Contact:

Re: Memory-mapped flash on F7 and H7

Postby Giovanni » Sat Feb 20, 2021 10:29 pm

andypiper wrote:

Code: Select all

  rccResetAHB4(~(RCC_APB4RSTR_SYSCFGRST | STM32_GPIO_EN_MASK));

?


STM32_GPIO_EN_MASK is used for both enabling and resetting, it relies on registers having bits in same position. If you use ST header definitions then better use the correct ones.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 5 guests