Hi, I am student working on my thesis. This is my first time using TM4C129EXL for coding. I got trouble with the value recording, when I use breakpoint function in CCS with property action "refresh all window", the values of the potentiometer are continously updated in the expressions table. But when I remove the breakpoint, the display values are not changing anymore. Now I want to keep the values of the potentiometer continously updating without using the breakpoint. How can I do it ?
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/adc.h"
int main(void)
{
uint32_t ui32ACCValues[4];
volatile uint32_t ui32AccX;
volatile uint32_t ui32AccY;
volatile uint32_t ui32AccZ;
SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
ADCHardwareOversampleConfigure(ADC0_BASE, 64);
GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 );
ADCSequenceConfigure(ADC0_BASE, 1, ADC_TRIGGER_PROCESSOR, 0);
ADCSequenceStepConfigure(ADC0_BASE, 1, 0, ADC_CTL_CH3);
ADCSequenceStepConfigure(ADC0_BASE, 1, 1, ADC_CTL_CH2);
ADCSequenceStepConfigure(ADC0_BASE, 1, 2, ADC_CTL_CH1|ADC_CTL_IE|ADC_CTL_END);
ADCSequenceEnable(ADC0_BASE, 1);
while(1)
{
ADCIntClear(ADC0_BASE, 1);
ADCProcessorTrigger(ADC0_BASE, 1);
while(!ADCIntStatus(ADC0_BASE, 1, false))
{
}
ADCSequenceDataGet(ADC0_BASE, 1, ui32ACCValues);
ui32AccX = ui32ACCValues[0];
ui32AccY = ui32ACCValues[1];
ui32AccZ = ui32ACCValues[2];
}
}
PS- this is the code from CLP-workbook, Creating IoT Solutions with the
Tiva® C Series Connected LaunchPad
Workshop