This topic explains steps to configure the “MT25QU02GCBB8E12” flash device for LX2160ARDB. The steps are common for most of the flash devices. If the procedure does not work for a particular flash device, please contact NXP Support.
Prerequisite: CW version 2019.01
In a custom design with LX2160, if you want to use the MT25QU02GCBB8E12 flash device which is not supported by the flash programmer, you can add support for the new flash device by following these steps:
<device-file>
<device>
<content>
<device_parameters>
<device_type>spi</device_type>
<manufacturerid>0x20</manufacturerid>
</device_parameters>
<name>MT25QU02GBBB</name>
<sectors>
<sector count="4096" size="0x10000"/>
</sectors>
<organizations>
<organization depth="128M" width="8">
<id>0xBB22</id>
<algorithm>
<fpinclude href="algorithms/MT25QU02GBBB.xml"/>
</algorithm>
</organization>
</organizations>
</content>
</device>
</device-file>
<algorithm-file>
<architectures>
<architecture type="arm" address_size="64">
<controller type="QSPI">
<format>bin</format>
<entry_point>0x100</entry_point>
<file>QSPI_64b</file>
<fpinclude href="algorithms/params/MT25QU02GBBB_QSPI_64.xml"/>
<supported_operations>
<operation>id</operation>
<operation>erase_sectors</operation>
<operation>program</operation>
<operation>dump</operation>
<operation>protect_sectors</operation>
<operation>unprotect_sectors</operation>
</supported_operations>
</controller>
<controller type="FSPI">
<format>bin</format>
<entry_point>0x100</entry_point>
<file>FSPI_64b</file>
<fpinclude href="algorithms/params/MT25QU02GBBB_QSPI_64.xml"/>
<supported_operations>
<operation>id</operation>
<operation>erase_sectors</operation>
<operation>program</operation>
<operation>dump</operation>
<operation>protect_sectors</operation>
<operation>unprotect_sectors</operation>
</supported_operations>
</controller>
</architecture>
</architectures>
</algorithm-file>
<params_file>
<parameters_block>
<param name="function" size="0x4"/>
<param name="padding1" size="0x4"/>
<param name="base_addr" size="0x8"/>
<param name="num_items" size="0x4" type="data_size"/>
<param name="result_status" size="0x4" type="result"/>
<param name="items" size="0x8" type="data_inout"/>
<param name="qspi_base_addr" size="0x8"/>
<param name="qspi_controller_offset" size="0x4"/>
<param name="bytes_per_sector" size="0x4" value="0x10000"/>
<param name="bytes_per_page" size="0x4" value="0x100"/>
<param name="number_of_sectors" size="0x4" value="0x1000"/>
<param name="swap_enable" size="0x1"/>
<param name="workaround" size="0x1" value="0"/>
<param name="is_nand" size="0x1" value ="0"/>
<param name="block_protect_mask" size="0x1" value="0x5C"/>
<param name="top_bottom_reg_address" size="0x4" value="0"/>
<param name="top_bottom_mask" size="0x1" value="0x20"/>
def Config_Flash_Devices():
fl = flash.create(TA)
# Add FlexSPI device
#fl.add_device({"alias": "xspi", "name": "MT35XU512ABA", "address": 0x0, "ws_address": 0x18000000, "ws_size": 0x1FFFF, "geometry": "8x1", "controller": "FSPI"})
# Add MT25QU02GCBB8E12 flash device
fl.add_device({"alias": "xspi", "name": "MT25QU02GBBB", "address": 0x0, "ws_address": 0x18000000, "ws_size": 0x1FFFF, "geometry": "4x1", "controller": "FSPI"})