Skip to content

Add ADC Dual Mode support with new AdvancedADCDual class #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

jmdodd95682
Copy link
Contributor

@jmdodd95682 jmdodd95682 commented Mar 19, 2024

The proposed change adds a new class AdvancedADCDual class which is used to handle configuring ADC1 and ADC2 and starting them synchronously by enabling Dual mode in the ADC1/2_CCR register.

It works like this:

AdvancedADC adc_input[2];
AdvancedADCDual adc_dual;

result = adc_dual.begin(&(adc_input[0]), &(adc_input[1]), sample_resolution, sample_rate, num_samples, QUEUE_DEPTH, 2, &pins);

where pins is an array of pins numbers.

The AdvancedADCDual begin() routine calls the AdvancedADC begin() for each instance.
It configures the first pin in the array on ADC1 and the remaining pins on ADC2. There was not a cleaner way to do this
without passing two arrays (which is possible). Finally it calls start() on the AdvancedADC mapped to ADC1.

The AdvancedADC.begin() routine was modified to take two optional parameters: do_start and adcNum.
Additionally, a new start() routine was added to AdvancedADC().
The do_start parameter allows the AdvancedADCDual to hold-off starting the ADC until both are configured.
The adcNum is required because you must force the input pins to be mapped to ADC1 and ADC2 for dual mode.
Since both parameters are defaulted, the AdvancedADC.begin() remains backward compatible with existing code.

Finally, the HALConfig.cpp and .h were modified to add two new routines: hal_enable_dual_mode and hal_disable_dual_mode.
These access the low-level driver to write a 5-bit value to the ADC1/2_CCR register enabling or disabling Dual Mode Simultaneous.

I've tested this, and it seems to work properly.

Revised change based on feedback.  Added new class AdvancedADCDual.  Modified AdvancedADC.begin() to accept optional start and fixed ADC number to allow Dual Mode to be called from AdvancedADCDual.
Added enable_dual_mode and disable_dual_mode to support Dual Mode ADC
Added enable_dual_mode and disable_dual_mode declarations
Copy link

Memory usage change @ 73b2ac6

