cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access memory of peripherals

MBos.1
Associate II

Hello everyone,

I am working with STM32H755ZI,, ARM GCC and J-Link GDB.

Considering Reference Manual the H755ZI has following Memory Map (cutout):

...

0x40007C00 - 0x40007FFF UART8

0x40007800 - 0x40007BFF UART7

0x40007400 - 0x400077FF DAC1

0x40006C00 - 0x40006FFF HDMI-CEC

0x40005C00 - 0x40005FFF I2C3

0x40005800 - 0x40005BFF I2C2

0x40005400 - 0x400057FF I2C1

0x40005000 - 0x400053FF UART5

0x40004C00 - 0x40004FFF UART4

0x40004800 - 0x40004BFF USART3

0x40004400 - 0x400047FF USART2

0x40004000 - 0x400043FF SPDIFRX

...

When I wanted to initialise the peripheral UART4 I noticed it's not possible to write to that memory space.

I tried with HAL Driver and then with direct register write but the memory does not change. I also tried the UART5, the I2C1, I2C2 and I2C3 without success.

Since these peripherals are all at the same memory part I thought about some kind of memory protection.

On the internet I found information about the Flash Patch and Breakpoints FPB and lock access register LAR. But writing 0xC5ACCE55 to memory 0xFB0 (LAR) like they propose didn't help.

On the same STM32H755ZI I had already got the USART1, USART3 (which is right below UART4 in memory space), USART6, the I2C4 and other peripherals working with the HAL Library.

Thanks for any help.

Kind regards

Michael

11 REPLIES 11

When CubeMX enables the clock for UART3, which is configured in CubeMX, it does not mean the clock for UART4 will be enabled as well.

Besides, CubeMX has not yet matured enough to generate reliable code. It might enable the right clock for one peripheral, and messing up another.

MBos.1
Associate II

Thanks a lot, found the mistake.

I set the APB register and now its working.