Breakeven point for DMA spi operations

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
geoffrey.brown
Posts: 122
Joined: Thu May 07, 2015 9:47 pm
Has thanked: 3 times
Been thanked: 18 times

Breakeven point for DMA spi operations

Post by geoffrey.brown »

I'm wondering if anybody has a sense of when using a dma read or write operation is a win over transfers via polling assuming the spi clock is at or near the maximum for a given system clock speed.

Geoffrey
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Breakeven point for DMA spi operations

Post by Giovanni »

Hi,

Polled operations are great when you need very low latency or exchanging just one or few frames at time. DMA operations are optimal for large transfer but have the extra cost of setting up DMA at begin, more latency.

Polled operations drawback is polling itself, the thread executing that is not yielding to other threads during operation, best used in low priority threads so it does not affect others.

Giovanni
Post Reply