This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TWIM EasyDMA Delay Between Bytes

Hi,

I'm writing a library for the common Hitachi_HD44780 (LCD2004 etc) but need it to be non-blocking. I'll open source it once done. I'm using EasyDMA to do the transfers but the aging HD44780 needs a 50us delay in-between commands. My idea so far is;

1. set a timer with a period of 50us and a counter equal to the amount of bytes with a PPI to halt the timer and fire an interrupt to indicate "done"
2. timer period event fires EasyDMA which transfers one byte.

My question then is around EasyDMA List mode. Can I clarify that what it's doing is adding MAXCNT to the PTR object after each send?

In other words if I set MAXCNT = 1 and use list mode I should get the spaces inbetween the bytes without needing to interrupt to PTR++?

Parents Reply
  • TIMER4 in counter mode. TIMER3 for the spacing.

    The interrupt fires and continues to fire, I'm unable to shut it down. 

    Even when in the interrupt I do

      CFG_TIMER_LCD_SPACE->TASKS_STOP = 1;
      CFG_TIMER_LCD_COUNTER->TASKS_STOP = 1;
      CFG_TIMER_LCD_COUNTER->TASKS_CLEAR = 1;
      CFG_TIMER_LCD_COUNTER->CC[0] = 900;


    The PPI should have already stopped TIMER3 and cleared TIMER4 but the above would ensure it. Weirdly the interrupt continues!



Children
Related