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.

MCU-PLUS-SDK-AM263X: AM263x TI LP

Tool/software:

HI Ti Team 

I am trying to run ADC0 Channel 0 in interrupt mode. While the ADC interrupt is working, the callback function is not being invoked as expected.

Could you please review the code snippet below and let me know what might be missing?

Additionally, I have reviewed the MCU+ SDK 10.02 example adc_soc_continuous_dma. I noticed that two callback functions are defined in the example, but neither of them appears to be triggered by any interrupt.

Looking forward to your guidance on this issue.

static void App_adcISR(void *args);
static void App_dmach0ISR(Edma_IntrHandle intrHandle, void *args); 

these are the function of SDK example code 

here is my code  

Note- Code is working fine ADC conversion is proper as per input voltage. 

#include <stdlib.h>
#include "ti_drivers_config.h"
#include "ti_board_config.h"
#include <kernel/dpl/ClockP.h>
#include <drivers/uart.h>
#include <drivers/adc.h>
#include <kernel/dpl/HwiP.h>

void hello_world_main(void *args);
void Uart_Inti();
HwiP_Params adc_params;
HwiP_Object my_adc;

#define CSLR_R5FSS0_CORE0_INTR_ADC0_INTR_0 (150U)
long unsigned int count = 0;

void adc_isr(void *arg) //this function is callback function for adc need to check is not calling
{
count++;
DebugP_log("call adc callback \r\n");
}
void adcOpen()
{
HwiP_Params_init(&adc_params);
adc_params.intNum = CSLR_R5FSS0_CORE0_INTR_ADC0_INTR_0;
adc_params.callback = &adc_isr;
adc_params.priority = 10;

ADC_setupSOC(CONFIG_ADC0_BASE_ADDR, 0, ADC_TRIGGER_SW_ONLY, ADC_CH_ADCIN0, 16);
ADC_enableConverter(CONFIG_ADC0_BASE_ADDR);
/* Delay for ADC to power up. */
ClockP_usleep(500);
ADC_enableInterrupt(CONFIG_ADC0_BASE_ADDR, 0);
// HwiP_Params_init(&adc_params);
HwiP_construct(&my_adc, &adc_params);
}

