Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have a C program that needs to be done in assembly code (ARM Cortex-M4F) this is dealt with Tiva C for reading ADC We
I have a C program that needs to be done in assembly code (ARM Cortex-M4F) this is dealt with Tiva C for reading ADC
We use CCS to have this done and my main issue to getting the while loop and ADCsequencedata in assembly.
If possible i need this whole C language into assembly
uint 32 t ui32Value // Enable the ADCO module. SysCtlPeripheralEnable (SYSCTL_PERIPH_ADCO) // Wait for the ADCO module to be ready. while (!SysCtlPeripheralReady (SYSCTL_PERIPH ADCO)) // Enable the first sample sequencer to capture the value of channel 0 when // the processor trigger occurs. ADCSequenceConfigure (ADCO_BASE, 0, ADC_TRIGGER_PROCESSOR, 0) ADCSequenceStepConfigure (ADCO_BASE, 0, 0, ADC_CTL_IE I ADC_CTL_ENDI ADC_CTL_CHO) ADCSequenceEnable (ADCO_BASE, 0); // Trigger the sample sequence. ADCProcessorTrigger (ADCO_BASE, 0); // Wait until the sample sequence has completed. while (!ADCIntStatus (ADCO_BASE, 0, false)) // Read the value from the ADC. ADCSequenceDataGet (ADC0_BASE, 0, &ui32Value) uint 32 t ui32Value // Enable the ADCO module. SysCtlPeripheralEnable (SYSCTL_PERIPH_ADCO) // Wait for the ADCO module to be ready. while (!SysCtlPeripheralReady (SYSCTL_PERIPH ADCO)) // Enable the first sample sequencer to capture the value of channel 0 when // the processor trigger occurs. ADCSequenceConfigure (ADCO_BASE, 0, ADC_TRIGGER_PROCESSOR, 0) ADCSequenceStepConfigure (ADCO_BASE, 0, 0, ADC_CTL_IE I ADC_CTL_ENDI ADC_CTL_CHO) ADCSequenceEnable (ADCO_BASE, 0); // Trigger the sample sequence. ADCProcessorTrigger (ADCO_BASE, 0); // Wait until the sample sequence has completed. while (!ADCIntStatus (ADCO_BASE, 0, false)) // Read the value from the ADC. ADCSequenceDataGet (ADC0_BASE, 0, &ui32Value)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started