Skip to content

Commit

Permalink
SAME5x ADCs no longer use DMA
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Apr 13, 2021
1 parent c575f39 commit d58d49d
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 161 deletions.
9 changes: 6 additions & 3 deletions src/AnalogIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ namespace AnalogIn
#ifdef RTOS
// Initialise the analog input subsystem. Call this just once.
// For the SAME5x we need 4 DMA channels. For the SAMC21 we need 1 DMA channel, or 2 if supporting the SDADC.
void Init(DmaChannel dmaChan,
void Init(
#if SAME5x
DmaPriority txPriority,
NvicPriority interruptPriority
#else
DmaChannel dmaChan,
DmaPriority rxPriority
#endif
DmaPriority rxPriority) noexcept;
) noexcept;

// Shut down the analog system. making it safe to terminate the AnalogIn task
void Exit() noexcept;
Expand Down
1 change: 1 addition & 0 deletions src/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ inline void Cache::Invalidate(const volatile void *start, size_t length) noexcep

# if SAME5x
// The SAME5x version of this cache controller allows us to disable data caching
// Caching instructions only increases the time taken by the ADC ISR from 700ns to 750ns, so we don't do it
# define CACHE_INSTRUCTIONS_ONLY (0)
# endif

Expand Down
Loading

0 comments on commit d58d49d

Please sign in to comment.