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.

[FAQ] TDA4VM: How can I confirm primary and secondary boot mode on custom board

Part Number: TDA4VM

I have a custom board and I want to confirm the bootmode I have set using the dip switch setting. This will provide as a sanity check for my configuration and also as the first level debug step as I am not able to boot.

  • The section 4.3 Boot Mode Pins of the TRM has these details. The bootmode and its configuration can be inferred by MCU_BOOTMODE and BOOTMODE.

    • CTRLMMR_MAIN_DEVSTAT register reflects the BOOTMODE pin values sampled at internal POR release.

    • CTRLMMR_WKUP_DEVSTAT register reflects the MCU_BOOTMODE pin values sampled
      at internal POR release.

    This FAQ mentions a python script (bootmode_util) which can be used to infer the Primary and the Secondary (backup) bootmodes and their configuration quickly.

    Input to the script

    All you need to input to the script is the CTRLMMR_MAIN_DEVSTAT and the CTRLMMR_WKUP_DEVSTAT registers. These registers can be read using either u-boot (md command), Kernel (devmem2) command, CCS (memory browser or even printing these out on the console.

    Usage

    python bootmode.py <CTRLMMR_WKUP_DEVSTAT in HEX> <CTRLMMR_MAIN_DEVSTAT in HEX>
    
    $ python bootmode.py --help
    usage: bootmode.py [-h] CTRLMMR_WKUP_DEVSTAT CTRLMMR_MAIN_DEVSTAT
    
    This scripts gives information on the bootmodes by taking the
    CTRLMMR_WKUP_DEVSTAT & CTRLMMR_MAIN_DEVSTAT registers as input
    
    positional arguments:
      CTRLMMR_WKUP_DEVSTAT  Value of CTRLMMR_WKUP_DEVSTAT register in HEX
      CTRLMMR_MAIN_DEVSTAT  Value of CTRLMMR_MAIN_DEVSTAT register in HEX
    
    optional arguments:
      -h, --help            show this help message and exit
    
    for example: python bootmode.py 0x0 0x41

    Sample Output

    The sample output for SD boot configuration of the EVM is as below:

    $ python bootmode.py 0x0 0x41
    
    
    +--------------+------+
    | MCU_BOOTMODE | 0x0  |
    +--------------+------+
    |   BOOTMODE   | 0x41 |
    +--------------+------+
    
    +-------------------+---------+
    | Primary boot mode |  MMC/SD |
    +-------------------+---------+
    |        Port       | SD card |
    |     Bus Width     |   4bit  |
    |       FS/Raw      | FS mode |
    +-------------------+---------+
    
    +------------------+------+
    | Backup boot mode | None |
    +------------------+------+
    +------------------+------+

    From the above output one can infer the Primary (SD) boot mode and Backup (None) and also the configuration like Port, Bus Width, FS/Raw mode etc..

    All this data is picked up from the TRM data present in bootmode_TRM_data.py file.

    bootmode_util: /cfs-file/__key/communityserver-discussions-components-files/791/bootmode_5F00_utils.zip

    Regards,

    Karan