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 S32R Reference Manual. The Python scripts used for this task are designed and tested to work on the S32R45 EVB and the Atmel AT24C01C it contains.
The RCON can be set by the following:
- Fuses (internal to the device)
- Parallel (GPIO pins/DIP Switches on S32R45 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 support within it contains the device-specific Python scripts required for initialization of the cores.
- Connect the S32 Debug Probe to the S32R45 EVB and the host PC containing S32 Design Studio installation.
- Set BMODE pins to Boot from RCON
- Set BOOT_CFG=1 on the S32R EVB, for serial RCON mode
See the EVB documentation and device reference manual for more details on BOOT_CFG settings, etc.
- 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, s32r45_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 in the command window to enter RCON_DATA
- Set False, if desired to have script automatically enter RCON_DATA, based on the value set within the file.
- Enter the command to start GDB, passing in the RCON Python script:
Windows OS: C:\NXP\S32DS.3.4\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32r45_i2c_RCON.py
Linux OS: arm-none-eabi-gdb-py -x .\s32r45_i2c_RCON.py
- You may need to press enter a couple of times. If everything worked properly, then the value you programmed will be displayed to the screen.
- To exit GDB, enter 'quit'.
- Before performing boot from serial RCON, remember to set BOOT_CFG = 1. See the EVB documentation and device reference manual for more details.