Skip to main content
Version: Next

3.4.4.1:Write target params

1:Introduce

PowerWriter part of the adapter chip, due to the different application scenarios, you need to write dynamic parameters to achieve a specific function, so PowerWriter provides an interface to write dynamic parameters to achieve the corresponding function, in order to meet the special needs of the development and production.

2:Feature entrance

Take PowerWriter RV as an example, see ‘PowerWriter RV Main -> Menu -> Execute -> Write Chip Working Parameters’ button as shown below:

image-20241120142458750

After entering the configuration page, you will see the following parameter configuration entry, as follows:

image-20241120203431976

When a chip needs special configuration, you can write special parameters through this interface to meet the demand, specifically check the configuration tutorial of the chip, when filling in the correct value, click the OK button, the parameters will be passed to the PowerWriter device to perform the initiation operation of the target chip, click Cancel to exit the configuration interface.

caution

Currently the maximum supported parameters for writing chip parameters are 256 bytes, when the chip parameters are less than 256 bytes, please arrange them from the address 0x00000000, and the device side will be cut according to the size of the parameter data volume used by the actual chip.

info

Since it is as universal design as possible, the editing is written in bytes, not in four-byte alignment for mandatory alignment. For configuration tutorials of different chips, please refer to the configuration methods in the subsequent chapters, and you can use the import and export function to quickly back up and restore the configuration information.

3:HP Micro

For chips from HP Micro, since external FLASH is used, different products may require different parameters to configure the external Flash. Therefore, if you need to use the read function to read Flash data in the online mode of the PowerWriter, you need to configure the parameters of the external Flash before you can read it.

3.1:Configuration sequence

To enable the read function, please refer to the XPI NOR Configuration Options chapter in the chip manual, or refer to the structure definition of Flash Configuration in hpm_sdk-main\boards\hpmxxxx\board.c. Take hpm6200evk as an example, the structure is as follows:

.\hpm_sdk-main\boards\hpm6200evk\board.c
/**
* @brief FLASH configuration option definitions:
* option[0]:
* [31:16] 0xfcf9 - FLASH configuration option tag
* [15:4] 0 - Reserved
* [3:0] option words (exclude option[0])
* option[1]:
* [31:28] Flash probe type
* 0 - SFDP SDR / 1 - SFDP DDR
* 2 - 1-4-4 Read (0xEB, 24-bit address) / 3 - 1-2-2 Read(0xBB, 24-bit address)
* 4 - HyperFLASH 1.8V / 5 - HyperFLASH 3V
* 6 - OctaBus DDR (SPI -> OPI DDR)
* 8 - Xccela DDR (SPI -> OPI DDR)
* 10 - EcoXiP DDR (SPI -> OPI DDR)
* [27:24] Command Pads after Power-on Reset
* 0 - SPI / 1 - DPI / 2 - QPI / 3 - OPI
* [23:20] Command Pads after Configuring FLASH
* 0 - SPI / 1 - DPI / 2 - QPI / 3 - OPI
* [19:16] Quad Enable Sequence (for the device support SFDP 1.0 only)
* 0 - Not needed
* 1 - QE bit is at bit 6 in Status Register 1
* 2 - QE bit is at bit1 in Status Register 2
* 3 - QE bit is at bit7 in Status Register 2
* 4 - QE bit is at bit1 in Status Register 2 and should be programmed by 0x31
* [15:8] Dummy cycles
* 0 - Auto-probed / detected / default value
* Others - User specified value, for DDR read, the dummy cycles should be 2 * cycles on FLASH datasheet
* [7:4] Misc.
* 0 - Not used
* 1 - SPI mode
* 2 - Internal loopback
* 3 - External DQS
* [3:0] Frequency option
* 1 - 30MHz / 2 - 50MHz / 3 - 66MHz / 4 - 80MHz / 5 - 100MHz / 6 - 120MHz / 7 - 133MHz / 8 - 166MHz
*
* option[2] (Effective only if the bit[3:0] in option[0] > 1)
* [31:20] Reserved
* [19:16] IO voltage
* 0 - 3V / 1 - 1.8V
* [15:12] Pin group
* 0 - 1st group / 1 - 2nd group
* [11:8] Connection selection
* 0 - CA_CS0 / 1 - CB_CS0 / 2 - CA_CS0 + CB_CS0 (Two FLASH connected to CA and CB respectively)
* [7:0] Drive Strength
* 0 - Default value
* option[3] (Effective only if the bit[3:0] in option[0] > 2, required only for the QSPI NOR FLASH that not supports
* JESD216)
* [31:16] reserved
* [15:12] Sector Erase Command Option, not required here
* [11:8] Sector Size Option, not required here
* [7:0] Flash Size Option
* 0 - 4MB / 1 - 8MB / 2 - 16MB
*/

Refer to the structure as above, generate the DWORD byte sequence of option[0] ~ option[3], note that an option is four bytes, a total of 16 bytes, fill in the opposite of the write parameter, click on the OK button, and then write the operation, if the write succeeds, you can carry out the read operation of the online Flash, and the write fails to get the corresponding prompt.