Board flash % RAM for global variables %
arduino:mbed_giga:giga 🔺 0 - +256 0.0 - +0.01 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Advanced/ADC_Multi
flash
% examples/Advanced/ADC_Multi
RAM for global variables
% examples/Advanced/ADC_Multi_Channel
flash
% examples/Advanced/ADC_Multi_Channel
RAM for global variables
% examples/Advanced/ADC_Multi_Channel_Dynamic
flash
% examples/Advanced/ADC_Multi_Channel_Dynamic
RAM for global variables
% examples/Advanced/ADC_Multi_To_DAC
flash
% examples/Advanced/ADC_Multi_To_DAC
RAM for global variables
% examples/Advanced/ADC_Serial_Plotter
flash
% examples/Advanced/ADC_Serial_Plotter
RAM for global variables
% examples/Advanced/ADC_To_DAC
flash
% examples/Advanced/ADC_To_DAC
RAM for global variables
% examples/Advanced/DAC_One_Channel
flash
% examples/Advanced/DAC_One_Channel
RAM for global variables
% examples/Advanced/DAC_Sine_wave
flash
% examples/Advanced/DAC_Sine_wave
RAM for global variables
% examples/Advanced/DAC_Two_Channels
flash
% examples/Advanced/DAC_Two_Channels
RAM for global variables
% examples/Advanced/I2S_DAC_Output
flash
% examples/Advanced/I2S_DAC_Output
RAM for global variables
% examples/Advanced/I2S_Full_Duplex
flash
% examples/Advanced/I2S_Full_Duplex
RAM for global variables
% examples/Beginner/Audio_Playback
flash
% examples/Beginner/Audio_Playback
RAM for global variables
% examples/Beginner/Audio_Playback_I2S
flash
% examples/Beginner/Audio_Playback_I2S
RAM for global variables
% examples/Beginner/Waveform_Generator
flash
% examples/Beginner/Waveform_Generator
RAM for global variables
%
arduino:mbed_giga:giga 256 0.01 0 0.0 256 0.01 0 0.0 192 0.01 0 0.0 192 0.01 0 0.0 256 0.01 0 0.0 256 0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/Advanced/ADC_Multi<br>flash,%,examples/Advanced/ADC_Multi<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel<br>flash,%,examples/Advanced/ADC_Multi_Channel<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>flash,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>RAM for global variables,%,examples/Advanced/ADC_Multi_To_DAC<br>flash,%,examples/Advanced/ADC_Multi_To_DAC<br>RAM for global variables,%,examples/Advanced/ADC_Serial_Plotter<br>flash,%,examples/Advanced/ADC_Serial_Plotter<br>RAM for global variables,%,examples/Advanced/ADC_To_DAC<br>flash,%,examples/Advanced/ADC_To_DAC<br>RAM for global variables,%,examples/Advanced/DAC_One_Channel<br>flash,%,examples/Advanced/DAC_One_Channel<br>RAM for global variables,%,examples/Advanced/DAC_Sine_wave<br>flash,%,examples/Advanced/DAC_Sine_wave<br>RAM for global variables,%,examples/Advanced/DAC_Two_Channels<br>flash,%,examples/Advanced/DAC_Two_Channels<br>RAM for global variables,%,examples/Advanced/I2S_DAC_Output<br>flash,%,examples/Advanced/I2S_DAC_Output<br>RAM for global variables,%,examples/Advanced/I2S_Full_Duplex<br>flash,%,examples/Advanced/I2S_Full_Duplex<br>RAM for global variables,%,examples/Beginner/Audio_Playback<br>flash,%,examples/Beginner/Audio_Playback<br>RAM for global variables,%,examples/Beginner/Audio_Playback_I2S<br>flash,%,examples/Beginner/Audio_Playback_I2S<br>RAM for global variables,%,examples/Beginner/Waveform_Generator<br>flash,%,examples/Beginner/Waveform_Generator<br>RAM for global variables,%
arduino:mbed_giga:giga,256,0.01,0,0.0,256,0.01,0,0.0,192,0.01,0,0.0,192,0.01,0,0.0,256,0.01,0,0.0,256,0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@iabdalkader
Copy link
Collaborator

Hi! Thanks for sending this! I'll test it tomorrow. In the meantime, do we need to specify the ADC number ? See my comment here: #60 (comment)

Also, can you please format your code like the rest of the library ? I'll leave a few hints in a review.

@@ -115,42 +115,73 @@ DMABuffer<Sample> &AdvancedADC::read() {
return NULLBUF;
}

int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers) {
int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers,bool do_start,uint8_t adcNum) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers,bool do_start,uint8_t adcNum) {
int AdvancedADC::begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers,bool do_start, uint8_t adc_num) {

Space between args, and No camel case please.

Comment on lines 127 to 131
if(adcNum>AN_ARRAY_SIZE(adc_pin_alt))
{
descr = nullptr;
return 0;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(adcNum>AN_ARRAY_SIZE(adc_pin_alt))
{
descr = nullptr;
return 0;
}
if (adcNum > AN_ARRAY_SIZE(adc_pin_alt)) {
descr = nullptr;
return 0;
}

Spaces between operators, bracket on the same line as function/if.

}
}
}
}
else if(adcNum>0) //if ADC specified use that ADC to try to map first channel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else if(adcNum>0) //if ADC specified use that ADC to try to map first channel
} else if (adcNum > 0) { //if ADC specified use that ADC to try to map first channel

adc_pins[0] = pin;
}
}
selectedADC=adcNum; //Store selected number
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
selectedADC=adcNum; //Store selected number
selected_adc = adc_num; //Store selected number

