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?
Porting ADC driver for MAX78000
- Giovanni
- Site Admin
- Posts: 14496
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1090 times
- Been thanked: 932 times
- Contact:
Re: Porting ADC driver for MAX78000
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
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
-
- Posts: 2
- Joined: Fri Jun 28, 2024 2:31 pm
Re: Porting ADC driver for MAX78000
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
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
- Giovanni
- Site Admin
- Posts: 14496
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1090 times
- Been thanked: 932 times
- Contact:
Re: Porting ADC driver for MAX78000
Quite slow ADC, simulating a sequence in SW should be no problem.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 5 guests