HOWTO: Program Serial RCON using S32 Debug Probe S32G2xx

cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO: Program Serial RCON using S32 Debug Probe S32G2xx

100% helpful (1/1)

HOWTO: Program Serial RCON using S32 Debug Probe S32G2xx

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:

  1. Fuses (internal to the device)
  2. Parallel (GPIO pins/DIP Switches on EVB)
  3. 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. 

 

Preparation

  1. Install S32 Design Studio IDE 
  2. 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. 

    image.png

  3. Connect the S32 Debug Probe to the S32G-VNP-EVB and the host PC containing S32 Design Studio installation.
  4. Set BOOTMOD pins to boot from RCON

    image.png

  5. Set BOOT_CFG[8]=1 on the S32G-VNP-EVB, for serial RCON mode

    VNP-EVB shown here with switch BOOT_CFG[8] = 0

    image.png
    See the EVB documentation and device reference manual for more details.

Procedure

 

  1. Open cmd window to the S32 Debugger folder where the device-specific scripts are located.
    C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx

  2. Set Python path so correct version is used (if not already set in env vars)
    set PYTHONPATH=C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7;C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages

    image.png

  3. 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.


    image.png

    1. Adjust the RCON_DATA for the configuration you wish to program. 
    2. Do not adjust RCON_ADDR.
    3. Adjust the S32DBG_IP for the IP address of your S32 Debug Probe. 
    4. Adjust the INTERACTIVE_MODE 
      1. Set True, if desired to be prompted to enter RCON_DATA
      2. Set False, if desired to have script automatically enter RCON_DATA, based on the value set within the file.
    5. Adjust _SOC_NAME as appropriate for the specific S32G2xx device you are using. The valid options are defined in s32g2xx_context.py.
  4. Enter the command to start GDB, passing in the RCON Python script:
    Windows OS:
    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
    OR
    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

    image.png

  5. If everything worked properly, then the value you programmed will be displayed to the screen.

    image.png

  6. To exit GDB, enter 'quit'.
Version history
Revision #:
3 of 3
Last update:
‎03-11-2021 07:08 PM
Updated by: