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.

AM2431: Ethernet interrupt priority

Part Number: AM2431
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi all TI experts,

I am using the AM2431 with FreeRTOS as the system, and I modified my program based on the enet_layer2_cpsw example. I’m currently encountering the following issue: I adopted the same settings as the example, where receiving an Ethernet packet triggers an interrupt. In the callback function, I release a semaphore to allow the Ethernet task to receive the packet. Everything works fine up to this point, but I have another thread where I set up a hardware timer that periodically triggers an interrupt. During the interrupt trigger, I need to control a GPIO to send a control signal. However, I’ve noticed that sometimes my hardware timer doesn’t operate at the specified time and occasionally experiences delays. I suspect that when the Ethernet thread’s interrupt is triggered, the higher-priority Ethernet interrupt preempts the process.

I’ve seen discussions suggesting that the Ethernet interrupt can be disabled, and instead, a hardware timer could be set to release the semaphore every millisecond, allowing the Ethernet thread to periodically check for packets. Under this setup, the delay issue with my other hardware timer disappears, but I prefer to use the original control method. I’d like to know if there’s a way to set the priority of the GPIO control interrupt higher than the Ethernet interrupt to avoid preemption. I tried setting the hardware timer’s priority like this:

HwiP_Params_init(&hwiPrms);
hwiPrms.intNum      = INTR;
hwiPrms.callback = &AepwmIntrISR;
hwiPrms.isPulse     = INTR_IS_PULSE;
hwiPrms.priority    = 0x01;
status              = HwiP_construct(&EpwmHwiObject, &hwiPrms);
DebugP_assert(status == SystemP_SUCCESS);

I set the priority from 0x01 to 0x30, but it didn’t work, and the same issue still occurs. How can I achieve the desired behavior?

Best regards,

