cancel
Showing results for 
Search instead for 
Did you mean: 

What is the specific process of accessing SRAM fixed address under CUBEIDE?

Bli.11
Associate II

Hi

Under the CUBEIDE tool, I'm doing an access to D2SRAM1~3 storage Spaces of H743I EVAL2.Use " uint8_t liku [] __attribute__ ((section (". ARM __at_0x30020000"))) = {' A ', 'B', 'C', 'D'};"Statement, but the data returned through UART1 does not match the actual data.

What is the specific process of accessing SRAM fixed address under CUBEIDE?

​ BzLi

3 REPLIES 3
TDK
Guru

I'm not sure if "__attribute__ ((section (". ARM __at_0x30020000")))" works or not.

But to access a specific memory address, the syntax is very simple:

uint8_t * ptr = (uint8_t *) 0x30020000;

You could use that to check if the linker did what you asked it to do.

If you feel a post has answered your question, please click "Accept as Solution".

The simple syntax is working only for synchronous transfers, neither for DMA nor interrupt based ones.

For interrupt or DMA based transfers, the declaration must be volatile.

DMA transfers need some cache management too.

Bli.11
Associate II

Hi TDk

Thank you very much.

Bzli