This document details the steps to program external EEPROM with the 32 reset configuration bits in support of the 'Boot from serial RCON' method detailed in the S32G Reference Manual. The Python scripts used for this task are designed and tested to work on the S32G-VNP-EVB with S32G2xx Rev2 and the Atmel AT24C01C it contains.(Serial EEPROM is not implemented on NXP VNP-RDB board)
The RCON can be set by the following:
- Fuses (internal to the device)
- Parallel (GPIO pins/DIP Switches on EVB)
- Serial (EEPROM connected via I2C)
The Serial option can be programmed using a debug probe connected via JTAG. This enables the RCON to be controlled remotely, assuming the debug probe is setup to allow remote connections.
- Install S32 Design Studio IDE
- Install the Development Package for the device you are debugging. This is important as the S32 Debugger provides access to the EEPROM programming capabilities via I2C of the S32 Debug Probe.
- Connect the S32 Debug Probe to the S32G-VNP-EVB and the host PC containing S32 Design Studio installation.
- Set BOOTMOD pins to boot from RCON
- Set BOOT_CFG=1 on the S32G-VNP-EVB, for serial RCON mode
VNP-EVB shown here with switch BOOT_CFG = 0
See the EVB documentation and device reference manual for more details.
- Open cmd window to the S32 Debugger folder where the device-specific scripts are located.
- Set Python path so correct version is used (if not already set in env vars)
- Edit the python script to adjust the value to be programmed to RCON, s32g2xx_i2c_RCON.py. Note: The listed examples show only the minimum values required to configure each of the external memory types. Additional settings may be required for your specific application.
- Adjust the RCON_DATA for the configuration you wish to program.
- Do not adjust RCON_ADDR.
- Adjust the S32DBG_IP for the IP address of your S32 Debug Probe.
- Adjust the INTERACTIVE_MODE
- Set True, if desired to be prompted to enter RCON_DATA
- Set False, if desired to have script automatically enter RCON_DATA, based on the value set within the file.
- Adjust _SOC_NAME as appropriate for the specific S32G2xx device you are using. The valid options are defined in s32g2xx_context.py.
- Enter the command to start GDB, passing in the RCON Python script:
C:\NXP\S32DS.3.4\S32DS\build_tools\gcc_b1620\gcc-6.3-arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32g2xx_i2c_RCON.py
C:\NXP\S32DS.3.4\S32DS\build_tools\gcc_v9.2\gcc-9.2-arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32g2xx_i2c_RCON.py
Linux OS: arm-none-eabi-gdb-py -x .\s32g274a_i2c_RCON.py
- If everything worked properly, then the value you programmed will be displayed to the screen.
- To exit GDB, enter 'quit'.