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.
High Prio :
MCAL version : MCAL_AM263x_09.00.01.01
We are triggering Adc_StartGroupConversion for ADC channel groups, mapped for ADC SW trigger, cyclically at every 5ms, as in the screen below.
We see that the ADC result buffers do not show us an updated ADC conversion result for any of the channels mapped to the ADC group triggered by the SW trigger.
I am monitoring ADC0_1 to which I vary the Voltage inputs. ADC0_1 is the 1st channel in the group of 4 ADC channels which is mapped for SW trigger.
I can only see the updated voltage value in the next ignition cycle once i reset the ecu.
Test on LP eval board.
Temporary fix : He have currently changed all the SW triggered groups to be triggered as HW triggered groups based on EPWM0_A.
motor spinning tests are blocked due to the improper ADC conversion results.
Hi Akshit,
Can we have a short alignment tomorrow at 11am UK time please if it work fine for you. I have updated the parallel ticket as well. I do not have any conversion results for the ADC SW group SoC.
Hi Ashish,
Sorry for the delay.
Right now we're checking and trying to reproduce the issues locally, that's why the ADC group config would help.
Regards,
Akshit
Hello Akshit,
I have tried to attach the xdm files. but it does not seem to get attached unlike the .c file.If xdm would help you better, please send me a mail to ashish.sebastian@empelsystems.com.
/* * * Copyright (c) 2023 Texas Instruments Incorporated * * All rights reserved not granted herein. * * Limited License. * * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive * license under copyrights and patents it now or hereafter owns or controls to make, * have made, use, import, offer to sell and sell ("Utilize") this software subject to the * terms herein. With respect to the foregoing patent license, such license is granted * solely to the extent that any such patent is necessary to Utilize the software alone. * The patent license shall not apply to any combinations which include this software, * other than combinations with devices manufactured by or for TI ("TI Devices"). * No hardware patent is licensed hereunder. * * Redistributions must preserve existing copyright notices and reproduce this license * (including the above copyright notice and the disclaimer and (if applicable) source * code license limitations below) in the documentation and/or other materials provided * with the distribution * * Redistribution and use in binary form, without modification, are permitted provided * that the following conditions are met: * * * No reverse engineering, decompilation, or disassembly of this software is * permitted with respect to any software provided in binary form. * * * any redistribution and use are licensed by TI for use only with TI Devices. * * * Nothing shall obligate TI to provide you with source code for the software * licensed and provided to you in object code. * * If software source code is provided to you, modification and redistribution of the * source code are permitted provided that the following conditions are met: * * * any redistribution and use of the source code, including any resulting derivative * works, are licensed by TI for use only with TI Devices. * * * any redistribution and use of any object code compiled from the source code * and any resulting derivative works, are licensed by TI for use only with TI Devices. * * Neither the name of Texas Instruments Incorporated nor the names of its suppliers * * may be used to endorse or promote products derived from this software without * specific prior written permission. * * DISCLAIMER. * * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "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 TI AND TI'S LICENSORS 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. * */ /***************************************************************************** Project: AutosarAm263x Date : 2024-02-20 11:10:14 This file is generated by EB Tresos Do not modify this file, otherwise the software may behave in unexpected way ******************************************************************************/ /******************************************************************************* * INCLUDES ******************************************************************************/ #include "Std_Types.h" #include "Adc.h" #include "Adc_Irq.h" /****************************************************************************** * VERSION CHECK ******************************************************************************/ #if ( (ADC_CFG_MAJOR_VERSION != (9U)) \ ||(ADC_CFG_MINOR_VERSION != (0U))) #error "Version numbers of Adc_PBcfg.c and Adc_Cfg.h are inconsistent!" #endif /******************************************************************************* * GLOBAL CONFIG DATA ******************************************************************************/ #define ADC_START_SEC_CONFIG_DATA #include "Adc_MemMap.h" #ifdef __cplusplus extern "C" { #endif extern void ADC_Grp0_Notif(void); extern void ADC_Grp1_Notif(void); extern void ADC_Grp2_Notif(void); extern void ADC_Grp3_Notif(void); extern void ADC_Grp4_Notif(void); extern void ADC_Grp5_Notif(void); extern void ADC_Grp6_Notif(void); extern void ADC_Grp7_Notif(void); extern void ADC_Grp8_Notif(void); extern void ADC_Grp9_Notif(void); /* Create runtime configurations. */ CONST(struct Adc_ConfigType_s, ADC_CONFIG_DATA) AdcConfigSet = { .maxGroup = 10U, .maxHwUnit = 5U, .groupCfg = { [0] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_Adc_HU0_Group_0, .groupPriority =0U, .hwUnitId = 0, .Adc_GroupEndNotification = ADC_Grp0_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_HW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_EPWM0_SOCA, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 1U, .channelConfig = { [0] = { .hwChannelId = 0U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [1] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_0_AdcGroup_Adc_HU0_Group_1, .groupPriority =1U, .hwUnitId = 0, .Adc_GroupEndNotification = ADC_Grp1_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_SW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_SW_ONLY, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1e, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 4U, .channelConfig = { [0] = { .hwChannelId = 1U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [1] = { .hwChannelId = 2U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [2] = { .hwChannelId = 3U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [3] = { .hwChannelId = 4U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [2] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_Adc_HU1_Group_2, .groupPriority =0U, .hwUnitId = 1, .Adc_GroupEndNotification = ADC_Grp2_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_HW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_EPWM0_SOCA, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 1U, .channelConfig = { [0] = { .hwChannelId = 0U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [3] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_1_AdcGroup_Adc_HU1_Group_3, .groupPriority =1U, .hwUnitId = 1, .Adc_GroupEndNotification = ADC_Grp3_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_SW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_SW_ONLY, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1e, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 4U, .channelConfig = { [0] = { .hwChannelId = 1U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [1] = { .hwChannelId = 2U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [2] = { .hwChannelId = 3U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [3] = { .hwChannelId = 4U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [4] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_2_AdcGroup_Adc_HU2_Group_4, .groupPriority =0U, .hwUnitId = 2, .Adc_GroupEndNotification = ADC_Grp4_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_HW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_EPWM0_SOCA, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 1U, .channelConfig = { [0] = { .hwChannelId = 0U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [5] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_2_AdcGroup_Adc_HU2_Group_5, .groupPriority =1U, .hwUnitId = 2, .Adc_GroupEndNotification = ADC_Grp5_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_SW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_SW_ONLY, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1e, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 4U, .channelConfig = { [0] = { .hwChannelId = 1U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [1] = { .hwChannelId = 2U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [2] = { .hwChannelId = 3U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [3] = { .hwChannelId = 4U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [6] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_3_AdcGroup_Adc_HU3_Group_6, .groupPriority =0U, .hwUnitId = 3, .Adc_GroupEndNotification = ADC_Grp6_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_HW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_EPWM0_SOCA, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 1U, .channelConfig = { [0] = { .hwChannelId = 0U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [7] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_3_AdcGroup_Adc_HU3_Group_7, .groupPriority =1U, .hwUnitId = 3, .Adc_GroupEndNotification = ADC_Grp7_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_SW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_SW_ONLY, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1e, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 4U, .channelConfig = { [0] = { .hwChannelId = 1U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [1] = { .hwChannelId = 2U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [2] = { .hwChannelId = 3U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [3] = { .hwChannelId = 4U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [8] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_4_AdcGroup_Adc_HU4_Group_8, .groupPriority =0U, .hwUnitId = 4, .Adc_GroupEndNotification = ADC_Grp8_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_HW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_EPWM0_SOCA, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0x1, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 1U, .channelConfig = { [0] = { .hwChannelId = 0U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, [9] = { .groupId = AdcConf_AdcHwUnit_AdcHwUnit_4_AdcGroup_Adc_HU4_Group_9, .groupPriority =1U, .hwUnitId = 4, .Adc_GroupEndNotification = ADC_Grp9_Notif, .streamNumSamples = (Adc_StreamNumSampleType)1, .resolution = ADC_DEF_CHANNEL_RESOLUTION,/* This is not configurable and should be set to ADC_DEF_CHANNEL_RESOLUTION */ .convMode = ADC_CONV_MODE_ONESHOT, .triggSrc = ADC_TRIGG_SRC_SW, .accessMode = ADC_ACCESS_MODE_SINGLE, .streamBufMode = ADC_STREAM_BUFFER_LINEAR, .hwTrigSignal = ADC_HW_TRIG_BOTH_EDGES, .hwTrigTimer =ADC_TRIGGER_SW_ONLY, .groupReplacement = (Adc_GroupReplacementType)ADC_GROUP_REPL_SUSPEND_RESUME, .groupChannelMask = 0xe, #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .grouplimitcheck = FALSE, #endif .groupDataAccessMode = ADC_GROUP_POLLING_ACCESS, .numChannels = 3U, .channelConfig = { [0] = { .hwChannelId = 1U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [1] = { .hwChannelId = 2U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, [2] = { .hwChannelId = 3U, .samplewindow = 16U, #if (STD_ON == ADC_DMA_MODE) .adcDMAChannel = 0, #endif #if (STD_ON == ADC_ENABLE_LIMIT_CHECK) .channelEnableLimitCheck =(FALSE), .highRange =4095, .lowRange =0, #endif }, }, }, }, .hwUnitCfg = { [0] = { .hwUnitId = (Adc_HWUnitType)ADC_HWUNIT_0, .baseAddr =0x502c0000UL, .prescale = (Adc_mcalClkPrescale_t)ADC_CLK_DIV_4_0, .resolution = (Adc_mcalResolution_t)ADC_RESOLUTION_12BIT, }, [1] = { .hwUnitId = (Adc_HWUnitType)ADC_HWUNIT_1, .baseAddr =0x502c1000UL, .prescale = (Adc_mcalClkPrescale_t)ADC_CLK_DIV_4_0, .resolution = (Adc_mcalResolution_t)ADC_RESOLUTION_12BIT, }, [2] = { .hwUnitId = (Adc_HWUnitType)ADC_HWUNIT_2, .baseAddr =0x502c2000UL, .prescale = (Adc_mcalClkPrescale_t)ADC_CLK_DIV_4_0, .resolution = (Adc_mcalResolution_t)ADC_RESOLUTION_12BIT, }, [3] = { .hwUnitId = (Adc_HWUnitType)ADC_HWUNIT_3, .baseAddr =0x502c3000UL, .prescale = (Adc_mcalClkPrescale_t)ADC_CLK_DIV_4_0, .resolution = (Adc_mcalResolution_t)ADC_RESOLUTION_12BIT, }, [4] = { .hwUnitId = (Adc_HWUnitType)ADC_HWUNIT_4, .baseAddr =0x502c4000UL, .prescale = (Adc_mcalClkPrescale_t)ADC_CLK_DIV_4_0, .resolution = (Adc_mcalResolution_t)ADC_RESOLUTION_12BIT, }, }, }; #ifdef __cplusplus } #endif #define ADC_STOP_SEC_CONFIG_DATA #include "Adc_MemMap.h" /******************************************************************************* * END OF FILE: Adc_PBcfg.c ******************************************************************************/
Hi Ashish,
Thanks for this, we don't need the xdm, but if you could provide the complete IoHwAb_Cyclic5ms function that would help.
Thanks
Thanks Ashish,
Can you check the same setup with interrupt mode and let me know if it's working?
And can you also share what exactly is being done after Adc_ReadGroup function and before calling IoHwAb_Cyclic5ms function again?
Regards,
Akshit
Hi Akshit,
I have already tested the interrupt mode long time back. It was working fine. But in our project polling mode is what is needed to be used and hence the new feature was added in the latest release. Sunil and Pratik knows the background.
Nothing specific is being done after Adc_ReadGroup. I am just copying the ADC converted value into the RTE buffers to be provided to the user component. something like this.
Hi Akshit,
Do you have any updates on the topic? Do you think a short alignment would be helpful? I can share my screen and discuss on the open points. I have a window until tomorrow afternoon UK time. after then i will only be available the next week as i have demo sessions this week starting Wednesday afternoon.
Hi Akshit,
Can we have an alignment in 45 mins? Please use this mail id to set up the call. ashish.sebastian@empelsystems.com
Hey Ashish,
Replied on this thread, https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1322688/am2634-q1-autosar-adc_readgroup-api-calls-to-mcal-driver-does-not-return-the-right-values-from-the-adc-result-buffer/5066910?tisearch=e2e-sitesearch&keymatch=%252520user%25253A581457#5066910
Same app should resolve this query as well.
Please let ne know. Thanks!
Regards,
Akshit
Hi Akshit,
I have tried this proposal and tested a couple of the ADC channels and looks good so far.