int main(void)
{


System_init();
Board_init();
hello_world_main(NULL);
DebugP_log("Start Initialize ADC0 \r\n");
adcOpen();

while(1)
{
ADC_clearInterruptStatus(CONFIG_ADC0_BASE_ADDR, ADC_INT_NUMBER1);
ADC_forceSOC(CONFIG_ADC0_BASE_ADDR, ADC_SOC_NUMBER0);
while(ADC_getInterruptStatus(CONFIG_ADC0_BASE_ADDR, ADC_INT_NUMBER1) == false)
{

}
DebugP_log("CH0 : %d\r\n", ADC_readResult(CONFIG_ADC0_RESULT_BASE_ADDR, ADC_SOC_NUMBER0));
DebugP_log("%d: ",count);
GPIO_pinWriteHigh(LED_RED_BASE_ADDR, LED_RED_PIN);
ClockP_sleep(1);
GPIO_pinWriteLow(LED_RED_BASE_ADDR, LED_RED_PIN);
ClockP_sleep(1);
// count=0;
}
Board_deinit();
System_deinit();
return 0;
}

  • Hi Vipul

    Could you also share your syscfg file with me?

    Regards,
    Akshit

  • Hi Akshit 

    I was facing some issue for upload .syscfg file directly, so I change its format into .jpg so please convert it back into .syscfg format and please let me know you are able to open this or not. 

     file name is example.syscfg

  • Hi Vipul

    you can send the code in .syscfg file, you can open the file in notepad or any other text editor and paste the contents of example.syscfg here, I am not able to access it through .jpg

    Thanks,
    Akshit

  • Hi Akshit 

    Noted please collect .txt

    /**
     * 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 "AM263x_beta" --part "AM263x" --package "ZCZ" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM263x@10.02.00"
     * @v2CliArgs --device "AM2634" --package "NFBGA (ZCZ)" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM263x@10.02.00"
     * @versions {"tool":"1.23.0+4000"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const adc             = scripting.addModule("/drivers/adc/adc", {}, false);
    const adc1            = adc.addInstance();
    const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
    const gpio1           = gpio.addInstance();
    const uart            = scripting.addModule("/drivers/uart/uart", {}, false);
    const uart1           = uart.addInstance();
    const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
    const dpl_cfg         = scripting.addModule("/kernel/dpl/dpl_cfg");
    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 default_linker  = scripting.addModule("/memory_configurator/default_linker", {}, false);
    const default_linker1 = default_linker.addInstance();
    const general         = scripting.addModule("/memory_configurator/general", {}, false);
    const general1        = general.addInstance();
    const region          = scripting.addModule("/memory_configurator/region", {}, false);
    const region1         = region.addInstance();
    const section         = scripting.addModule("/memory_configurator/section", {}, false);
    const section1        = section.addInstance();
    const section2        = section.addInstance();
    const section3        = section.addInstance();
    const section4        = section.addInstance();
    const section5        = section.addInstance();
    const section6        = section.addInstance();
    const section7        = section.addInstance();
    const section8        = section.addInstance();
    const section9        = section.addInstance();
    const section10       = section.addInstance();
    const section11       = section.addInstance();
    const section12       = section.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    adc1.$name                          = "CONFIG_ADC0";
    adc1.enableConverter                = true;
    adc1.adcClockPrescaler              = "ADC_CLK_DIV_4_0";
    adc1.soc1Channel                    = "ADC_CH_ADCIN1";
    adc1.interruptPulseMode             = "ADC_PULSE_END_OF_CONV";
    adc1.enableInterrupt1               = true;
    adc1.enableInterrupt1ContinuousMode = true;
    adc1.soc0InterruptTrigger           = "ADC_INT_SOC_TRIGGER_ADCINT1";
    adc1.ADC.$assign                    = "ADC0";
    adc1.ADC.AIN1.$used                 = false;
    adc1.ADC.AIN2.$used                 = false;
    adc1.ADC.AIN3.$used                 = false;
    adc1.ADC.AIN4.$used                 = false;
    adc1.ADC.AIN5.$used                 = false;
    
    gpio1.$name          = "LED_RED";
    gpio1.pinDir         = "OUTPUT";
    gpio1.pu_pd          = "pd";
    gpio1.GPIO_n.$assign = "UART0_CTSn";
    
    const soc_ctrl_adc    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_adc", {}, false);
    const soc_ctrl_adc1   = soc_ctrl_adc.addInstance({}, false);
    soc_ctrl_adc1.$name   = "soc_ctrl_adc0";
    adc.ADCreferences     = soc_ctrl_adc1;
    const soc_ctrl        = scripting.addModule("/drivers/soc_ctrl/soc_ctrl", {}, false);
    soc_ctrl.soc_ctrl_adc = soc_ctrl_adc1;
    
    const soc_ctrl_cmpss    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_cmpss", {}, false);
    const soc_ctrl_cmpss1   = soc_ctrl_cmpss.addInstance({}, false);
    soc_ctrl_cmpss1.$name   = "soc_ctrl_cmpss0";
    soc_ctrl.soc_ctrl_cmpss = soc_ctrl_cmpss1;
    
    const soc_ctrl_ecap    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_ecap", {}, false);
    const soc_ctrl_ecap1   = soc_ctrl_ecap.addInstance({}, false);
    soc_ctrl_ecap1.$name   = "soc_ctrl_ecap0";
    soc_ctrl.soc_ctrl_ecap = soc_ctrl_ecap1;
    
    const soc_ctrl_epwm    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_epwm", {}, false);
    const soc_ctrl_epwm1   = soc_ctrl_epwm.addInstance({}, false);
    soc_ctrl_epwm1.$name   = "soc_ctrl_epwm0";
    soc_ctrl.soc_ctrl_epwm = soc_ctrl_epwm1;
    
    const soc_ctrl_sdfm    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_sdfm", {}, false);
    const soc_ctrl_sdfm1   = soc_ctrl_sdfm.addInstance({}, false);
    soc_ctrl_sdfm1.$name   = "soc_ctrl_sdfm0";
    soc_ctrl.soc_ctrl_sdfm = soc_ctrl_sdfm1;
    
    uart1.$name            = "CONFIG_UART2";
    uart1.UART.$assign     = "UART2";
    uart1.UART.RXD.$assign = "LIN2_RXD";
    uart1.UART.TXD.$assign = "LIN2_TXD";
    uart1.child.$name      = "drivers_uart_v2_uart_v2_template1";
    
    debug_log.enableUartLog            = true;
    debug_log.uartLog.$name            = "CONFIG_UART0";
    debug_log.uartLog.UART.$assign     = "UART0";
    debug_log.uartLog.UART.RXD.$assign = "UART0_RXD";
    debug_log.uartLog.UART.TXD.$assign = "UART0_TXD";
    debug_log.uartLog.child.$name      = "drivers_uart_v2_uart_v2_template0";
    
    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          = 0x80000;
    mpu_armv73.size              = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv74.$name             = "CONFIG_MPU_REGION3";
    mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv74.baseAddr          = 0x70000000;
    mpu_armv74.size              = 21;
    
    default_linker1.$name = "memory_configurator_default_linker0";
    
    general1.$name        = "CONFIG_GENERAL0";
    general1.linker.$name = "TIARMCLANG0";
    
    region1.$name                                = "MEMORY_REGION_CONFIGURATION0";
    region1.memory_region.create(11);
    region1.memory_region[0].type                = "TCMA";
    region1.memory_region[0].$name               = "R5F_VECS";
    region1.memory_region[0].size                = 0x40;
    region1.memory_region[0].auto                = false;
    region1.memory_region[1].type                = "TCMA";
    region1.memory_region[1].$name               = "R5F_TCMA";
    region1.memory_region[1].size                = 0x7FC0;
    region1.memory_region[2].type                = "TCMB";
    region1.memory_region[2].size                = 0x8000;
    region1.memory_region[2].$name               = "R5F_TCMB";
    region1.memory_region[3].$name               = "SBL";
    region1.memory_region[3].auto                = false;
    region1.memory_region[3].size                = 0x40000;
    region1.memory_region[4].$name               = "OCRAM";
    region1.memory_region[4].auto                = false;
    region1.memory_region[4].manualStartAddress  = 0x70040000;
    region1.memory_region[4].size                = 0x40000;
    region1.memory_region[5].type                = "FLASH";
    region1.memory_region[5].auto                = false;
    region1.memory_region[5].size                = 0x80000;
    region1.memory_region[5].$name               = "FLASH";
    region1.memory_region[6].$name               = "USER_SHM_MEM";
    region1.memory_region[6].auto                = false;
    region1.memory_region[6].manualStartAddress  = 0x701D0000;
    region1.memory_region[6].size                = 0x4000;
    region1.memory_region[6].isShared            = true;
    region1.memory_region[6].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[7].$name               = "LOG_SHM_MEM";
    region1.memory_region[7].auto                = false;
    region1.memory_region[7].manualStartAddress  = 0x701D4000;
    region1.memory_region[7].size                = 0x4000;
    region1.memory_region[7].isShared            = true;
    region1.memory_region[7].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[8].type                = "CUSTOM";
    region1.memory_region[8].$name               = "RTOS_NORTOS_IPC_SHM_MEM";
    region1.memory_region[8].auto                = false;
    region1.memory_region[8].manualStartAddress  = 0x72000000;
    region1.memory_region[8].size                = 0x3E80;
    region1.memory_region[8].isShared            = true;
    region1.memory_region[8].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[9].type                = "CUSTOM";
    region1.memory_region[9].$name               = "MAILBOX_HSM";
    region1.memory_region[9].auto                = false;
    region1.memory_region[9].manualStartAddress  = 0x44000000;
    region1.memory_region[9].size                = 0x3CE;
    region1.memory_region[9].isShared            = true;
    region1.memory_region[9].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[10].type               = "CUSTOM";
    region1.memory_region[10].$name              = "MAILBOX_R5F";
    region1.memory_region[10].auto               = false;
    region1.memory_region[10].manualStartAddress = 0x44000400;
    region1.memory_region[10].size               = 0x3CE;
    region1.memory_region[10].isShared           = true;
    region1.memory_region[10].shared_cores       = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    
    section1.load_memory                  = "R5F_VECS";
    section1.group                        = false;
    section1.$name                        = "Vector Table";
    section1.output_section.create(1);
    section1.output_section[0].$name      = ".vectors";
    section1.output_section[0].palignment = true;
    
    section2.load_memory                  = "OCRAM";
    section2.$name                        = "Text Segments";
    section2.output_section.create(5);
    section2.output_section[0].$name      = ".text.hwi";
    section2.output_section[0].palignment = true;
    section2.output_section[1].$name      = ".text.cache";
    section2.output_section[1].palignment = true;
    section2.output_section[2].$name      = ".text.mpu";
    section2.output_section[2].palignment = true;
    section2.output_section[3].$name      = ".text.boot";
    section2.output_section[3].palignment = true;
    section2.output_section[4].$name      = ".text:abort";
    section2.output_section[4].palignment = true;
    
    section3.load_memory                  = "OCRAM";
    section3.$name                        = "Code and Read-Only Data";
    section3.output_section.create(2);
    section3.output_section[0].$name      = ".text";
    section3.output_section[0].palignment = true;
    section3.output_section[1].$name      = ".rodata";
    section3.output_section[1].palignment = true;
    
    section4.load_memory                  = "OCRAM";
    section4.$name                        = "Data Segment";
    section4.output_section.create(1);
    section4.output_section[0].$name      = ".data";
    section4.output_section[0].palignment = true;
    
    section5.load_memory                             = "OCRAM";
    section5.$name                                   = "Memory Segments";
    section5.output_section.create(3);
    section5.output_section[0].$name                 = ".bss";
    section5.output_section[0].output_sections_start = "__BSS_START";
    section5.output_section[0].output_sections_end   = "__BSS_END";
    section5.output_section[0].palignment            = true;
    section5.output_section[1].$name                 = ".sysmem";
    section5.output_section[1].palignment            = true;
    section5.output_section[2].$name                 = ".stack";
    section5.output_section[2].palignment            = true;
    
    section6.load_memory                              = "OCRAM";
    section6.$name                                    = "Stack Segments";
    section6.output_section.create(5);
    section6.output_section[0].$name                  = ".irqstack";
    section6.output_section[0].output_sections_start  = "__IRQ_STACK_START";
    section6.output_section[0].output_sections_end    = "__IRQ_STACK_END";
    section6.output_section[0].input_section.create(1);
    section6.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
    section6.output_section[1].$name                  = ".fiqstack";
    section6.output_section[1].output_sections_start  = "__FIQ_STACK_START";
    section6.output_section[1].output_sections_end    = "__FIQ_STACK_END";
    section6.output_section[1].input_section.create(1);
    section6.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
    section6.output_section[2].$name                  = ".svcstack";
    section6.output_section[2].output_sections_start  = "__SVC_STACK_START";
    section6.output_section[2].output_sections_end    = "__SVC_STACK_END";
    section6.output_section[2].input_section.create(1);
    section6.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
    section6.output_section[3].$name                  = ".abortstack";
    section6.output_section[3].output_sections_start  = "__ABORT_STACK_START";
    section6.output_section[3].output_sections_end    = "__ABORT_STACK_END";
    section6.output_section[3].input_section.create(1);
    section6.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
    section6.output_section[4].$name                  = ".undefinedstack";
    section6.output_section[4].output_sections_start  = "__UNDEFINED_STACK_START";
    section6.output_section[4].output_sections_end    = "__UNDEFINED_STACK_END";
    section6.output_section[4].input_section.create(1);
    section6.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";
    
    section7.load_memory                  = "OCRAM";
    section7.$name                        = "Initialization and Exception Handling";
    section7.output_section.create(3);
    section7.output_section[0].$name      = ".ARM.exidx";
    section7.output_section[0].palignment = true;
    section7.output_section[1].$name      = ".init_array";
    section7.output_section[1].palignment = true;
    section7.output_section[2].$name      = ".fini_array";
    section7.output_section[2].palignment = true;
    
    section8.load_memory                 = "USER_SHM_MEM";
    section8.type                        = "NOLOAD";
    section8.$name                       = "User Shared Memory";
    section8.group                       = false;
    section8.output_section.create(1);
    section8.output_section[0].$name     = ".bss.user_shared_mem";
    section8.output_section[0].alignment = 0;
    
    section9.load_memory                 = "LOG_SHM_MEM";
    section9.$name                       = "Log Shared Memory";
    section9.group                       = false;
    section9.type                        = "NOLOAD";
    section9.output_section.create(1);
    section9.output_section[0].$name     = ".bss.log_shared_mem";
    section9.output_section[0].alignment = 0;
    
    section10.load_memory                 = "RTOS_NORTOS_IPC_SHM_MEM";
    section10.type                        = "NOLOAD";
    section10.$name                       = "IPC Shared Memory";
    section10.group                       = false;
    section10.output_section.create(1);
    section10.output_section[0].$name     = ".bss.ipc_vring_mem";
    section10.output_section[0].alignment = 0;
    
    section11.load_memory                 = "MAILBOX_HSM";
    section11.type                        = "NOLOAD";
    section11.$name                       = "SIPC HSM Queue Memory";
    section11.group                       = false;
    section11.output_section.create(1);
    section11.output_section[0].$name     = ".bss.sipc_hsm_queue_mem";
    section11.output_section[0].alignment = 0;
    
    section12.load_memory                 = "MAILBOX_R5F";
    section12.$name                       = "SIPC R5F Queue Memory";
    section12.group                       = false;
    section12.type                        = "NOLOAD";
    section12.output_section.create(1);
    section12.output_section[0].$name     = ".bss.sipc_secure_host_queue_mem";
    section12.output_section[0].alignment = 0;
    
    /**
     * 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.
     */
    adc1.ADC.AIN0.$suggestSolution = "ADC0_AIN0";
    

  • Hi Vipul

    this issue is occurring as you haven't configured the INT_XBAR to route the ADC interrupt signal to VIM.

    With this you'll also need to register the intnum as that of the INT_XBAR:

    // Initialize HwiP parameters
    HwiP_Params_init(&adc_params);
    adc_params.intNum = CSLR_R5FSS0_CORE0_CONTROLSS_INTRXBAR0_OUT_0; // Use crossbar output
    adc_params.callback = &adc_isr;
    adc_params.priority = 10;

    attaching the complete code file below:

    /*
     *  Copyright (C) 2021 Texas Instruments Incorporated
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    #include <stdio.h>
    #include <kernel/dpl/DebugP.h>
    #include "ti_drivers_config.h"
    #include "ti_drivers_open_close.h"
    #include "ti_board_open_close.h"
    
    /*
     * This is an empty project provided for all cores present in the device.
     * User can use this project to start their application by adding more SysConfig modules.
     *
     * This application does driver and board init and just prints the pass string on the console.
     * In case of the main core, the print is redirected to the UART console.
     * For all other cores, CCS prints are used.
     */
    
     // Hardware interrupt object and parameters
    static HwiP_Object gAdcHwiObject;
    static HwiP_Params adc_params;
    
    long unsigned int count = 0;
    
    void adc_isr(void *arg) 
    {
        count++;
        DebugP_log("ADC callback invoked! Count: %lu\r\n", count);
        
        // Clear the interrupt flag that triggered this ISR
        ADC_clearInterruptStatus(CONFIG_ADC0_BASE_ADDR, ADC_INT_NUMBER1);
    }
    
    void empty_main(void *args)
    {
        int32_t status;
        uint32_t loopCnt = 10;
    
        /* Open drivers to open the UART driver for console */
        Drivers_open();
        Board_driversOpen();
    
        // Initialize HwiP parameters
        HwiP_Params_init(&adc_params);
        adc_params.intNum = CSLR_R5FSS0_CORE0_CONTROLSS_INTRXBAR0_OUT_0;  // Use crossbar output
        adc_params.callback = &adc_isr;
        adc_params.priority = 10;
    
        // Construct the hardware interrupt
        status = HwiP_construct(&gAdcHwiObject, &adc_params);
        if(status != SystemP_SUCCESS)
        {
            DebugP_log("Failed to construct HwiP object\r\n");
            return;
        }
    
        // Clear any pending interrupt status
        ADC_clearInterruptStatus(CONFIG_ADC0_BASE_ADDR, ADC_INT_NUMBER1);
    
        DebugP_log("ADC interrupt configuration completed\r\n");
    
        while(loopCnt--)
        {
            // Force SOC0 to start conversion - this should trigger the interrupt
            ADC_forceSOC(CONFIG_ADC0_BASE_ADDR, ADC_SOC_NUMBER0);
            
            // Wait for conversion to complete by checking interrupt status
            while(ADC_getInterruptStatus(CONFIG_ADC0_BASE_ADDR, ADC_INT_NUMBER1) == false)
            {
                // Wait for interrupt
            }
            
            // Read the conversion result
            uint16_t adcResult = ADC_readResult(CONFIG_ADC0_RESULT_BASE_ADDR, ADC_SOC_NUMBER0);
            DebugP_log("CH0 : %d, Callback count: %lu\r\n", adcResult, count);
        }
    
    #if defined(AMP_FREERTOS_A53)
        DebugP_log("All tests have passed on a53_core%d!!\r\n", Armv8_getCoreId());
    #else
        DebugP_log("All tests have passed!!\r\n");
    #endif 
        Board_driversClose();
        Drivers_close();
    }
    

    With this I am able to confirm the callback is working and am also able to break into it:

    Regards,
    Akshit

  • Hi Akshit 

    Thanks for the quick support now its working......