Skip to main content
Javier1
Principal
November 4, 2021
Solved

Why cant i write into mem 0x40026410?

  • November 4, 2021
  • 2 replies
  • 1887 views

stm32f207zg (nucleo-f207zg)

Hi, im trying to write into my DMA2 Stream0 CR register (mapped as 0x40026410).

But that memory addr cannot be written not with my init code nor manually trough the STM32IDE debugging tools .

Is there any memory protection or lock i am missing?

0693W00000GWRvlQAH.gif0693W00000GWRvWQAX.gif

This topic has been closed for replies.
Best answer by Bruno_ST

Hello @Javier Muñoz​ 

Just a basic question: Did you enable the DMA2 clock ? (RCC_AHB1ENR bit 22) ?

(or call corresponding HAL/LL to do it)

BR,

Bruno

2 replies

Bruno_STBest answer
ST Employee
November 4, 2021

Hello @Javier Muñoz​ 

Just a basic question: Did you enable the DMA2 clock ? (RCC_AHB1ENR bit 22) ?

(or call corresponding HAL/LL to do it)

BR,

Bruno

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Javier1
Javier1Author
Principal
November 4, 2021

Howdy @Bruno_ST​ 

Ding ding ding!, that was it.

Im using autogenerated CUBEMX code.

It looks like CubeMX places ADCDMA config after the DMA clock is enabled (RCC->AHB1ENR), so thats why it wasnt working

0693W00000GWS5bQAH.pngIf i move the MX_DMA_Init before the ADC init everything works

hit me up in https://www.linkedin.com/in/javiermuñoz/