News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Storing User Data with Microblaze

Started by bn3232, August 10, 2015, 08:07:02 AM

Previous topic - Next topic

bn3232

How can I store a few data (less than 1KB) to SPI Flash?
I use "TE0600-2 LX45" module, and Xilinx SDK 13.
I know the flash is used to store the hardware (programmed by the .mcs file). Is there an empty part inside it?
Should I use the BRAM? It seems to be from 0x0000000 to 0x00001FFF.

Oleksandr Kiyenko

Hello,

You can store data in SPI Flash, using SPI commands. Data should be written at address after bitstream. With user data at some part of Flash you should use only sector erase ("device specific" in iMPACT).
You can found example how to work with SPI Flash at https://github.com/Trenz-Electronic/TE060X-GigaBee-Reference-Designs/tree/master/GigaBee_XPS14.2-Base/sw_export/eth_test/src
For small data you ca also use BRAM. Binary data to initialize BRAM can be wtitten to bitstream using data2bram or iMPACT.

Best regards
Oleksandr Kiyenko

bn3232

Quote from: Oleksandr Kiyenko on August 10, 2015, 08:17:08 AM
Hello,

You can store data in SPI Flash, using SPI commands. Data should be written at address after bitstream. With user data at some part of Flash you should use only sector erase ("device specific" in iMPACT).
You can found example how to work with SPI Flash at https://github.com/Trenz-Electronic/TE060X-GigaBee-Reference-Designs/tree/master/GigaBee_XPS14.2-Base/sw_export/eth_test/src
Thanks Oleksandr, How can I know which spi address is free to write?

bn3232

Quote from: Oleksandr Kiyenko on August 10, 2015, 08:17:08 AM
Hello,

You can store data in SPI Flash, using SPI commands. Data should be written at address after bitstream. With user data at some part of Flash you should use only sector erase ("device specific" in iMPACT).

Best regards
Oleksandr Kiyenko
I reviewed the user manual. TE0600-2 LX45 module seems to have a 1Kb EEPROM. How can I use it?

Oleksandr Kiyenko

Hello,

If you not using revisions and store only one bitstream on flash you can pick some address after your bitstream.
1. Define your bitstream size (you can define it by size of your bit file, difference is just several bytes)
2. Define sector size of flash from datasheet
3. Define address of next sector after bitstream (("bitstream size"/"sector size")+1)*"sector size"

Best regards
Oleksandr Kiyenko

Oleksandr Kiyenko

Hello,

You can access DS2502-E48 EEPROM by OneWire interface. Example I wrote you before https://github.com/Trenz-Electronic/TE060X-GigaBee-Reference-Designs/tree/master/GigaBee_XPS14.2-Base/sw_export/eth_test/src contain also code to access Onewire to read MAC address, you can also use other functions of this chip.

Best regards
Oleksandr Kiyenko