Clone
1
Ethernet_driver_documentation
fustbariclation edited this page 2016-07-04 19:41:29 +02:00

Types

In the file stm32-eth.ads we have a list of types. Where is the documentation describing what they all mean?

For example:

type TDES0_Type is record
  Own        : Bit;
  Ic         : Bit;
  Ls         : Bit;
  Fs         : Bit;
  Dc         : Bit;
  Dp         : Bit;
  Ttse       : Bit;
  Reserved_1 : Bit;
  Cic        : UInt2;
  Ter        : Bit;
  Tch        : Bit;
  Reserved_2 : UInt2;
  Ttss       : Bit;
  Ihe        : Bit;
  Es         : Bit;
  Jt         : Bit;
  Ff         : Bit;
  Ipe        : Bit;
  Lca        : Bit;
  Nc         : Bit;
  Lco        : Bit;
  Ec         : Bit;
  Vf         : Bit;
  Cc         : UInt4;
  Ed         : Bit;
  Uf         : Bit;
  Db         : Bit;

end record;

What does each mean?

Procedures

In the file stm32-eth.adb there are a number of procedures. For example:

procedure Initialize_RMII

I can guess what this does. I can guess what 'RMII' means, and 'MII'. I may be right in my guesses - in this particular example, almost certainly. Where, though, can I find the acronym expanded and the effect of the procedure defined?

A little diagram might be helpful to explain the procedures.

For example:

Receiving:

Initialise --> Wait --> Get Packet --> Parse Packet --> Confirm Packet --> Reply

Sending:

Build Packet --> From Address - To Address - Port .... --> Send Packet

Or similar.

I'd like to understand:

- What the Initialise procedure does, how often it is necessary 
- How interrupts are processed:
     - Can you wait on an interrupt vector per port?
     - Is there a socket mechanism you can connect a stream to?
        - In other words, does the chip have the intelligence to interrupt depending on the contents of a packet?
        - Or, alternatively, do you have to provide this yourself?
     - Can one task wait for and process all packets (much like inetd)?
     - Is the packet copied to common memory?