STM32F429 SRAM3

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
codyhanks
Posts: 17
Joined: Thu Nov 30, 2017 7:30 pm

STM32F429 SRAM3

Post by codyhanks » Mon Apr 16, 2018 10:22 pm

I am working with the SRAM in a STM32F429 that has 256K of ram on chip.

The 429 discovery board doesn't have this memory and moving the .ld file from 192K to the 256K doesn't seem to work.

0x2002 0000 - 0x2002 FFFF SRAM3 (64 KB)
0x2001 C000 - 0x2001 FFFF SRAM2 (16 KB)
0x2000 0000 - 0x2001 BFFF SRAM1 (112 KB)

I am not really worried about having the mem in general RAM usage. After looking at the memory access method for the 4K of nv ram associated with the RTC I was thinking of a simple accessor for the sram based on that.

specifically

Code: Select all

	import stm
	class buffer(object):
		start=0x20020000
		def __getitem__(self, idx):
        		assert idx >= 0 and idx <= 0x4000, "Index must be between 0 and 16384"
       			return stm.mem32[self.start + idx * 4]
    		def __setitem__(self, idx, val):
        		assert idx >= 0 and idx <= 0x4000, "Index must be between 0 and 16384"
        		stm.mem32[self.start + idx * 4] = val

would this be the proper way? or is it already defined?

STM32F429VIT6

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: STM32F429 SRAM3

Post by pythoncoder » Wed Apr 25, 2018 8:05 am

I'm not familiar with that chip but I can't see why that wouldn't work.
Peter Hinch
Index to my micropython libraries.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: STM32F429 SRAM3

Post by jickster » Wed May 09, 2018 11:32 pm

codyhanks wrote:
Mon Apr 16, 2018 10:22 pm
The 429 discovery board doesn't have this memory and moving the .ld file from 192K to the 256K doesn't seem to work.

What exactly doesn't seem to work?

By the way:
The 4-Kbyte backup SRAM is an EEPROM-like memory area. It can be used to store data
which need to be retained in VBAT and standby mode. This memory area is disabled by
default to minimize power consumption (see Section 3.20: Low-power modes). It can be
enabled by software.
pg. 32
http://www.st.com/resource/en/datasheet/stm32f427vg.pdf

Post Reply