Page 1 of 1

Porting ADC driver for MAX78000

Posted: Mon Jul 01, 2024 9:09 am
by Nico Zorbach
Hi

I am doing the port of the ADC driver for the MAX78000. The ADC peripheral of the MAX78000 does not support DMA and also does not have a sequencer. Thus, the only way to allow for a sequence of multiple conversions in one function call, is to implement the sequencer in software. I would have to call the function out of the interrupt service routine every time one conversion is finished.
Making up for the missing hardware with this software feature might be confusing for the user. On the other hand, the asynchronous function is not very useful without this feature, as the program has to wait for all conversions in one sequence to be done, before it can continue.

What is your suggestion?

Re: Porting ADC driver for MAX78000

Posted: Mon Jul 01, 2024 5:17 pm
by Giovanni
Hi,

It is certainly possible to implement a SW sequencer, a fairly simple state machine. The main problem is that it would have significant jitter (ISR service time and interaction with other IRQs), it could be a problem or not depending on your application.

How fast is the ADC? the SW sequencer would get one interrupt for each sample, ISR must be simple enough to not miss interrupts.

Giovanni

Re: Porting ADC driver for MAX78000

Posted: Tue Jul 02, 2024 9:50 am
by Nico Zorbach
Thank you for your quick response.

The ADC has a maximum conversion time of 164µs, so it is quite slow. At the moment the ISR just checks the interrupt flag, puts the new sample in a buffer and clears the interrupt flag again.

Nico

Re: Porting ADC driver for MAX78000

Posted: Wed Jul 10, 2024 7:24 pm
by Giovanni
Quite slow ADC, simulating a sequence in SW should be no problem.

Giovanni