Comment on lines 276 to 280
if(do_start)
{
return(start(sample_rate));
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(do_start)
{
return(start(sample_rate));
}
if (do_start) {
return start(sample_rate);
}

No return() please.

@@ -206,7 +218,7 @@ int hal_adc_config(ADC_HandleTypeDef *adc, uint32_t resolution, uint32_t trigger
sConfig.OffsetNumber = ADC_OFFSET_NONE;
sConfig.SingleDiff = ADC_SINGLE_ENDED;
sConfig.SamplingTime = ADC_SAMPLETIME_8CYCLES_5;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@@ -46,18 +46,18 @@ int hal_tim_config(TIM_HandleTypeDef *tim, uint32_t t_freq) {
sConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_ENABLE;

if (tim->Instance == TIM1) {
__HAL_RCC_TIM1_CLK_ENABLE();
__HAL_RCC_TIM1_CLK_ENABLE();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
__HAL_RCC_TIM1_CLK_ENABLE();
__HAL_RCC_TIM1_CLK_ENABLE();

Please remove any spaces you added.

Comment on lines +67 to +71

//void setADCDualMode(bool dm);
//int enableDualMode();
//int disableDualMode();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//void setADCDualMode(bool dm);
//int enableDualMode();
//int disableDualMode();

Comment on lines +79 to +80
AdvancedADC *adcIN1;
AdvancedADC *adcIN2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AdvancedADC *adcIN1;
AdvancedADC *adcIN2;
AdvancedADC &adc1;
AdvancedADC &adc2;

Those should be passed by reference.

}
AdvancedADC(): n_channels(0), descr(nullptr) {}
~AdvancedADC();
bool available();
SampleBuffer read();
int begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers);
int begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers, size_t n_pins, pin_size_t *pins) {
int begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers, bool do_start=true,uint8_t adcNum=0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers, bool do_start=true,uint8_t adcNum=0);
int begin(uint32_t resolution, uint32_t sample_rate, size_t n_samples, size_t n_buffers, bool start=true, uint8_t adc_instance=0);

@jmdodd95682
Copy link
Contributor Author

I could not locate your specific comment on the ADC number in #60. Probably me.

Anyway, the reason we need the ADC number is that Dual mode only works if you can use ADC1 and ADC2. It does NOT work with ADC3. Nor can you combine ADC1 and 3...etc.

So, if someone has already declared an instance of AdvancedADC and executed a begin() then probably ADC1 will be taken. And then ADC dual will not work. The existing begin() will just try to use ADC2 and ADC3, and programming the Dual field will make ADC1 no longer work correctly. And ADC3 will never start and won't be synchronized.

In addition, the start MUST be done to ADC1 (not ADC2), so the order in which you declare them matters somewhat if your application wants to start capturing based on a triggering condition (e.g. rising edge) of whatever isconnected to ADC1.

So, I THINK you need the adc number specified. for each begin() to make Dual mode work reliably.

@iabdalkader
Copy link
Collaborator

iabdalkader commented Mar 19, 2024

So, if someone has already declared an instance of AdvancedADC and executed

This would be a user error. We can check if the instances are correct, and check which one is ADC1 and call start on that. And we'll add a comment about that in the example.

Here's my comment from #60

Note I don't think we need to specify the ADC number, which should make things easier. The first pin always determines the ADC instance, and the rest of the pins must map to the same ADC (this code is already implemented). The instances/descriptors are also allocated in order, so you'll get ADC1 first, then ADC2, then ADC3. The AdvancedADCDual can also check if they are the correct ADCs or not.

EDIT @jmdodd95682 btw following the same logic, someone can still pass ADC 2 and 3, or 1 and 3, we can't stop users from doing that but we can detect the error.

Fixed formatting
Fixed formatting
@jmdodd95682
Copy link
Contributor Author

Fair enough. Yes, you can do it this way. It does end up in the same place, without the need for another parameter being passed to begin(). Either way if you ask to ADC1 and ADC2 and cannot get it, it just gives you an error. Good point.

I can make this change.

Copy link

Memory usage change @ 1d11f4f

Board flash % RAM for global variables %
arduino:mbed_giga:giga 🔺 0 - +256 0.0 - +0.01 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Advanced/ADC_Multi
flash
% examples/Advanced/ADC_Multi
RAM for global variables
% examples/Advanced/ADC_Multi_Channel
flash
% examples/Advanced/ADC_Multi_Channel
RAM for global variables
% examples/Advanced/ADC_Multi_Channel_Dynamic
flash
% examples/Advanced/ADC_Multi_Channel_Dynamic
RAM for global variables
% examples/Advanced/ADC_Multi_To_DAC
flash
% examples/Advanced/ADC_Multi_To_DAC
RAM for global variables
% examples/Advanced/ADC_Serial_Plotter
flash
% examples/Advanced/ADC_Serial_Plotter
RAM for global variables
% examples/Advanced/ADC_To_DAC
flash
% examples/Advanced/ADC_To_DAC
RAM for global variables
% examples/Advanced/DAC_One_Channel
flash
% examples/Advanced/DAC_One_Channel
RAM for global variables
% examples/Advanced/DAC_Sine_wave
flash
% examples/Advanced/DAC_Sine_wave
RAM for global variables
% examples/Advanced/DAC_Two_Channels
flash
% examples/Advanced/DAC_Two_Channels
RAM for global variables
% examples/Advanced/I2S_DAC_Output
flash
% examples/Advanced/I2S_DAC_Output
RAM for global variables
% examples/Advanced/I2S_Full_Duplex
flash
% examples/Advanced/I2S_Full_Duplex
RAM for global variables
% examples/Beginner/Audio_Playback
flash
% examples/Beginner/Audio_Playback
RAM for global variables
% examples/Beginner/Audio_Playback_I2S
flash
% examples/Beginner/Audio_Playback_I2S
RAM for global variables
% examples/Beginner/Waveform_Generator
flash
% examples/Beginner/Waveform_Generator
RAM for global variables
%
arduino:mbed_giga:giga 256 0.01 0 0.0 256 0.01 0 0.0 192 0.01 0 0.0 192 0.01 0 0.0 256 0.01 0 0.0 256 0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/Advanced/ADC_Multi<br>flash,%,examples/Advanced/ADC_Multi<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel<br>flash,%,examples/Advanced/ADC_Multi_Channel<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>flash,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>RAM for global variables,%,examples/Advanced/ADC_Multi_To_DAC<br>flash,%,examples/Advanced/ADC_Multi_To_DAC<br>RAM for global variables,%,examples/Advanced/ADC_Serial_Plotter<br>flash,%,examples/Advanced/ADC_Serial_Plotter<br>RAM for global variables,%,examples/Advanced/ADC_To_DAC<br>flash,%,examples/Advanced/ADC_To_DAC<br>RAM for global variables,%,examples/Advanced/DAC_One_Channel<br>flash,%,examples/Advanced/DAC_One_Channel<br>RAM for global variables,%,examples/Advanced/DAC_Sine_wave<br>flash,%,examples/Advanced/DAC_Sine_wave<br>RAM for global variables,%,examples/Advanced/DAC_Two_Channels<br>flash,%,examples/Advanced/DAC_Two_Channels<br>RAM for global variables,%,examples/Advanced/I2S_DAC_Output<br>flash,%,examples/Advanced/I2S_DAC_Output<br>RAM for global variables,%,examples/Advanced/I2S_Full_Duplex<br>flash,%,examples/Advanced/I2S_Full_Duplex<br>RAM for global variables,%,examples/Beginner/Audio_Playback<br>flash,%,examples/Beginner/Audio_Playback<br>RAM for global variables,%,examples/Beginner/Audio_Playback_I2S<br>flash,%,examples/Beginner/Audio_Playback_I2S<br>RAM for global variables,%,examples/Beginner/Waveform_Generator<br>flash,%,examples/Beginner/Waveform_Generator<br>RAM for global variables,%
arduino:mbed_giga:giga,256,0.01,0,0.0,256,0.01,0,0.0,192,0.01,0,0.0,192,0.01,0,0.0,256,0.01,0,0.0,256,0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 19, 2024
@per1234 per1234 linked an issue Mar 19, 2024 that may be closed by this pull request
More formatting fixes and removed need for adc_num.
@jmdodd95682
Copy link
Contributor Author

Okay. I removed the adc_num from the AdvancedADC.begin().

The AdvancedADCDual.begin() now checks that the assigned ADC for the first pin is ADC1 and all subsequent pins is ADC2.
The changes to AdvancedADC.begin() are now much simpler.

Also added a new member function in AdvancedADC.getAssignedADC() so that AdvancedADCDual can determine which ADC was assigned and flag an error if its not correct.

I tested it, it works reliably on my app.

Copy link

Memory usage change @ 4f467e2

Board flash % RAM for global variables %
arduino:mbed_giga:giga 🔺 0 - +64 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Advanced/ADC_Multi
flash
% examples/Advanced/ADC_Multi
RAM for global variables
% examples/Advanced/ADC_Multi_Channel
flash
% examples/Advanced/ADC_Multi_Channel
RAM for global variables
% examples/Advanced/ADC_Multi_Channel_Dynamic
flash
% examples/Advanced/ADC_Multi_Channel_Dynamic
RAM for global variables
% examples/Advanced/ADC_Multi_To_DAC
flash
% examples/Advanced/ADC_Multi_To_DAC
RAM for global variables
% examples/Advanced/ADC_Serial_Plotter
flash
% examples/Advanced/ADC_Serial_Plotter
RAM for global variables
% examples/Advanced/ADC_To_DAC
flash
% examples/Advanced/ADC_To_DAC
RAM for global variables
% examples/Advanced/DAC_One_Channel
flash
% examples/Advanced/DAC_One_Channel
RAM for global variables
% examples/Advanced/DAC_Sine_wave
flash
% examples/Advanced/DAC_Sine_wave
RAM for global variables
% examples/Advanced/DAC_Two_Channels
flash
% examples/Advanced/DAC_Two_Channels
RAM for global variables
% examples/Advanced/I2S_DAC_Output
flash
% examples/Advanced/I2S_DAC_Output
RAM for global variables
% examples/Advanced/I2S_Full_Duplex
flash
% examples/Advanced/I2S_Full_Duplex
RAM for global variables
% examples/Beginner/Audio_Playback
flash
% examples/Beginner/Audio_Playback
RAM for global variables
% examples/Beginner/Audio_Playback_I2S
flash
% examples/Beginner/Audio_Playback_I2S
RAM for global variables
% examples/Beginner/Waveform_Generator
flash
% examples/Beginner/Waveform_Generator
RAM for global variables
%
arduino:mbed_giga:giga 64 0.0 0 0.0 64 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 64 0.0 0 0.0 64 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/Advanced/ADC_Multi<br>flash,%,examples/Advanced/ADC_Multi<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel<br>flash,%,examples/Advanced/ADC_Multi_Channel<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>flash,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>RAM for global variables,%,examples/Advanced/ADC_Multi_To_DAC<br>flash,%,examples/Advanced/ADC_Multi_To_DAC<br>RAM for global variables,%,examples/Advanced/ADC_Serial_Plotter<br>flash,%,examples/Advanced/ADC_Serial_Plotter<br>RAM for global variables,%,examples/Advanced/ADC_To_DAC<br>flash,%,examples/Advanced/ADC_To_DAC<br>RAM for global variables,%,examples/Advanced/DAC_One_Channel<br>flash,%,examples/Advanced/DAC_One_Channel<br>RAM for global variables,%,examples/Advanced/DAC_Sine_wave<br>flash,%,examples/Advanced/DAC_Sine_wave<br>RAM for global variables,%,examples/Advanced/DAC_Two_Channels<br>flash,%,examples/Advanced/DAC_Two_Channels<br>RAM for global variables,%,examples/Advanced/I2S_DAC_Output<br>flash,%,examples/Advanced/I2S_DAC_Output<br>RAM for global variables,%,examples/Advanced/I2S_Full_Duplex<br>flash,%,examples/Advanced/I2S_Full_Duplex<br>RAM for global variables,%,examples/Beginner/Audio_Playback<br>flash,%,examples/Beginner/Audio_Playback<br>RAM for global variables,%,examples/Beginner/Audio_Playback_I2S<br>flash,%,examples/Beginner/Audio_Playback_I2S<br>RAM for global variables,%,examples/Beginner/Waveform_Generator<br>flash,%,examples/Beginner/Waveform_Generator<br>RAM for global variables,%
arduino:mbed_giga:giga,64,0.0,0,0.0,64,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,64,0.0,0,0.0,64,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

Removed a couple of debug statements I left hanging around
Copy link

Memory usage change @ e3d00aa

Board flash % RAM for global variables %
arduino:mbed_giga:giga 🔺 0 - +64 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Advanced/ADC_Multi
flash
% examples/Advanced/ADC_Multi
RAM for global variables
% examples/Advanced/ADC_Multi_Channel
flash
% examples/Advanced/ADC_Multi_Channel
RAM for global variables
% examples/Advanced/ADC_Multi_Channel_Dynamic
flash
% examples/Advanced/ADC_Multi_Channel_Dynamic
RAM for global variables
% examples/Advanced/ADC_Multi_To_DAC
flash
% examples/Advanced/ADC_Multi_To_DAC
RAM for global variables
% examples/Advanced/ADC_Serial_Plotter
flash
% examples/Advanced/ADC_Serial_Plotter
RAM for global variables
% examples/Advanced/ADC_To_DAC
flash
% examples/Advanced/ADC_To_DAC
RAM for global variables
% examples/Advanced/DAC_One_Channel
flash
% examples/Advanced/DAC_One_Channel
RAM for global variables
% examples/Advanced/DAC_Sine_wave
flash
% examples/Advanced/DAC_Sine_wave
RAM for global variables
% examples/Advanced/DAC_Two_Channels
flash
% examples/Advanced/DAC_Two_Channels
RAM for global variables
% examples/Advanced/I2S_DAC_Output
flash
% examples/Advanced/I2S_DAC_Output
RAM for global variables
% examples/Advanced/I2S_Full_Duplex
flash
% examples/Advanced/I2S_Full_Duplex
RAM for global variables
% examples/Beginner/Audio_Playback
flash
% examples/Beginner/Audio_Playback
RAM for global variables
% examples/Beginner/Audio_Playback_I2S
flash
% examples/Beginner/Audio_Playback_I2S
RAM for global variables
% examples/Beginner/Waveform_Generator
flash
% examples/Beginner/Waveform_Generator
RAM for global variables
%
arduino:mbed_giga:giga 64 0.0 0 0.0 64 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 64 0.0 0 0.0 64 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/Advanced/ADC_Multi<br>flash,%,examples/Advanced/ADC_Multi<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel<br>flash,%,examples/Advanced/ADC_Multi_Channel<br>RAM for global variables,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>flash,%,examples/Advanced/ADC_Multi_Channel_Dynamic<br>RAM for global variables,%,examples/Advanced/ADC_Multi_To_DAC<br>flash,%,examples/Advanced/ADC_Multi_To_DAC<br>RAM for global variables,%,examples/Advanced/ADC_Serial_Plotter<br>flash,%,examples/Advanced/ADC_Serial_Plotter<br>RAM for global variables,%,examples/Advanced/ADC_To_DAC<br>flash,%,examples/Advanced/ADC_To_DAC<br>RAM for global variables,%,examples/Advanced/DAC_One_Channel<br>flash,%,examples/Advanced/DAC_One_Channel<br>RAM for global variables,%,examples/Advanced/DAC_Sine_wave<br>flash,%,examples/Advanced/DAC_Sine_wave<br>RAM for global variables,%,examples/Advanced/DAC_Two_Channels<br>flash,%,examples/Advanced/DAC_Two_Channels<br>RAM for global variables,%,examples/Advanced/I2S_DAC_Output<br>flash,%,examples/Advanced/I2S_DAC_Output<br>RAM for global variables,%,examples/Advanced/I2S_Full_Duplex<br>flash,%,examples/Advanced/I2S_Full_Duplex<br>RAM for global variables,%,examples/Beginner/Audio_Playback<br>flash,%,examples/Beginner/Audio_Playback<br>RAM for global variables,%,examples/Beginner/Audio_Playback_I2S<br>flash,%,examples/Beginner/Audio_Playback_I2S<br>RAM for global variables,%,examples/Beginner/Waveform_Generator<br>flash,%,examples/Beginner/Waveform_Generator<br>RAM for global variables,%
arduino:mbed_giga:giga,64,0.0,0,0.0,64,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,64,0.0,0,0.0,64,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@iabdalkader
Copy link
Collaborator

I'll refactor this PR, rebase it and push it again.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing as superseded by #65

Thanks for your contribution @jmdodd95682!

@per1234 per1234 closed this Mar 24, 2024
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Added dual-mode support for ADC.
3 participants