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.

RTOS/AM5726: Board initialization hangs on pad IO de-isolation

Part Number: AM5726
Other Parts Discussed in Thread: AM5728,

Tool/software: TI-RTOS

We are bringing up our custom board with an AM5726, based on the AM5728 IDK board. We are having an issue running the UART_BasicExample_idkAM572x_armExampleProject. Using the debugger, we traced down the issue to the board initialization step (beginning with the Board_init() function in main). More specifically, the process execution hangs in ~/ti/pdk_am57xx_1_0_11/packages/ti/board/src/idkAM572x/iodelay_config.c; in the boardPadIoDeIsolation() function, at this line:

CSL_FINS(ctrlCoreRegs->SMA_SW_0, CONTROL_CORE_SMA_SW_0_SMA_SW_0_ISO,
0x0U);

It never seems to return from this function or finish pad de-isolation. I have been looking through the TRM for the IDK, but have not been able to find much about what this function does or what could be causing this issue. Pad io isolation works fine, it is just during this de-isolation step that it gets hung up. To be clear, this all works fine on the IDK board, it is our custom board that we are experiencing the issue. I would appreciate any troubleshooting tips or things to look at in our hardware design that may be causing this issue.

  • Devon,

    For details of IO delay and Pinmux configuration and IO delay configuration for the device, please refer to the Application note here:
    www.ti.com/.../sprac44a.pdf

    Can you confirm that your board UART design and pin usage is same as the IDK ? If typically recommend the following flow for board bring up :
    software-dl.ti.com/.../index_board.html

    Can you indicate if you are using the pinmux setup that we provide for the IDK or have you modified the software for your custom design? Instead of running the LLD level RTOS example, we recommend you run a simpler UART bare-metal example like diagnsotics and run it from on chip memory to eliminate any issues that may arise from DDR configuration.


    Regards,
    Rahul
  • I will take a look at the application note.

    As for the UART design, the only difference is that our debug UART (UART 3) is connected to Y1 and V2 instead of D27 and C28 as on the IDK. I believe I have correctly changed the pinmux setting by adding the UART3 config to ~/ti/ccsv8/ccs_base/emulation/boards/am572x/gel/AM572x_pad_config.gel. Is this the correct way to go about this? Is there somewhere else I should be updating this for the A15? This change seems to work well when I run the m4 version of the app.

    My pinmux should be exactly the same as what I use for the IDK (aside from the UART3 change), but again, I have been making the pin settings entirely in the .gel files (I have not edited any mux_data.h files). Perhaps this is my issue? If so, could you direct me to where I can find the pin mux files?

    Also, I was able to run a bare-metal hello world app on the A15 on our custom board without issue.

  • Devon,

    Updating pinmux from GEL files is not recommended as the Board_init call in the application will overwrite those settings. the pinmux files for the IDK are located here: pdk_am57xx_1_0_13\packages\ti\board\src\idkAM572x

    The .pinmux file in that folder can be imported into TI PINMUX tool to obtain the baseline pinmux setting for the platform and then you can modify it based on your use case to generate the update source files. I talk about this in a little more detail in Processor SDK RTOS training slide in section 9.5 here:
    software-dl.ti.com/.../presentation_html5.html

    Hope this helps.

    Regards,
    Rahul
  • Hello Rahul,
    I followed along with your presentation and made the changes to the pinmux to reflect our configuration, but this does not seem to have made any difference. In fact, I tried to run with these new pinmux files with the m4 UART app, and that also did not work. The m4 app does not get hung up in the io de-isolation step like the ARM app does, but it does not print anything out over debug UART. This means that the pinmux (which I configured following your tutorial with the pinmux tool) are not taking effect, and the only way that I am able to make this pinmux change is through the GEL file as I was doing before. Also, I should note, that I recompiled the PDK, which I think was missing from your tutorial, but this did not make a difference. Am I missing anything else?
  • Recompiling the whole PDK isn't necessary. When updating pinmux configs only the board library gets rebuilt followed by the SBL. Once both are updated you copt the new MLO resulting from the SBL to your SD card. Is that the procedure you're following?

  • I was trying to use the debugging capability of CCS because I am stepping through the code to see where it gets hung up. I am not loading code using the SD card. I did a search for the MLO and SBL files within the PDK and only found these files:

    • packages/ti/boot/sbl/binary/idkAM572x/mmcsd/bin/MLO
    • packages/ti/boot/sbl/binary/idkAM572x/qspi/bin/MLO

    These files have not been modified for several days, so they were not rebuilt when I rebuilt my project in CCS. What is the path for the MLO file? This also does not explain why I am still having issues through the CCS debugger.

  • My mistake, if your application ran from an SD card then it would require the process mentioned. If you were using the SD card then you would use the MLO that you found in the mmcsd folder. It is interesting that you said this file has not been updated in a few days. It should be updated if you recompiled the PDK. Are you using Windows or Linux? Was your command "make all"?

    When you build the CCS project this does not cause the board library to rebuild. CCS is using the already compiled library found at packages/ti/board/lib/idkAM572x/a15/release so this needs to be updated for the custom board pinmux changes to take effect. That can be done using the top level make. Let us know if that helps.

    Regards,
    Ahmad

  • Devon,

    Are you try to get the application booted using a SD card or QSPI flash ? I thought that you are debugging the application using CCS and emulator interface. In this case you don`t need to look at MLO or SBL as this is only required when you want the application to boot on the silicon using ROM and secondary bootloader that runs on the target without needing an external emulator to load code.

    In CCS, the GEL initialization script perform clock and DDR init and puts the cores in a clean state so developers can load code over emulator. From the application, developers can make calls into board library to setup pinmux and UART logging. All of the above in a production boot environment is done by the ROM and the secondary bootloader which you referred to as MLO.

    The drivers, board library, CSL and bootloader can only be built using makefiles and not using CCS so what you are building in CCS IDE is just the application that links to these as libraries. A rebuild of the application in CCS doesn`t cause the underlying libraries to be built.

    for applying simple pinmux changes, you only need to build the board library as Ahmed indicated using the following commands:

    cd pdk_am57xx_1_x_X\packages
    gmake board_lib LIMIT_BOARDS=idkAM572x DISABLE_RECURSE_DEPS=yes

    After the board library is build with pinmux updates check the rebuild date for the library at pdk_am57xx_1_0_xx\packages\ti\board\lib\idkAM572x\a15\release

    Now, you can go to CCS and rebuild the application that links to the above built board library. Hope this clarifies the steps.

    Regards,
    Rahul

    PS: Rebuilding bootloader (when you want to flash or boot your application from boot media) is provided here:
    software-dl.ti.com/.../index_Foundational_Components.html
  • Rahul,

    I tried your method of rebuilding just the board library after adding my new pinmux files, and I am still getting the same result - the IDK board still works (it should not work because I switched the pins that UART3 is connected to) and my custom board does not work. This is with stock GEL files. I can confirm that the library was in fact rebuilt by inspecting the contents of the pdk_am57xx_1_0_xx\packages\ti\board\lib\idkAM572x\a15\release directory for the updated date and time on the resulting library file. I rebuilt my project in CCS as well, after rebuilding the board library. I also tried to rebuild without the DISABLE_RECURSE_DEPS=yes flag and after doing a make board_lib_clean, and still I get the same result. There must be something else that I am missing...

  • Devon,

    The fact that the UARTs are still working after you switched the pinmux on the idkAM572x indicates that the settings have not applied correctly. Can you save the modified pinmux settings in a .pinmux file and attach it here for us to review.

    The other thing that you need to also take care of is the clocks for the UART that you are enabling the idkAM572x source files only enables clocks for the debug UART instance and the UART pins available through extension connector so if change the pinmux then you also need to ensure the clocks are enabled.

    Regards,
    Rahul
  • This actually ended up resolving my issue. When I initially tested tried this solution, I tried to run the M4 app and was getting the same result where I wasn't getting any output. But I just tried to run it on the A15 and now it no longer gets hung up in the Board_init() function. So it seems like the M4 app takes needs the GEL files to be updated, whereas the A15 needs the pinmux files updated. Thanks for your help.

  • Devon,

    Glad to know that you are able to resolve this issue and have the modified UART working in your setup.

    Regards,
    Rahul