Larry

  • Hi Larry,

    Thanks for your query.

    Assuming you are working on AM243x-EVM, you are trying to have 2 tasks running in parallel. correct?

    Task-1. Working with Ethernet traffic 

    Task-2. Working with HW timer

    Task2 should have higher priority.

    You can use:

    MAIN_TASK_PRI (highest priority task)

    MAIN_TASK_PRI-2 (low priority task)

    where

    #define MAIN_TASK_PRI  (configMAX_PRIORITIES-1)

    #define configMAX_PRIORITIES                    (32)

    What else is running on your setup?

    HW timer interrupt is based on which timer?

    Regards

    Ashwani

  • Hi Ashwani,

    Thanks for your reply, my timer setup like below,

    HwiP_Params_init(&hwiPrms);
    hwiPrms.intNum      = INTR;
    hwiPrms.callback = &AepwmIntrISR;
    hwiPrms.isPulse     = INTR_IS_PULSE;
    hwiPrms.priority    = 0x01;
    status              = HwiP_construct(&EpwmHwiObject, &hwiPrms);
    DebugP_assert(status == SystemP_SUCCESS);

    I think this is hardware time setup, isn't it? or I am misunderstand, although I set priority from 0~30, the ethernet interrupt still influence this timer behavior.

    Best regards,

    Larry

  • Hi Larry,

    Can you show in sysconfig, how you enable it? 

    As on my setup, I enable TIMER in sysconfig below code is generated.

    Here "timerTickIsr" is callback function on timer interrupt, which is running in main_task() with high priority (MAIN_TASK_PRI).

    Then. I added 1 more task for ethernet frame handling "ethernet_task" with lower priority (MAIN_TASK_PRI-2).

    Regards

    Ashwani

  • Hi Ashwani,

    Below is my syscfg, I didn't enable any timer in syscfg section, but my timer still can work, is this mean I am using freeRTOS system timer: timer8 as my hardware timer?

    Best regards,

    Larry

  • Hi Larry,

    is this mean I am using freeRTOS system timer: timer8 as my hardware timer?

    Can you provide details of variables you are using here?
    ================================================

    HwiP_Params_init(&hwiPrms);
    hwiPrms.intNum = INTR;
    hwiPrms.callback = &AepwmIntrISR;
    hwiPrms.isPulse = INTR_IS_PULSE;
    hwiPrms.priority = 0x01;
    status = HwiP_construct(&EpwmHwiObject, &hwiPrms);
    DebugP_assert(status == SystemP_SUCCESS);

    ====================================================

    Regards

    Ashwani

  • Hi Ashwani,

    OK,
    below is my syscfg content,

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@09.02.00"
     * @versions {"tool":"1.20.0+3587"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const flash           = scripting.addModule("/board/flash/flash", {}, false);
    const flash1          = flash.addInstance();
    const bootloader      = scripting.addModule("/drivers/bootloader/bootloader", {}, false);
    const bootloader1     = bootloader.addInstance();
    const epwm            = scripting.addModule("/drivers/epwm/epwm", {}, false);
    const epwm1           = epwm.addInstance();
    const epwm2           = epwm.addInstance();
    const epwm3           = epwm.addInstance();
    const epwm4           = epwm.addInstance();
    const epwm5           = epwm.addInstance();
    const epwm6           = epwm.addInstance();
    const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
    const gpio1           = gpio.addInstance();
    const gpio2           = gpio.addInstance();
    const gpio3           = gpio.addInstance();
    const gpio4           = gpio.addInstance();
    const gpio5           = gpio.addInstance();
    const gpio6           = gpio.addInstance();
    const gpio7           = gpio.addInstance();
    const gpio8           = gpio.addInstance();
    const gpio9           = gpio.addInstance();
    const gpio10          = gpio.addInstance();
    const gpio11          = gpio.addInstance();
    const gpio12          = gpio.addInstance();
    const gpio13          = gpio.addInstance();
    const gpio14          = gpio.addInstance();
    const gpio15          = gpio.addInstance();
    const gpio16          = gpio.addInstance();
    const gpio17          = gpio.addInstance();
    const gpio18          = gpio.addInstance();
    const gpio19          = gpio.addInstance();
    const gpio20          = gpio.addInstance();
    const gpio21          = gpio.addInstance();
    const gpio22          = gpio.addInstance();
    const gpio23          = gpio.addInstance();
    const gpio24          = gpio.addInstance();
    const gpio25          = gpio.addInstance();
    const gpio26          = gpio.addInstance();
    const gpio27          = gpio.addInstance();
    const gpio28          = gpio.addInstance();
    const gpio29          = gpio.addInstance();
    const gpio30          = gpio.addInstance();
    const gpio31          = gpio.addInstance();
    const gpio32          = gpio.addInstance();
    const i2c             = scripting.addModule("/drivers/i2c/i2c", {}, false);
    const i2c1            = i2c.addInstance();
    const mcspi           = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
    const mcspi1          = mcspi.addInstance();
    const pruicss         = scripting.addModule("/drivers/pruicss/pruicss", {}, false);
    const pruicss1        = pruicss.addInstance();
    const udma            = scripting.addModule("/drivers/udma/udma", {}, false);
    const udma1           = udma.addInstance();
    const udma2           = udma.addInstance();
    const addr_translate  = scripting.addModule("/kernel/dpl/addr_translate", {}, false);
    const addr_translate1 = addr_translate.addInstance();
    const clock           = scripting.addModule("/kernel/dpl/clock");
    const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7       = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71      = mpu_armv7.addInstance();
    const mpu_armv72      = mpu_armv7.addInstance();
    const mpu_armv73      = mpu_armv7.addInstance();
    const mpu_armv74      = mpu_armv7.addInstance();
    const mpu_armv75      = mpu_armv7.addInstance();
    const enet_cpsw       = scripting.addModule("/networking/enet_cpsw/enet_cpsw", {}, false);
    const enet_cpsw1      = enet_cpsw.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    bootloader1.$name = "CONFIG_BOOTLOADER_FLASH0";
    
    flash1.$name                              = "CONFIG_FLASH0";
    bootloader1.flashDriver                   = flash1;
    flash1.flashSize                          = 2097152;
    flash1.flashManfId                        = "0xEF";
    flash1.flashDeviceId                      = "0x4015";
    flash1.flashBlockSize                     = 65536;
    flash1.cmdBlockErase4B                    = "0xD8";
    flash1.cmdSectorErase4B                   = "0x20";
    flash1.dummy_isAddrReg                    = false;
    flash1.dummy_cfgReg                       = "0x00000000";
    flash1.dummy_mask                         = "0x00";
    flash1.dummy_bitP                         = 0;
    flash1.resetType                          = "0x30";
    flash1.addressByteSupport                 = "0";
    flash1.idNumBytes                         = 5;
    flash1.device                             = "CUSTOM_FLASH";
    flash1.fname                              = "W25Q16JV";
    flash1.dummyId8                           = 0;
    flash1.flashDeviceBusyTimeout             = 5120000;
    flash1.flashPageProgTimeout               = 704;
    flash1.dummyClksRd                        = 0;
    flash1.dummy_cmdRegRd                     = "0x00";
    flash1.dummy_cmdRegWr                     = "0x00";
    flash1.protocol                           = "1s_1s_1s";
    flash1.cmdRd                              = "0x03";
    flash1.modeClksRd                         = 0;
    flash1.fourByteEnableSeq                  = "0x80";
    flash1.flash444Seq                        = "0x00";
    flash1.peripheralDriver.$name             = "CONFIG_OSPI0";
    flash1.peripheralDriver.dmaEnable         = true;
    flash1.peripheralDriver.OSPI.$assign      = "OSPI0";
    flash1.peripheralDriver.OSPI.CLK.$assign  = "OSPI0_CLK";
    flash1.peripheralDriver.OSPI.CSn0.$assign = "OSPI0_CSn0";
    flash1.peripheralDriver.OSPI.D3.$assign   = "OSPI0_D3";
    flash1.peripheralDriver.OSPI.D2.$assign   = "OSPI0_D2";
    flash1.peripheralDriver.OSPI.D1.$assign   = "OSPI0_D1";
    flash1.peripheralDriver.OSPI.D0.$assign   = "OSPI0_D0";
    
    epwm1.$name            = "ADD0";
    epwm1.EPWM.$assign     = "EHRPWM5";
    epwm1.EPWM.A.$assign   = "GPMC0_BE1n";
    epwm1.EPWM.B.$used     = false;
    epwm1.EPWM.SYNCO.$used = false;
    epwm1.EPWM.SYNCI.rx    = false;
    epwm1.EPWM.SYNCI.$used = false;
    
    epwm2.$name            = "ADD1";
    epwm2.EPWM.$assign     = "EHRPWM3";
    epwm2.EPWM.A.$assign   = "GPMC0_AD13";
    epwm2.EPWM.B.$used     = false;
    epwm2.EPWM.SYNCO.$used = false;
    epwm2.EPWM.SYNCI.$used = false;
    
    epwm3.$name            = "ADD2";
    epwm3.EPWM.$assign     = "EHRPWM2";
    epwm3.EPWM.A.$assign   = "GPMC0_AD8";
    epwm3.EPWM.B.$used     = false;
    epwm3.EPWM.SYNCO.$used = false;
    epwm3.EPWM.SYNCI.$used = false;
    
    epwm4.$name            = "GCLK_GATE";
    epwm4.EPWM.$assign     = "EHRPWM0";
    epwm4.EPWM.A.$assign   = "GPMC0_AD3";
    epwm4.EPWM.B.$used     = false;
    epwm4.EPWM.SYNCO.$used = false;
    epwm4.EPWM.SYNCI.$used = false;
    
    epwm5.$name            = "GCLK_PWM";
    epwm5.EPWM.$assign     = "EHRPWM1";
    epwm5.EPWM.A.$assign   = "GPMC0_AD5";
    epwm5.EPWM.B.$used     = false;
    epwm5.EPWM.SYNCO.$used = false;
    epwm5.EPWM.SYNCI.$used = false;
    
    epwm6.$name                      = "UTXD";
    epwm6.EPWM.$assignAllowConflicts = "EHRPWM8";
    epwm6.EPWM.A.$assign             = "GPMC0_AD7";
    epwm6.EPWM.B.$used               = false;
    epwm6.EPWM.SYNCO.$used           = false;
    epwm6.EPWM.SYNCI.rx              = false;
    epwm6.EPWM.SYNCI.$used           = false;
    
    gpio1.$name          = "UDB1_L";
    gpio1.pinDir         = "OUTPUT";
    gpio1.rx             = true;
    gpio1.GPIO_n.$assign = "PRG0_PRU0_GPO0";
    
    gpio2.$name          = "UDB2_L";
    gpio2.pinDir         = "OUTPUT";
    gpio2.rx             = true;
    gpio2.GPIO_n.$assign = "PRG0_PRU0_GPO1";
    
    gpio3.$name          = "UDGI2_L";
    gpio3.rx             = true;
    gpio3.GPIO_n.$assign = "PRG0_PRU0_GPO2";
    
    gpio4.$name          = "UDBI1_L";
    gpio4.rx             = true;
    gpio4.GPIO_n.$assign = "PRG0_PRU0_GPO3";
    
    gpio5.$name          = "UDG2_L";
    gpio5.pinDir         = "OUTPUT";
    gpio5.rx             = true;
    gpio5.GPIO_n.$assign = "PRG0_PRU0_GPO4";
    
    gpio6.$name          = "UDRI2_L";
    gpio6.rx             = true;
    gpio6.GPIO_n.$assign = "PRG0_PRU0_GPO5";
    
    gpio7.$name          = "UDBI2_L";
    gpio7.rx             = true;
    gpio7.pinDir         = "OUTPUT";
    gpio7.GPIO_n.$assign = "PRG0_PRU0_GPO6";
    
    gpio8.$name          = "UDRI1_L";
    gpio8.rx             = true;
    gpio8.GPIO_n.$assign = "PRG0_PRU0_GPO7";
    
    gpio9.$name          = "UDR2_L";
    gpio9.pinDir         = "OUTPUT";
    gpio9.rx             = true;
    gpio9.GPIO_n.$assign = "PRG0_PRU0_GPO11";
    
    gpio10.$name          = "UDG1_L";
    gpio10.pinDir         = "OUTPUT";
    gpio10.rx             = true;
    gpio10.GPIO_n.$assign = "PRG0_PRU0_GPO12";
    
    gpio11.$name          = "UDR1_L";
    gpio11.pinDir         = "OUTPUT";
    gpio11.rx             = true;
    gpio11.GPIO_n.$assign = "PRG0_PRU0_GPO18";
    
    gpio12.$name          = "UDGI1_L";
    gpio12.rx             = true;
    gpio12.GPIO_n.$assign = "PRG0_PRU0_GPO19";
    
    gpio13.$name          = "ULAT";
    gpio13.pinDir         = "OUTPUT";
    gpio13.rx             = true;
    gpio13.GPIO_n.$assign = "PRG1_PRU1_GPO13";
    
    gpio14.$name          = "STATUS_R";
    gpio14.pinDir         = "OUTPUT";
    gpio14.rx             = true;
    gpio14.GPIO_n.$assign = "PRG0_PRU1_GPO2";
    
    gpio15.$name          = "STATUS_G";
    gpio15.pinDir         = "OUTPUT";
    gpio15.rx             = true;
    gpio15.GPIO_n.$assign = "PRG0_PRU1_GPO3";
    
    gpio16.$name          = "STATUS_B";
    gpio16.pinDir         = "OUTPUT";
    gpio16.rx             = true;
    gpio16.GPIO_n.$assign = "PRG0_PRU1_GPO4";
    
    gpio17.$name          = "UDR2_R";
    gpio17.pinDir         = "OUTPUT";
    gpio17.rx             = true;
    gpio17.GPIO_n.$assign = "PRG1_PRU0_GPO0";
    
    gpio18.$name          = "UDG1_R";
    gpio18.rx             = true;
    gpio18.GPIO_n.$assign = "PRG1_PRU0_GPO1";
    
    gpio19.$name          = "UDB1_R";
    gpio19.pinDir         = "OUTPUT";
    gpio19.rx             = true;
    gpio19.GPIO_n.$assign = "PRG1_PRU0_GPO2";
    
    gpio20.$name          = "UDRI2_R";
    gpio20.rx             = true;
    gpio20.GPIO_n.$assign = "PRG1_PRU0_GPO3";
    
    gpio21.$name          = "UDRI1_R";
    gpio21.rx             = true;
    gpio21.GPIO_n.$assign = "PRG1_PRU0_GPO4";
    
    gpio22.$name          = "UDR1_R";
    gpio22.rx             = true;
    gpio22.GPIO_n.$assign = "PRG1_PRU0_GPO6";
    
    gpio23.$name          = "UDB2_R";
    gpio23.pinDir         = "OUTPUT";
    gpio23.rx             = true;
    gpio23.GPIO_n.$assign = "PRG1_PRU0_GPO11";
    
    gpio24.$name          = "UDG2_R";
    gpio24.pinDir         = "OUTPUT";
    gpio24.rx             = true;
    gpio24.GPIO_n.$assign = "PRG1_PRU0_GPO12";
    
    gpio25.$name          = "UDBI2_R";
    gpio25.rx             = true;
    gpio25.GPIO_n.$assign = "PRG1_PRU0_GPO13";
    
    gpio26.$name          = "UDGI2_R";
    gpio26.rx             = true;
    gpio26.GPIO_n.$assign = "PRG1_PRU0_GPO14";
    
    gpio27.$name          = "UDGI1_R";
    gpio27.rx             = true;
    gpio27.GPIO_n.$assign = "PRG1_PRU0_GPO15";
    
    gpio28.$name          = "UDBI1_R";
    gpio28.rx             = true;
    gpio28.GPIO_n.$assign = "PRG1_PRU0_GPO16";
    
    gpio29.$name          = "UDCLK";
    gpio29.pinDir         = "OUTPUT";
    gpio29.rx             = true;
    gpio29.GPIO_n.$assign = "PRG0_PRU0_GPO10";
    
    gpio30.enableIntr     = true;
    gpio30.$name          = "URXD2";
    gpio30.rx             = true;
    gpio30.intrOut        = "7";
    gpio30.trigType       = "RISE_EDGE";
    gpio30.GPIO_n.$assign = "PRG1_PRU0_GPO18";
    
    gpio31.$name          = "URXD1";
    gpio31.trigType       = "RISE_EDGE";
    gpio31.enableIntr     = true;
    gpio31.rx             = true;
    gpio31.intrOut        = "6";
    gpio31.GPIO_n.$assign = "PRG1_PRU0_GPO19";
    
    gpio32.$name          = "RTK_RSTN";
    gpio32.pinDir         = "OUTPUT";
    gpio32.defaultValue   = "1";
    gpio32.GPIO_n.$assign = "PRG1_PRU1_GPO0";
    
    i2c1.$name           = "CONFIG_I2C0";
    i2c1.I2C.$assign     = "I2C1";
    i2c1.I2C_child.$name = "drivers_i2c_v0_i2c_v0_template0";
    
    mcspi1.$name                       = "CONFIG_MCSPI0";
    mcspi1.dpe1                        = "ENABLE";
    mcspi1.dpe0                        = "DISABLE";
    mcspi1.inputSelect                 = "0";
    mcspi1.txFifoTrigLevel             = 8;
    mcspi1.rxFifoTrigLevel             = 8;
    mcspi1.SPI.$assign                 = "SPI3";
    mcspi1.SPI.CLK.$assign             = "PRG0_PRU0_GPO16";
    mcspi1.SPI.D0.$assign              = "PRG0_PRU0_GPO13";
    mcspi1.SPI.D1.$assign              = "PRG0_PRU0_GPO14";
    mcspi1.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH0";
    mcspi1.mcspiChannel[0].bitRate     = 100000;
    mcspi1.mcspiChannel[0].CSn.$assign = "PRG0_PRU0_GPO17";
    mcspi1.child.$name                 = "drivers_mcspi_v0_mcspi_v0_template0";
    
    pruicss1.$name                           = "CONFIG_PRU_ICSS0";
    pruicss1.AdditionalICSSSettings[0].$name = "CONFIG_PRU_ICSS_IO0";
    
    udma2.$name                        = "CONFIG_UDMA0";
    flash1.peripheralDriver.udmaDriver = udma2;
    
    addr_translate1.$name = "CONFIG_ADDR_TRANSLATE_REGION0";
    
    debug_log.enableUartLog            = true;
    debug_log.uartLog.$name            = "CONFIG_UART1";
    debug_log.uartLog.UART.$assign     = "USART0";
    debug_log.uartLog.UART.RXD.$assign = "UART0_RXD";
    debug_log.uartLog.UART.TXD.$assign = "UART0_TXD";
    
    const uart_v0_template  = scripting.addModule("/drivers/uart/v0/uart_v0_template", {}, false);
    const uart_v0_template1 = uart_v0_template.addInstance({}, false);
    uart_v0_template1.$name = "drivers_uart_v0_uart_v0_template0";
    debug_log.uartLog.child = uart_v0_template1;
    
    mpu_armv71.$name             = "CONFIG_MPU_REGION0";
    mpu_armv71.size              = 31;
    mpu_armv71.attributes        = "Device";
    mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv71.allowExecute      = false;
    
    mpu_armv72.$name             = "CONFIG_MPU_REGION1";
    mpu_armv72.size              = 15;
    mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv73.$name             = "CONFIG_MPU_REGION2";
    mpu_armv73.baseAddr          = 0x41010000;
    mpu_armv73.size              = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv74.$name             = "CONFIG_MPU_REGION3";
    mpu_armv74.baseAddr          = 0x70000000;
    mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv74.size              = 23;
    
    mpu_armv75.$name             = "CONFIG_MPU_REGION5";
    mpu_armv75.baseAddr          = 0xA5000000;
    mpu_armv75.size              = 23;
    mpu_armv75.attributes        = "NonCached";
    mpu_armv75.accessPermissions = "Supervisor RD+WR, User RD";
    
    enet_cpsw1.$name                           = "CONFIG_ENET_CPSW0";
    enet_cpsw1.customBoardEnable               = true;
    enet_cpsw1.mdioBusFreqHz                   = 200000;
    enet_cpsw1.ExternalPhyMgmtEnable           = true;
    enet_cpsw1.mdioMode                        = "MDIO_MODE_MANUAL";
    enet_cpsw1.macAddrConfig                   = "Manual Entry";
    enet_cpsw1.macAddrList                     = "E2:FF:0A:00:FF:FF,70:ff:76:1d:ec:e3";
    enet_cpsw1.hostportPadShortPacket          = false;
    enet_cpsw1.LargePoolPktCount               = 192;
    enet_cpsw1.txDmaChannel[0].$name           = "ENET_DMA_TX_CH0";
    enet_cpsw1.txDmaChannel[0].PacketsCount    = 2;
    enet_cpsw1.rxDmaChannel[0].$name           = "ENET_DMA_RX_CH0";
    enet_cpsw1.rxDmaChannel[0].sizeThreshEn    = 0x1;
    enet_cpsw1.rxDmaChannel[0].PacketsCount    = 190;
    enet_cpsw1.pinmux[0].$name                 = "ENET_CPSW_PINMUX0";
    enet_cpsw1.pinmux[0].enableRgmii2          = false;
    enet_cpsw1.pinmux[0].MDIO.$assign          = "MDIO0";
    enet_cpsw1.pinmux[0].MDIO.MDC.$assign      = "PRG1_MDIO0_MDC";
    enet_cpsw1.pinmux[0].MDIO.MDIO.$assign     = "PRG1_MDIO0_MDIO";
    enet_cpsw1.pinmux[0].RGMII1.$assign        = "RGMII1";
    enet_cpsw1.pinmux[0].RGMII1.RD0.$assign    = "PRG1_PRU1_GPO5";
    enet_cpsw1.pinmux[0].RGMII1.RD1.$assign    = "PRG1_PRU1_GPO8";
    enet_cpsw1.pinmux[0].RGMII1.RD2.$assign    = "PRG1_PRU1_GPO18";
    enet_cpsw1.pinmux[0].RGMII1.RD3.$assign    = "PRG1_PRU1_GPO19";
    enet_cpsw1.pinmux[0].RGMII1.RX_CTL.$assign = "PRG1_PRU0_GPO5";
    enet_cpsw1.pinmux[0].RGMII1.RXC.$assign    = "PRG1_PRU0_GPO8";
    enet_cpsw1.pinmux[0].RGMII1.TD0.$assign    = "PRG1_PRU1_GPO7";
    enet_cpsw1.pinmux[0].RGMII1.TD1.$assign    = "PRG1_PRU1_GPO9";
    enet_cpsw1.pinmux[0].RGMII1.TD2.$assign    = "PRG1_PRU1_GPO10";
    enet_cpsw1.pinmux[0].RGMII1.TD3.$assign    = "PRG1_PRU1_GPO17";
    enet_cpsw1.pinmux[0].RGMII1.TX_CTL.$assign = "PRG1_PRU0_GPO9";
    enet_cpsw1.pinmux[0].RGMII1.TXC.$assign    = "PRG1_PRU0_GPO10";
    
    udma1.$name        = "CONFIG_UDMA_PKTDMA_0";
    udma1.instance     = "PKTDMA_0";
    enet_cpsw1.udmaDrv = udma1;
    mcspi1.udmaDriver  = udma1;
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    i2c1.I2C.SCL.$suggestSolution = "I2C1_SCL";
    i2c1.I2C.SDA.$suggestSolution = "I2C1_SDA";
    

    here is my timer config

    HwiP_Params hwiPrms_addr1;
    
    HwiP_Params_init(&hwiPrms_addr1);
    hwiPrms_addr1.intNum        = 114;
    hwiPrms_addr1.callback      = &Add1_epwmIntrISR;
    hwiPrms_addr1.isPulse       = True;
    hwiPrms.priority            = 0x01;
    status              = HwiP_construct(&addr1_EpwmHwiObject, &hwiPrms_addr1);
    DebugP_assert(status == SystemP_SUCCESS);

    Best regards,

    Larry

  • you are using EPWM interrupt

    #define CSLR_R5FSS0_CORE0_INTR_EPWM3_EPWM_ETINT_0                                                  (114U)

    is this mean I am using freeRTOS system timer: timer8 as my hardware timer?

    you can check details here in syscofnig

    Regards

    Ashwani

  • Hi Ashwani,

    Got it!, according this information, is this mean my EPWM and ethernet all using same priority?  because their "other dependencies" all are TIMER8, and Tick Interrupt Priority is 15, I only can change thread priority to get my aim, right?

    can I runtime change thread priority?

    Best regard,

    Larry

  • Hi Larry,

    Seems to be the case.

    You can try below suggestions and update the test results.

    1. Make timer + interrupt priority same

    2. Make Interrupt task priority < Ethernet task priority

    Regards

    Ashwani