7336 - Lattice Radiant v2023.2: How to modify I2C slave address or 96-feabits using Pseudo mode?

7336 - Lattice Radiant v2023.2: How to modify I2C slave address or 96-feabits using Pseudo mode?

Description:
Nexus device family has a default I2C slave address of 0x40 and you are allow to modify it based on your requirement.

Solution:

To permanently modify the I2C address, you can modify the desired value in .fea file and use the Programmer or Programming File Utility tool to permanently fuse the I2C address in EFUSE. Please note that the programming via .fea file using Programmer is One Time Programming(OTP) into non-volatile memory that is non-reversible.

To temporarily change the I2C Slave Address through modifying the temporary value written in shadow register, you can use the ISC_ENABLE/ISC_ENABLE_X command with Pseudo mode followed by programming the feabits command, the modified feabits will be wipe out once the device is power-cycled. Refer to picture and Pseudo Mode description below excerpted from SysConfig UG for more details.



Pseudo Mode – In Pseudo Non-volatile(NV) Memory access mode, the program command execution writes the shifted-in data into the shadow register, instead of the NV Memory, if the targeted NV Memory content is associated with a shadow register.

  1. The I2C Slave Address is part of the 96-feature bits, you can modify the I2C Slave Address by executing the LSC_PROG_FEATURE(0xE4) instruction.
  2. The 8-bit location of the I2C Slave Address bits(2..9) is located at bit[45..52].
  3. Example below shows the command to program I2C Slave Address(2..9) to 11110000(hex F0) in SVF file, the address is highlighted in yellow.

! Shift in LSC_PROG_FEATURE( 0xE4) instruction
SIR         8             TDI  (E4);
SDR        96           TDI  (00000000000F000100000001); 

    

Please refer to below link for an example of SVF file to program the 96-feabits with Pseudo mode in MachXO5 device.  
https://latticesemi.files.com/f/d168dad43ae1bb0f/FAQ%237336

Please refer to below steps to program I2C Slave Address using Pseudo mode:

  1. Launch the Download Debugger tool from Radiant Programmer.
  2. Open the SVF file.
  3. Click the GO button to execute SVF file.
  4. Download Debugger prompts a window and indicates “Process done. No error.” once the SVF file is executed without error.
  5. Read the feature row using Programmer to confirm if the I2C Slave Address is programmed with the desired value. For example:
Before executing the SVF
After executing the SVF