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.

TMDSIDK437X: PWM configuration

Part Number: TMDSIDK437X
Other Parts Discussed in Thread: SYSCONFIG, SYSBIOS

Hi.

I try start PWM on idkAM437x. I use CSL and RTOS. I create simple task and in task try start PWM.For this, I use next code:

status = CSL_epwmClockEnable(SOC_PWMSS0_REG);
if(status == CSL_PASS){
UART_printf("Clock Enable OK\n");
}
else{
if(status == CSL_EUNSUPPORTED_CMD){
UART_printf("Unsupported API on this SOC\n");
}
else{
UART_printf("Clock Enable false\n");
}
}

CSL_epwmHighResolutionDisable(SOC_PWMSS0_REG);

CSL_epwmTbPwmFreqCfg(SOC_PWMSS0_REG, 10000, 1000, CSL_EPWM_TB_COUNTER_DIR_UP, PWMSS_EPWM_TBCTL_PRDLD_LOAD_IMMEDIATELY);

CSL_epwmAqActionOnOutputCfg(SOC_PWMSS0_REG, CSL_EPWM_OUTPUT_CH_A, &my_CSL_EpwmAqActionCfg);

CSL_epwmTbTimebaseClkCfg(SOC_PWMSS0_REG, 10000, 10000000);

Clock enable is OK. It's wroted on terminal.

In step debug mode I see how registers of PWMSS_EPWM changed. After executing this code, I expect to see how the TBCNT register grows. But it remains equal to zero. Tell me, maybe there are more settings that need to be changed?

And yet, the register PWMSS0.SYSCONFIG.STANDBYMODE has a value of 0. I could not find a function that would change it to a value of 1. Could this be the reason? 

