Wiki

This version is outdated by a newer approved version.DiffThis version (22 Jun 2018 06:55) was approved by Venkatesan Krishnamoorthy.The Previously approved version (24 May 2018 07:47) is available.Diff

This is an old revision of the document!


Flash Programmer (ADAU145x)

Click here to return to the Master Control Port section.

This module provides support to write raw data to the external flash memory using I2C/SPI. The I2C/SPI write is performed during the initialization before the audio processing in the schematic is started.



Configurations

Click on the configure button to configure the SPI/I2C interface for the module.

GUI Control NameDefault ValueRangeFunction Description
Protocol SPISPI/I2C Master Control Port Protocol
Bit Rate100kHZ 100 kHZ - 100000 kHZ (for SPI)/ 400 or 800 or 1000 kHz (for I2C)SPI/I2C Speed
Default Chip/ Device Address0 0-6 Slave Select for the SPI. Register window should be configured to match this selection.Please refer the note below.
Sub-Address Bytes2 1-4 Number of address bytes excluding the read/write command
PageSize128KB0-32MBPage Size of Flash
SPI ModeMode 3 Mode0/Mode3SPI operation mode
R/W (Chip Address) Bytes10-255Command Bytes (Number of bytes required for command)
Write Instruction (SPI)20-255 Instruction value for a write operation (0x0 for ADI audio devices, typically 0x2 for eeprom/flash)
Read Instruction (SPI)30-255Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)
Write-Enable instruction (SPI)60-255Instruction value for device write-enable operation
Block Protection Unlock (SPI)1520-255Block Protection Unlock command for SPI falsh devides. This is an optional command. This can be disabled.
Chip-Erase instruction (SPI)960-255Instruction value for device erase operation
Chip-Erase Time (SPI)5 sec1-600 secTime required for chip erase operation
Data File NA NA Raw data to be written to the flash (Can be ascii text file/ binary files like wav file)
Data File Mode ASCII ASCII/Binary Mode to write the file. Audio files like .wav should be written in binary mode
Start Address 0 0 - Maximum of FLASH/EEPROM Size in bytes(Increment by page size) Write the data in the flash/e2prom from the specified address

Any change in these SPI/I2C configuration parameters requires a recompilation.
Note: The following image shows an example ASCII data file.

ding.txt
[ASCII 44100Hz, Channels: 2, Samples: 5, Flags: 0]                        
-0.005768 
-0.005768 
-0.003235 
-0.003235 
-0.002167 
-0.002167 
-0.004151 
-0.004151 
-0.005554 
-0.005554


Writing Multiple Files

Number of files to be written can be configured by right clicking on the module. All the files will be written one after another if multiple files are selected. This support upto 32 files.


Example

Writing a Wav file to SPI EEPROM using Flash Programmer (ADAU1452)

  • Add Flash Programmer module to the schematic.
  • Configure SPI parameters in the Control Port Properties window. (Below window shows SPI configuration required to write to EEPROM in EVAL-ADAU1452MINIZ board)



  • Select Binary mode
  • Select the Wav file to be written (Make sure size of the wav file is not greater than the size of EEPROM. In the case of EVAL-ADAU1452MINIZ, size of wav file should not be greater than 128 KB)
  • Press OK. Then Link compile download.
  • Press OK when the following warning displayed.



  • Then the wav file is written to the EEPROM.



  • After the write is completed, press Yes in the following window to verify the write operation.



  • Verification should be successful as shown below.



  • Verification will fail if the file is more than 128 KBytes. Make sure file is not more than 128 KBytes and re-write if it is failed.



resources/tools-software/sigmastudio/toolbox/mastercontrolport/flashprogrammer.1529643312.txt.gz · Last modified: 22 Jun 2018 06:55 by Venkatesan Krishnamoorthy