This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5716: App launched from SBL cannot access EEPROM

Part Number: AM5716

Hello.

The app I'm creating writes and reads to EEPROM.
EEPROM is accessed by SPI.

Using XDS110, the app started from CCS will succeed in writing and reading to EEPROM.
However, it cannot be read from EEPROM in the following cases.

Put SBL and app in QSPI.
- Boot QSPI and start the app from SBL.
- The started app reads from EEPROM, but the read results are all 0x00.

The app launched from CCS and the app launched from SBL are exactly the same program.
From this, I think that the EEPROM cannot be accessed from the app after the SBL is started.

Is the app unable to use the resources required for EEPROM access due to SBL?
When I check the SBL program, it executes a function called "Board_init".
I thought there was a function called "Board_deinit" for this, but this function seemed to be removed from the library now.

SBL is created with the following files.
C:\ti\pdk_am57xx_1_0_15\packages\ti\boot\sbl\board\idkAM571x\sbl_main.c

What are the possible causes?
Please let me know if there are any points to investigate.

thank you.

  • Hi,

    As you are saying that the you are able to read EEPROM from CCS, your application is configured correctly. Can you try below debugging technique :

    • Do yo have SD slot? Did you tried with SD boot? This will tell whether SBL is a problem.
    • Have you tried running CCS binary after QSPI boot? Let the board boot from QSPI, then connect the CCS without gel and then load and execute your binary.
  • Hello.
    Thank you very much for your reply.

    With your advice, I tried the following:

    <No SBL>
    - I empty QSPI.
    - Run app from CCS. (However, starting with GEL. I didn't know how to connect to CCS without GEL)
    - I was able to access the EEPROM from the app.

    <With SBL: SD boot>
    - I empty QSPI.
    - Put SBL (MLO) and app in microSD and boot SD.
    - The EEPROM could not be accessed from the app.
    - Run the same app from CCS. (However, starting with GEL. I didn't know how to connect to CCS without GEL)
    - The EEPROM could not be accessed from the app.

    <With SBL: QSPI boot>
    - Launch SBL and app from QSPI.
    - The EEPROM could not be accessed from the app.
    - Run the same app from CCS. (However, starting with GEL. I didn't know how to connect to CCS without GEL)
    - The EEPROM could not be accessed from the app.

    After all, after SBL is started, the EEPROM cannot be accessed from the app.

    I have tried the following two.

    <Launch SBL that does nothing>
    - In main function, put SBL that loops infinitely with "while (1)" into QSPI before executing Board_init.
    - Start SBL from QSPI.
    - Run app from CCS. (However, starting with GEL. I didn't know how to connect to CCS without GEL)
    - I was able to access the EEPROM from the app.

    <Start SBL that executes only Board_init>
    - In the main function, put the SBL that loops infinitely with "while (1)" into QSPI immediately after executing Board_init.
    - Start SBL from QSPI.
    - Run app from CCS. (However, starting with GEL. I didn't know how to connect to CCS without GEL)
    - You cannot access the EEPROM from the app.

    It would be nice if there was a post-processing function of the Board_init function, but there is no function called "Board_deinit" in the library.
    Library-> C: \ ti \ ppk_am57xx_1_0_15 \ packages \ ti \ board \ lib \ idkAM571x \ a15 \ release \ ti.board.aa15fg
    Are there any functions I have to execute after running Board_init?

    What else should I look for?
    thank you.

  • Supplement.

    <Start SBL that executes only Board_init>
    --In the main function, put the SBL that loops infinitely with "while (1)" into QSPI immediately after executing Board_init.
    --Start SBL from QSPI.
    --Run app from CCS. (However, starting with GEL. I didn't know how to connect to CCS without GEL)
    --You cannot access the EEPROM from the app.

    The above was inaccurate. It should be as follows.

    <Start SBL that executes only Board_init>
    --In the main function, put the SBL that loops infinitely with "while (1)" into QSPI immediately after executing Board_init.
    --Start SBL from QSPI.
    --The app cannot be started because it cannot be connected from CCS to A15.
    (Cannot proceed from "GEL Expression: OnTargetConnect ()")

    The arguments of Board_init are as follows.
    boardCfg =
    BOARD_INIT_PLL_OPP_NOM |
    BOARD_INIT_UNLOCK_MMR |
    BOARD_INIT_MODULE_CLOCK |
    BOARD_INIT_PINMUX_CONFIG |
    BOARD_INIT_DDR |
    BOARD_INIT_UART_STDIO |
    BOARD_INIT_WATCHDOG_DISABLE;

  • Hi,

    for connecting without gel file, please use below sequence:

    • Power cycle the board and let it boot from QSPI.
    • Open CCS.
    • Launch the Target Configuration but don’t connect any core.
    • Right click on the required core -> open gel files view -> right click in the gel/script section -> remove all. Basically, you have to connect the core without gel initialization.
    • Then, connect the core and load and run your binary.(No need to connect M3 first)
    Put SBL (MLO) and app in microSD and boot SD.

    Are you putting only these two files? Is the SBL is loading? Are you seeing any prints?

    <With SBL: QSPI boot>

    Again, is the SBL booting? Are you seeing any prints? How are you flashing the binaries to QSPI?

    Generally, there are two parts just like CCS when we load SBL:

    • we have to do initialization
    • and, we have to load the binary
    Steps CCS SBL(QSPI) SBL(SD)
    Initialization through gel files Through MLO flashed at proper offset. putting the contents in SD
    binary/app loading through GUI binary flashed at proper offset.

     Therefore, i suggest instead of loading your app through SBL, try something provided with SDK(may be any diag). That will clear the SBL part that SBL is loading correctly. Once the diagnostic works, replace with your binary.

  • Hello.

    Sorry for the late reply.

    First, SD boot and QSPI boot have confirmed that the SBL is loaded correctly.

    I have newly discovered the following.

    About the problem that "app cannot access EEPROM after starting SBL".
    My SBL does the following:
    --------------------------------------------
    boardCfg= BOARD_INIT_PLL_OPP_NOM |
      BOARD_INIT_UNLOCK_MMR |
      BOARD_INIT_MODULE_CLOCK |
      BOARD_INIT_PINMUX_CONFIG |
      BOARD_INIT_DDR |
      BOARD_INIT_UART_STDIO |
      BOARD_INIT_WATCHDOG_DISABLE;


    Board_init(boardCfg);
    --------------------------------------------

    In the case of SBL excluding "BOARD_INIT_PINMUX_CONFIG" from boardCfg, the app after starting SBL could access EEPROM.

    The value of boardCfg is based on "sbl_main.c" of PDK.
    Why does "sbl_main.c" in PDK enable "BOARD_INIT_PINMUX_CONFIG"?
    What happens if I exclude "BOARD_INIT_PINMUX_CONFIG"?

    thank you.

  • Hi,

    In the case of SBL excluding "BOARD_INIT_PINMUX_CONFIG" from boardCfg, the app after starting SBL could access EEPROM.

    then, it is BOARD_INIT_PINMUX_CONFIG which is causing the problem.

    Why does "sbl_main.c" in PDK enable "BOARD_INIT_PINMUX_CONFIG"?

    This will do the pinmuxing of different interfaces on board.

    What happens if I exclude "BOARD_INIT_PINMUX_CONFIG"?

    From the execution point of view it will not cause any issue. 

    Do your application is also doing Board_init(boardCfg); inside main? If so what all flags it is having?

  • Hello.

    thank you for your reply.

    > Do your application is also doing Board_init (boardCfg); inside main? If so what all flags it is having?


    The app launched from SBL is not running "Board_init".

    I have another question.

    If you execute "Board_init" with "BOARD_INIT_PINMUX_CONFIG", "Board_pinmuxConfig" will be executed from "Board_init".
    "Board_pinmuxConfig" is in the following file.
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board\src\idkAM571x\idkAM571x.c

    Various processing is performed in "Board_pinmuxConfig".
    Among those processes, I want to find the process of the problem.
    Therefore, I want to recreate the library (ti.board.aa15fg) by myself.
    How can I modify "idkAM571x.c" to build "ti.board.aa15fg"?
    Do you use "C:\ti\pdk_am57xx_1_0_15\packages\ti\board\makefile"?
    I'm not very familiar with PDK, so please tell me in detail.

    Thank you.

  • Hi,

    Please follow the following procedure to modify Board_pinmuxConfig and building ti.board.aa15fg
    1) Modify the Board_pinmuxConfig in C:\ti\pdk_am57xx_1_0_15\packages\ti\board\src\idkAM571x\idkAM571x_pinmux.c
    2) Go to C:\ti\pdk_am57xx_1_0_15\packages\
    3) Setup build environment by running pdksetupenv script based on your OS environment.
    4) Go to C:\ti\pdk_am57xx_1_0_15\packages\ti\board
    5) Run the command "make BOARD=board_name CORE=core_name"
    where board_name can be,
    idkAM571x, idkAM572x, idkAM574x, evmAM572x
    and
    core_name can be,
    c66x, a15_0, ipu1_0 (use a15_0 to build "ti.board.aa15fg")

    Note: Use gmake instead of make if you are working on windows.

    As you mentioned correctly, this will use C:\ti\pdk_am57xx_1_0_15\packages\ti\board\makefile, which will in turn use C:\ti\pdk_am57xx_1_0_15\packages\ti\build\comp_top.mk which will use respective makefile for the corresponding libraries and examples (C:\ti\pdk_am57xx_1_0_15\packages\ti\board\build\makefile.mk for building board libraries).

  • Hello.

    thank you for your reply.

    You have performed steps 1-5.
    In step 5, the following command was executed.
    gmake BOARD = idkAM571x CORE = a15_0

    The following error occurred.
    Is my procedure wrong?

    (My environment is windows)

    Microsoft Windows [Version 10.0.19042.1288]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\WINDOWS\system32>cd C:\ti\pdk_am57xx_1_0_15\packages
    
    C:\ti\pdk_am57xx_1_0_15\packages>pdksetupenv.bat
    ***************************************************
    Environment Configuration:
    ***************************************************
        SDK_INSTALL_PATH        : C:/ti
        GMAKE_INSTALL_PATH      : C:/ti/xdctools_3_51_01_18_core
        RULES_MAKE              : C:/ti/pdk_am57xx_1_0_15/packages/Rules.make
    ***************************************************
    
    C:\ti\pdk_am57xx_1_0_15\packages>cd C:\ti\pdk_am57xx_1_0_15\packages\ti\board
    
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board>gmake BOARD=idkAM571x CORE=a15_0
    gmake libcores BOARD=evmAM572x
    gmake[1]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake lib_allendians CORE=c66x BUILD_PROFILE_c66x=release
    gmake[2]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake comp_libs ENDIAN=little
    gmake[3]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake -C C:/ti/pdk_am57xx_1_0_15/packages/ti/board -f build/makefile.mk
    gmake[4]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[4]: Nothing to be done for 'all'.
    gmake[4]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[3]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[2]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake lib_allendians CORE=a15_0 BUILD_PROFILE_a15_0=release
    gmake[2]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake comp_libs ENDIAN=little
    gmake[3]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake -C C:/ti/pdk_am57xx_1_0_15/packages/ti/board -f build/makefile.mk
    gmake[4]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[4]: Nothing to be done for 'all'.
    gmake[4]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[3]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[2]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake lib_allendians CORE=ipu1_0 BUILD_PROFILE_ipu1_0=release
    gmake[2]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake comp_libs ENDIAN=little
    gmake[3]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake -C C:/ti/pdk_am57xx_1_0_15/packages/ti/board -f build/makefile.mk
    gmake[4]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[4]: *** No rule to make target 'C:/ti/ti-cgt-arm_18.12.1.LTS/include/stdint.h', needed by 'C:/ti/pdk_am57xx_1_0_15/packages/ti/binary/ti/board/board/obj/evmAM572x/m4/release/board.oem4'.  Stop.
    gmake[4]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[3]: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:368: board] Error 2
    gmake[3]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[2]: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:158: little_lib] Error 2
    gmake[2]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[1]: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:155: ipu1_0_lib] Error 2
    gmake[1]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:149: evmAM572x_lib] Error 2
    
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board>

  • Hi,

    Looks like stdint.h is missing. Can you please check if stdint.h is available at C:/ti/ti-cgt-arm_18.12.1.LTS/include? 

    Regards,

    Parth

  • Hello.
    thank you for your reply.

    The folder "C:/ti/ti-cgt-arm_18.12.1.LTS/" does not exist.
    Instead, there is "C:/ti/ti-cgt-arm_16.9.6.LTS/include/stdint.h".

    Where should I fix it?
    thank you.

  • Hi, 

    You can change the  CGT_ARM_VERSION to 16.9.6.LTS in C:\ti\pdk_am57xx_1_0_15\packages\ti\build\pdk_tools_path.

    Also, you can try installing the latest SDK, where all these dependencies are taken care by pdksetupenv script.

    Regards,

    Parth

  • Hello.
    thank you for your reply.

    There is no file "C:\ti\pdk_am57xx_1_0_15\packages\ti\build\pdk_tools_path".
    The files in the "build" folder are as follows.
    ・ Comp_paths.mk
    ・ Comp_top.mk
    ・ Makefile
    ・ Pdk_build_ver.h
    ・ Rules.make

    Of these, only "Rules.make" has a definition of "CGT_ARM_VERSION".
    (There are two places)

    ################################################################################
    # Configure toolchain paths
    ################################################################################
    ifeq ($(BOARD),$(filter $(BOARD), $(BOARD_LIST_J6_TDA)))
      # This section applies to J6 TDA SOCs in Processor SDK VISION release.
      # For remaining SOC/BOARDS skip to the else part.
      # SoC & Version of PDK for TDA builds
      PDK_SOC=
      PDK_VERSION=01_09_00_00
    
      #Tool versions for TDA builds
      GCC_CROSS_TOOL_PREFIX=arm-none-eabi-
      GCC_CROSS_TOOL_TAG=4_9-2015q3
      CGT_VERSION=7.4.2
      GCC_VERSION_FPULIB=4.9.3
      CGT_ARM_VERSION=16.9.2.LTS
      CGT_ARP32_VERSION=1.0.7
    
      #Component versions for TDA builds
      BIOS_VERSION=6_46_04_53
      EDMA_VERSION=02_12_00_20
      XDC_VERSION=3_32_01_22_core
      MSHIELD_VERSION=4_5_3
      export mmwavelink_version=mmwave_dfp_01_01_00_00
    
      export GCC_FLOAT_PATH ?= FPU
    else
      # This section applies to all broader set of boards with SOCs beyond TDA class
      # in Processor SDK RTOS release
      PDK_VERSION_STR=_$(PDK_SOC)_$(PDK_VERSION)
    ifeq ($(PDK_VERSION),)
      PDK_VERSION_STR=
    endif
    
      #Tool versions for non-TDA builds
      GCC_CROSS_TOOL_PREFIX=arm-none-eabi-
      GCC_CROSS_TOOL_TAG=7-2018-q2-update
      GCC_ARCH64_VERSION=7.2.1-2017.11
      CGT_VERSION=8.3.2
    ifeq ($(BOARD),$(filter $(BOARD), $(BOARD_LIST_J7_TDA)))
      GCC_CROSS_TOOL_TAG=6-2017-q1-update
    endif
      CGT_C7X_VERSION=1.1.0
      CGT_ARM_VERSION=18.12.1.LTS
      GCC_VERSION_HARDLIB=7.3.1
    ifeq ($(BOARD),$(filter $(BOARD), $(BOARD_LIST_J7_TDA)))
      GCC_VERSION_HARDLIB=6.3.1
    endif
      CGT_ARP32_VERSION=1.0.8
      CG_XML_VERSION=2.61.00
    

    Changed two "CGT_ARM_VERSION" to "16.9.6.LTS".

    As a result of gmake, the same error occurred.
    Where should I fix it after that?

    thank you.

  • Hi,

    Changed two "CGT_ARM_VERSION" to "16.9.6.LTS".

    This should work properly. What error are you getting with this modification?


    Also, did you install the whole package during installation? If not can you please install the whole package (with all tools) and try?

    Regards,
    Parth

  • Hello.
    thank you for your reply.
    Sorry for replying late

    The result of gmake I did is as follows.

    Microsoft Windows [Version 10.0.19042.1288]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\Users\softeng>cd C:\ti\pdk_am57xx_1_0_15\packages\
    
    C:\ti\pdk_am57xx_1_0_15\packages>pdksetupenv.bat
    ***************************************************
    Environment Configuration:
    ***************************************************
        SDK_INSTALL_PATH        : C:/ti
        GMAKE_INSTALL_PATH      : C:/ti/xdctools_3_51_01_18_core
        RULES_MAKE              : C:/ti/pdk_am57xx_1_0_15/packages/Rules.make
    ***************************************************
    
    C:\ti\pdk_am57xx_1_0_15\packages>
    C:\ti\pdk_am57xx_1_0_15\packages>
    C:\ti\pdk_am57xx_1_0_15\packages>cd C:\ti\pdk_am57xx_1_0_15\packages\ti\board
    
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board>
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board>gmake BOARD=idkAM571x CORE=a15_0
    gmake libcores BOARD=evmAM572x
    gmake[1]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake lib_allendians CORE=c66x BUILD_PROFILE_c66x=release
    gmake[2]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake comp_libs ENDIAN=little
    gmake[3]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake -C C:/ti/pdk_am57xx_1_0_15/packages/ti/board -f build/makefile.mk
    gmake[4]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[4]: Nothing to be done for 'all'.
    gmake[4]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[3]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[2]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake lib_allendians CORE=a15_0 BUILD_PROFILE_a15_0=release
    gmake[2]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake comp_libs ENDIAN=little
    gmake[3]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake -C C:/ti/pdk_am57xx_1_0_15/packages/ti/board -f build/makefile.mk
    gmake[4]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[4]: Nothing to be done for 'all'.
    gmake[4]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[3]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[2]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake lib_allendians CORE=ipu1_0 BUILD_PROFILE_ipu1_0=release
    gmake[2]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake comp_libs ENDIAN=little
    gmake[3]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake -C C:/ti/pdk_am57xx_1_0_15/packages/ti/board -f build/makefile.mk
    gmake[4]: Entering directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[4]: *** No rule to make target 'C:/ti/ti-cgt-arm_18.12.1.LTS/include/stdint.h', needed by 'C:/ti/pdk_am57xx_1_0_15/packages/ti/binary/ti/board/board/obj/evmAM572x/m4/release/board.oem4'.  Stop.
    gmake[4]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[3]: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:368: board] Error 2
    gmake[3]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[2]: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:158: little_lib] Error 2
    gmake[2]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake[1]: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:155: ipu1_0_lib] Error 2
    gmake[1]: Leaving directory 'C:/ti/pdk_am57xx_1_0_15/packages/ti/board'
    gmake: *** [C:/ti/pdk_am57xx_1_0_15/packages/ti/build/comp_top.mk:149: evmAM572x_lib] Error 2
    
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board>

    First, "C:\ti\pdk_am57xx_1_0_15\packages\pdksetupenv.bat" is executed.
    After that, I went to "C:\ti\pdk_am57xx_1_0_15\packages\ti\board" and ran "gmake BOARD=idkAM571x CORE=a15_0".


    thank you.

  • I solved this problem by installing "ti-cgt-arm_18.12.1.LTS".
    However, the problem of "I can't access EEPROM after starting SBL" has not been solved yet.
    We will continue to investigate.
    If I'm in trouble, I'll ask you a question in this thread.

    thank you.

  • Hello.

    I investigated the problem that "EEPROM access is not possible after starting SBL".
    I have identified the code that causes the problem.
    But I don't understand what it's doing, so please let me know.

    -Call "Board_init" by specifying "BOARD_INIT_PINMUX_CONFIG".
    -Call "Board_pinmuxConfig" from "Board_init".
    -Call "BoardCtrlPadIoDelayConfig" from "Board_pinmuxConfig".
    -Call "BoardCtrlPadMux" from "BoardCtrlPadIoDelayConfig".

    void BoardCtrlPadMux(const boardPadDelayCfg_t *pPadCfgData,
                         uint32_t padArraySize)
    {
        uint32_t index = 0U;
        uint32_t cpde, fpde, configRegValue, modeSelect;
        uint32_t address = 0U;
        const boardPadDelayAltGpCfg_t *pAltPadCfgData;
    
        CSL_IodelayconfigRegs *ioDelayCfg =
            (CSL_IodelayconfigRegs *) CSL_MPU_DELAYLINE_REGS;
    
        cpde = calculateDelay(ioDelayCfg->CONFIG_REG_3, (uint32_t) 88);
        fpde = calculateDelay(ioDelayCfg->CONFIG_REG_4, (uint32_t) 264);
    
        for (index = 0; index < padArraySize; index++)
        {
            address = (CSL_MPU_CTRL_MODULE_CORE_REGS +
                ((uint32_t) (pPadCfgData + index)->offset));
            HW_WR_REG32(address, (pPadCfgData + index)->regVal);
    
            modeSelect = (pPadCfgData + index)->regVal &
                         CSL_CONTROL_CORE_PAD_IO_PAD_GPMC_AD0_GPMC_AD0_MODESELECT_MASK;
    
    

    The problem is "HW_WR_REG32(address, (pPadCfgData + index)->regVal);".
    I confirmed that I could access the EEPROM after starting SBL just by commenting out this one line.
    What is this process doing?

    If my analysis is correct, the for loop repeats more than 200 times.
    I paid attention to the argument of the first "HW_WR_REG32".
    addr = 0x4A0037BC
    data = 0x000D0006

    I looked up what this address was.
    www.tij.co.jp/.../spruhz7j.pdf

    I thought that "TP_CTRL_MODULE_CORE_TARG" from "Table 2-3. L4_CFG Memory Map" on page 384 seems to be related.
    How can I find out more?

    thank you.

  • Hello.

    Investigation has revealed a little more about the problem that EEPROM access is not possible after starting SBL.
    The following register writes were performed in the "board initialization process (Board_init function)" by SBL.
    ・ HW_WR_REG32 (0x4A0037A4, 0x01000E)
    ・ HW_WR_REG32 (0x4A0037AC, 0x01000E)

    For these two addresses, I found the following by referring to TRM.
    TRM www.tij.co.jp/.../spruhz7j.pdf
    -Disable the receive mode of "CTRL_CORE_PAD_SPI1_SCLK"
    -Disable the receive mode of "CTRL_CORE_PAD_SPI1_D0"

    Changed the value to be written to 0x05000E.
    (This means "enable receive mode")

    Then, I was able to access the EEPROM after starting SBL.

    These two register writes are done by the definition of the following file.
    C:\ti\pdk_am57xx_1_0_15\packages\ti\board\src\idkAM571x\boardPadDelayInit.c

    /* GPIO7 - gpio7_7 on A25 - MyGPIO7 */
         {0x17A4, 0x1000E, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},
    /* GPIO7 - gpio7_9 on B25 - MyGPIO7 */
         {0x17AC, 0x1000E, {0x0, 0, 0}, {0x0, 0, 0}, {0x0, 0, 0}},

    What is the reason for the definition of "disable receive mode"?

    Is it a necessary definition?

    thank you.

  • Hi,

    What is the reason for the definition of "disable receive mode"?

    On AM571x IDK this pin is configured as GPIO which is used as output pin. That is why receive modes are disabled.

    The changes you made should be fine, but make sure you configure the pin mode for SPI as it is GPIO by default.

    Regards,

    Parth

  • Hello.

    Thank you for your answer.
    The problem was solved by taking the following actions.
    ---------------------------------------------
    The following settings are made by SBL.
    - CTRL_CORE_PAD_SPI1_SCLK-> 0x0001000E
    - CTRL_CORE_PAD_SPI1_D0-> 0x0001000E
    Make the following settings in the app launched from SBL.
    - CTRL_CORE_PAD_SPI1_SCLK-> 0x00050000
    - CTRL_CORE_PAD_SPI1_D0-> 0x00050000

    According to TRM, it has the following meanings:
    - 0x0001000E-> Receive mode disabled. Weak Pull Up / Down is enabled. MUX mode is gpio7_7 (or gpio_7_9).
    - 0x00050000-> Receive mode is enabled. Weak Pull Up / Down is invalid. MUX mode is spi1_sclk (or spi1_d0).
    ---------------------------------------------

    Is there any problem with the above method?
    There is a point to be worried about.
    I was able to read / write the EEPROM with the above modification, but do I need to modify "CTRL_CORE_PAD_SPI1_D1" and "CTRL_CORE_PAD_SPI1_CS1" as well?

    thank you.

  • Hi,

    Is there any problem with the above method?

    No, there are no issues with the above method. 

    I was able to read / write the EEPROM with the above modification, but do I need to modify "CTRL_CORE_PAD_SPI1_D1" and "CTRL_CORE_PAD_SPI1_CS1" as well?

    You should modify the CTRL_CORE_PAD_SPI1_D1 in a similar way you modified CTRL_CORE_PAD_SPI1_D0. Also, you only need to modify CTRL_CORE_PAD_SPI1_CS1 pin configuration if you are using CS1 for your EEPROM.

    Regards,
    Parth