Tell me how to properly initialize the PWM. In the С2000 series, I did not have such problems.

  • Hi Kiselev,

    As I mentioned to you before, the CSL component is referred to as "Starterware" in the AM437x SDK: https://e2e.ti.com/support/processors/f/791/p/904460/3344756#3344756

    If you prefer to use CSL instead of Starterware, then it's possible you'll encounter gaps in the code. Did you check the ePWM example in Starterware to see if the TB clock is properly enabled? If it's properly enabled there, then you can port any missing code to your CSL-based example.

    >> the register PWMSS0.SYSCONFIG.STANDBYMODE has a value of 0.

    I doubt this is the problem. Have you tried poking the default value (0x2) into the register via JTAG?

    Regards,
    Frank

  • Hi, Frank.

    Yes, I watched the code you recommended. But I not it compiled and loaded to target. Based on this, I applied the functions from the CSL.

    >>I doubt this is the problem. Have you tried poking the default value (0x2) into the register via JTAG?

    Yes, I tried to change case through JTAG, but nothing comes out. The strangest thing is that I can change the bits of IDLEMODE via JTAG, but  I can not STANDBY.

    I will try to assemble a bare metal project from the starterware. 

    ------------------

    I am writing this part of the message later.

    I tried to create examples CCS projects from the starterware. Unfortunately, nothing came of it. My actions were as follows.

    I go to CMD and folow to path c:\ti\ti-processor-sdk-rtos-am437x-evm-06.03.00.106\pdk_am437x_1_0_17\packages\pdksetupenv.bat

    My CMD result:

    ***************************************************
    Environment Configuration:
    ***************************************************
    SDK_INSTALL_PATH : c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106
    PDK_INSTALL_PATH : c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages
    GMAKE_INSTALL_PATH : c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/xdctools_3_55_02_22_core
    PDK_SOC : am437x
    PDK_VERSION : 1_0_17
    RULES_MAKE : c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/build/Rules.make
    ***************************************************

    After, I go to path: c:\ti\ti-processor-sdk-rtos-am437x-evm-06.03.00.106\pdk_am437x_1_0_17\packages\ti\starterware\gmake help

    My CMD result:

    ------------------------------------------------------
    # Starterware make help
    ------------------------------------------------------
    make -s [OPTIONAL MAKE VARIABLES]

    Supported targets:
    all: Default - Build all libraries and examples
    clean: Clean all libraries and examples
    libs/libs_clean: Build/clean all libraries
    examples / examples_clean: Build/clean all examples
    <mod_name> / <mod_name>_clean: Build/clean <mod_name> module
    For example: soc / soc_clean
    <mod_name>_app_<use_case> / <mod_name>_app_<use_case>_clean: Build/clean <mod_name> module
    For example: uart_app_echo / uart_app_echo_clean

    Optional make variables:
    PLATFORM=[am335x-evm / am43xx-evm]
    Default: am43xx-evm
    SOC=[<SOC name>] Options depend on chosen PLATFORM
    For am335x-evm: [am335x]
    For am43xx-evm: [am437x]
    Default: am437x
    PROFILE=[debug / release / prod_release]
    Default: debug
    CONSOLE=[SEMIHOSTING / UART]
    Default: UART
    BUILDCFG=[all / boot]
    Default: all
    BOOTMODE=[mmcsd / uart / qspi / nand / mcspi]
    Default: mmcsd
    KW_BUILD=[yes / no]
    Default: no
    starterware_EXAMPLES_LIST= example_utils gpio_app_led_blink dmtimer_app_cdt gpio_app_buzzer cache_mmu_app i2c_app_eeprom_read wdt_app_cpu_reset adc_app_volt_measure rtc_app_clock epwm_app_haptics_motor uart_app_echo dcan_app_frame_tx_rx nand_app_read_write mmcsd_app_fs_shell dcan_app_loopback ddr_app_diag_test rtc_app_only

    Until this moment everything seems to be in order. Next I type the command.

    c:\ti\ti-processor-sdk-rtos-am437x-evm-06.03.00.106\pdk_am437x_1_0_17\packages\ti\starterware\gmake all

    and get that result

    ------------------------------------------------------
    # Starterware 02.01.00.01
    ------------------------------------------------------
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/xdctools_3_55_02_22_core/gmake -C c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/dal
    gmake[1]: Entering directory 'c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/dal'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/binary/dal/obj/am572x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/binary/dal/obj/am572x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'am571x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'am571x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'dra72x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'dra72x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tda2ex-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tda2ex-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tda3xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tda3xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tda2xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tda2xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'am335x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'am335x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'am437x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'am437x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'ti816x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'ti816x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'ti814x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'ti814x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6a811x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6a811x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6472-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6472-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6670-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6670-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6678-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6678-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6748-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6748-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'da830-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'da830-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'omapl138-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'omapl138-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6486-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6486-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6608-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6608-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6616-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6616-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6614-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6614-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6614-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6614-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6657-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6657-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c66ak2e-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c66ak2e-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'c6657-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'c6657-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6638k2k-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6638k2k-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6630k2l-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6630k2l-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6638k2k-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6638k2k-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: overriding recipe for target 'tci6636k2h-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci6636k2h-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'am571x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'am571x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'dra72x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'dra72x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tda2ex-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tda2ex-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tda3xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tda3xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tda2xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tda2xx-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'am335x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'am335x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'am437x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'am437x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'ti816x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'ti816x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'ti814x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'ti814x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6a811x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6a811x-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6472-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6472-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6670-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6670-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6678-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6678-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6748-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6748-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'da830-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'da830-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'omapl138-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'omapl138-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6486-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6486-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6608-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6608-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6616-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6616-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6614-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6614-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6614-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6614-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6657-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6657-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c66ak2e-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c66ak2e-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'c6657-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'c6657-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6638k2k-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6638k2k-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6630k2l-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6630k2l-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6638k2k-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6638k2k-sim'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci6636k2h-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:108: warning: ignoring old recipe for target 'tci6636k2h-evm'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:111: warning: overriding recipe for target 'tci66ak2g02-evm/a9/debug/gcc'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/common.mk:105: warning: ignoring old recipe for target 'tci66ak2g02-evm/a9/debug/gcc'
    c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/build/makerules/rules_a9.mk:132: *** multiple target patterns. Stop.
    gmake[1]: Leaving directory 'c:/ti/ti-processor-sdk-rtos-am437x-evm-06.03.00.106/pdk_am437x_1_0_17/packages/ti/starterware/dal'
    gmake: *** [Makefile:134: dal] Error 2

    I tried different commands like "gmake examples" and much more, but the result is the same. Unfortunately I can’t figure out on my own what is going wrong.

  • Hi Kiselev,

    Please try this:

    gmake all -s PLATFORM="am43xx-evm"

    Regards,
    Frank

     

  • Hi, Frank.

    The comand: gmake all -s PLATFORM="am43xx-evm" is working. It generates a bin and libraries. Which command creates the projects for import into the CCS.

    Is it possible to create sample projects like the pdkProjectCreate.bat file does? Or do I need to build a project on my own from the existing starterware files?

    Regards,

    Kiselev.

  • Hi Kiselev,

    >> Which command creates the projects for import into the CCS??
    >> Is it possible to create sample projects like the pdkProjectCreate.bat file does?

    There aren't any commands for creating a CCS project for the Starterware ePWM example. There are are two CCS projects in Starterware for AM437x that can be created using pdkProjectCreate.bat. Please see these files:

    <SW>/examples/dcan/loopback/rtos/DCAN_LoopbackExample_evmAM437x_armTestProject.txt
    <SW>/examples/dss/raster/rtos/DSS_RasterExample_evmAM437x_armTestProject.txt

    You could use these files as a starting point if you want to use pdkProjectCreate.bat for creating a CCS project for the ePWM example.

     >> Or do I need to build a project on my own from the existing starterware files?

    Yes, you'll need to create a new CCS project.

    Regards,
    Frank

  • Hi, Frank.

    I looked at the projects  DCAN_LoopbackExample_evmAM437x_armTestProject.txt and DSS_RasterExample_evmAM437x_armTestProject.txt. 

    Now I'm trying to assemble a PWM project from examples starterware. I'm trying to build a project with RTOS.

    Main function is simple, only start RTOS and create task. In task I insert code main function from file haptics_motor_app_main.c. The rest of the files I connect to the project. I had to tinker until a lot of mistakes disappeared. But, unfortunately, I can’t correctly remove one error.

    The situation looks like this. After the task starts, the first thing to do is to initialize the MMU. And called MMUConfigAndEnable(). This function is in the example_utils_mmu.c file. I add this file in my project. First string is

    /* Initialize the page table and MMU */
    MMUInit((uint32_t*)pageTable, MMU_PAGETABLE_NUM_ENTRY);

    The result of the project build produces an error.

    \Debug/../example_utils_mmu.c:152: undefined reference to `pageTable'

    I decided to insert it (pageTable) into the same file in the global variable area, because the variable is listed as external in the file example_utils_mmu.h.

    /* ========================================================================== */
    /* Global Variables */
    volatile uint32_t pageTable[MMU_PAGETABLE_NUM_ENTRY];
    /* ========================================================================== */

    After that, the project was assembled without errors. Here I was a little happy, but in vain.

    Unfortunately, during debugging precisely when this function is executed, MMUConfigAndEnable (), the RTOS exits.

    /*
    * ======== _exit ========
    */
    void _exit(int code)
    {
    asm(" .global C$$EXIT");
    asm("C$$EXIT:");
    while(1){};
    }
    /*
    * @(#) gnu.targets.arm.rtsv7A; 1, 0, 0,; 9-13-2019 11:37:42; /db/ztree/library/trees/xdctargets/xdctargets-t09/src/ xlibrary

    */

    Unfortunately, there are no ideas what to do. Tell me what could be the reason?

    Regards,

    Kiselev

    -------------------------------------

    This part of the message is written later.

    The file example_utils_mmu.c contains the necessary definitions of global variables. It was necessary to specify the correct compiler.

    I deleted my definition from the file.

    /* ========================================================================== */
    /* Global Variables */
    volatile uint32_t pageTable[MMU_PAGETABLE_NUM_ENTRY];
    /* ========================================================================== */

    And set Project properties > GNU Compiler > Sumbols > -D add gcc

    After that, the assembled project compiles without errors. No changes are required. 

    But during debugging, when the MMUConfigAndEnable () function is executed, RTOS all the same terminates.

  • Hi Kiselev,

    Please see instructions on adding RTOS support to Starterware examples here: <PDK>\packages\ti\starterware\examples\dcan\readme.txt.

    The MMU configuration in the RTOS-based Starterware DCAN example is located SYS/BIOS .cfg files. Please see <PDK>\packages\ti\starterware\examples\dcan\loopback\rtos\am437x_app_dcan_evmam437x.cfg.

    Documentation for SYS/BIOS module ti.sysbios.family.arm.a8.Mmu is here: <BIOS>/docs/cdoc/ti/sysbios/family/arm/a8/Mmu.html.

    Likely there is a conflict between the SYS/BIOS & Starterware MMU configurations in your current code. I suggest using the SYS/BIOS API to configure MMU instead of the Starterware API.

    Regards,
    Frank

     

  • Hi, Frank.

    As you advised, I commented in task:

    //MMUConfigAndEnable();

    add to .cfg MMU and Cahe configuration like in DCAN example

    /* ================ Cache and MMU configuration ================ */

    var Cache = xdc.useModule('ti.sysbios.family.arm.a9.Cache');
    Cache.enableCache = false;
    Cache.configureL2Sram = false;//DDR build

    var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
    Mmu.enableMMU = true;

    /* Force peripheral section to be NON cacheable strongly-ordered memory */
    var peripheralAttrs = {
    type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
    tex: 0,
    bufferable : false, // bufferable
    cacheable : false, // cacheable
    shareable : false, // shareable
    noexecute : true, // not executable
    };

    /* Define the base address of the 1 Meg page the peripheral resides in. */
    var peripheralBaseAddr = 0x44DF2800;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
    peripheralBaseAddr,
    peripheralAttrs);

    var peripheralBaseAddr = 0x44e0b000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
    peripheralBaseAddr,
    peripheralAttrs);

    /* Define the base address of the 1 Meg page the peripheral resides in. */
    var peripheralBaseAddr = 0x49000000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
    peripheralBaseAddr,
    peripheralAttrs);

    /* ================ Cache and MMU configuration ================ */

    Add in CCS project setup files 

    Symbols:
    Define below symbols (-D<Symbol Name>) in the project setup file
    Platform independent symbols
    - RTOS_BUILD
    AM437x Platform specific symbols
    - SOC_AM437X
    - evmAM437x
    - AM43XX_FAMILY_BUILD

    and other settings, I do not think it is necessary to list everything.

    The result of all this is that the BIOS exit situation no longer occurs, but the project still does not work. 

    The console displays the following:

    StarterWare EPWM Application!!
    BOARDInit status [0x0]
    SoC : [AM43XX]
    Core : [A9]
    Board Detected : [IDKEVM]
    Base Board Revision : [UNKNOWN]
    Daughter Card Revision: [UNKNOWN]
    Invalid device ID!!
    Device is not available on this board!
    This example is not supported on this board!

    For some reason, the registers of peripheral modules such as PWMSS, DCAN and other are not visible.

    Could you tell me which files I need to connect to the project?

    Regards, Kiselev.

  • Hi Kiselev,

    The MMU L1 translation table entries in your .cfg file are for:

    • CM_WKUP: L1 translation base address is 0x44D0_0000, 1 MB page
    • I2C0: L1 translation base address is 0x44E0_0000, 1 MB page
    • EDMA3CC: L1 translation base address is 0x4900_0000, 1 MB page

    >> the registers of peripheral modules such as PWMSS, DCAN and other are not visible

    Your .cfg file doesn't contain any MMU L1 translation table entries for the memory in which the PWMSS & DCAN registers are located. You need to add L1 translation table entries for PWMSS. Please see these docs;

    • AM437x TRM, Table 2-3. L4_PER Peripheral Memory Map
    • DEN0013D_cortex_a_series_PG.pdf, Ch 9: The Memory Management Unit
    • See <BIOS>/docs/cdoc/ti/sysbios/family/arm/a8/Mmu.html

    For example, to add PWMSS to your .cfg file:

    /* Force peripheral section to be NON cacheable strongly-ordered memory */
    var peripheralAttrs = {
    type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
    tex: 0,
    bufferable : false, // bufferable
    cacheable : false, // cacheable
    shareable : false, // shareable
    noexecute : true, // not executable
    };
    
    var peripheralBaseAddr = 0x4830_0000;
    
    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
    peripheralBaseAddr,
    peripheralAttrs);
    

    >> Could you tell me which files I need to connect to the project

    It seems you have all the required files. I suspect the project isn't properly configured.

    Did you ever try the unmodified Starterware PWM application? What does the console output show?

    Regards,
    Frank

  • Hi, Frank.

    I tried to add the MMU configuration, as you advised. Unfortunately, this did not change the result.

    >> Did you ever try the unmodified Starterware PWM application? What does the console output show?

    Also, unfortunately, I was not able to assemble a project on bare metal, i.e. not modified. I managed to eliminate most of the assembly errors, but there were still those that I could not handle.

    Unfortunately, it seems to me that this is not a real task for me, I will have to look for other ways to implement the project. 

    Regards, Kiselev.

  • Hi Kiselev,

    Thanks for the feedback, I'll close this thread.

    Regards,
    Frank