Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add programming example for micro-DMA function #286

Open
MikeOpenHWGroup opened this issue Jan 12, 2023 · 5 comments
Open

Add programming example for micro-DMA function #286

MikeOpenHWGroup opened this issue Jan 12, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation task Project related task to do

Comments

@MikeOpenHWGroup
Copy link
Member

MikeOpenHWGroup commented Jan 12, 2023

Task Description

Currently the micro-DMA chapter of the User Manual is a description of how the uDMA works. We need a programmer's view that explains how to write/read the uDMA and peripheral CSRs to transfer data to/from the L2 memories.

Let's start with a simple peripheral for this. I recommend either the uDMA UART or uDMA I2CM peripherals.

Description of Done

Merge pull-request attributed to this issue for docs/doc-src/udma_subsystem.rst plus the associated uDMA peripheral chapter (e.g. docs/doc-src/ip-blocks/udma_uart.rst).

Associated PRs

No response

@MikeOpenHWGroup MikeOpenHWGroup added documentation Improvements or additions to documentation task Project related task to do labels Jan 12, 2023
@DBees
Copy link
Contributor

DBees commented Jan 12, 2023

@MikeOpenHWGroup are you advocating a new chapter or augmenting the existing micro-DMA chapter?

@MikeOpenHWGroup
Copy link
Member Author

@MikeOpenHWGroup are you advocating a new chapter or augmenting the existing micro-DMA chapter?

I would recommend adding this to the peripheral function chapter (e.g. uDMA UART).

@abberthe
Copy link

@MikeOpenHWGroup are you advocating a new chapter or augmenting the existing micro-DMA chapter?

I would recommend adding this to the peripheral function chapter (e.g. uDMA UART).

Under the Programming Model Section?

@abberthe
Copy link

abberthe commented Feb 9, 2023

I started working on this. The programming sequence for all uDMA peripheral follow roughly the same scheme, only Step 1 and Step 2 make use of the general uDMA configuration registers. The other steps involve the specific register section of the each peripheral inside the uDMA memory map.

  1. Clear the clock gating bit of the associated peripheral
  2. Enable interrupt on the associated peripheral
  3. Setup the peripheral
  4. Setup the transfer parameters (address and size)
  5. Start operation (tx/rx)

We could add this generic description to the uDMA section and add the specifics for each uDMA peripheral. @MikeOpenHWGroup what do you say?

@MikeOpenHWGroup
Copy link
Member Author

That works for me @abberthe. It will be important to specify the specific CSRs and CSR fields that s/w needs to write/read for each the above steps. Of course, step 3 will be peripheral dependent, so we could simply point the reader to the appropriate section of the User Manual (e.g. uDMA UART).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation task Project related task to do
Projects
Status: In Progress
Development

No branches or pull requests

3 participants