You can also refer to arch/arm/src/samv7/sam_xdmac.c, SAMA5D2 and SAMV7 series share the same XDMA IP. The xdma driver works well on the SAMV7 platform.
Best Rds Kevin L On Mon, Sep 19, 2022 at 11:08 PM TimH <t...@jti.uk.com.invalid> wrote: > I have reworked the DMA for ATSAMA5D2 but not tested it yet. I will > compare to yours and hopefully spot any differences or errors, thank you! > > Regards, > > Tim. > > > On 19 Sep 2022, at 17:18, NXWorld Lee <kevin.liu.m...@gmail.com> wrote: > > > > Hi Tim, > > SAMA5D2 has 2 XDMA controllers and the definition of peripherals channel > is > > also different with SAMA5D3 and SAMA5D4. > > I will raise a pull request of adding SAMA5D2 XDMA definition to NuttX. > > But I didn't test the XDMA driver on any SAMA5Dx platform. > > > > I run NuttX on SAMA5D3 and SAMA5D2, the maxtouch driver and LCD driver > were > > OK. > > Here is a blog introducing running NuttX graphics on SAMA5D3 Xplained > with > > LCD display driver. > > > https://blog.csdn.net/oldman147/article/details/73410473?spm=1001.2014.3001.5502 > > > > > > Best Rds > > > >> On Mon, Sep 12, 2022 at 10:45 PM TimH <t...@jti.uk.com.invalid> wrote: > >> > >> Thanks Greg - I'm sure someone would have tripped over all of this if > >> they'd tried to get DMA working. I will at the very least get it tested > as > >> best as I can on SAMA5D2 - which it definitely seems I am the only > actual > >> user of with NuttX! Lucky me lol. > >> > >>> -----Original Message----- > >>> From: Gregory Nutt <spudan...@gmail.com> > >>> > >>> I did the D3 and D4 ports years ago and I am not aware of any other use > >> of > >>> those boards. DMA was partially functional then, but was not well > tested > >> and > >>> was still buggy. There were problems documented in > >>> https://github.com/apache/incubator- > >>> nuttx/blob/master/boards/arm/sama5/sama5d4-ek/README.txt > >>> which look like the same issues with the SAMA5D3x-EK in > >>> https://github.com/apache/incubator- > >>> nuttx/blob/master/boards/arm/sama5/sama5d3x-ek/README.txt > >>> > >>> The D2 was more an effort of several people and was based initially on > the > >>> D4 (which was based on the D3). > >>> > >>>> On Mon, Sep 12, 2022 at 8:30 AM TimH <t...@jti.uk.com.invalid> wrote: > >>> > >>>> Aargh...too quick to retract. I think definitions for ATSAMA5D3 and > >>>> ATSAMA5D4 are swapped and there *may* be inconsistencies, based on a > >>>> comparison to datasheets. I don't think anyone has used it as I am 99% > >>>> sure it wouldn't have worked as best as I can tell. File with issues > is: > >>>> > >>>> arch/arm/src/sama5/sam_dmac.h > >>>> > >>>> It was the right file I was looking at, got confused by the presence > >>>> of sam_xdmac.h as well as sam_dmac.h. > >>>> > >>>> I will had "# warning" for ATSAMA5D3 and ATSAMA5D4, and add a new > >>>> section for SAMA5D2 which at least I hope to be able to check and > >>>> confirm as working. > >>>> > >>>>> -----Original Message----- > >>>>> From: TimH <t...@jti.uk.com.INVALID> > >>>>> Sent: 12 September 2022 14:54 > >>>>> To: dev@nuttx.apache.org > >>>>> Subject: RE: SAMA5D3 and D4 DMA > >>>>> > >>>>> Scrap that for now - was looking in the dma not xdma files > >>>>> > >>>>>> -----Original Message----- > >>>>>> From: TimH <t...@jti.uk.com.INVALID> > >>>>>> Sent: 12 September 2022 14:14 > >>>>>> To: dev@nuttx.apache.org > >>>>>> Subject: SAMA5D3 and D4 DMA > >>>>>> > >>>>>> I am reworking DMA to get it working for the SAMA5D2. It seems to me > >>>>>> that there are also errors and inconsistencies in the DMA code for > >>>>>> the > >>>>>> SAMA5D3 and D4 family. > >>>>>> > >>>>>> > >>>>>> > >>>>>> For now I have added "# warning" pre-processor statements. I have no > >>>>>> means to check ATSAMA3 or ATSAMA4 devices - so unless someone can > >>>>>> confirm that DMA does actually work for those 3 families and I've > >>>>>> misunderstood something I will suggest that the warnings remain in > >>>>>> place when I > >>>>> eventually > >>>>>> submit a PR for my work. > >>>>> > >>>> > >>>> > >>>> > >> > >> > >