Justin
If you code these functions from scratch your are looking at maybe 2..3 months of work for the complete application that you have described and possiby more until your have achieved complete reliability and solved all development bugs/issues not initially anticipated. Therefore it is usually only of interest to recode all if you are doing it for study purposes where the process rather than the result is the main goal. I note that you have started using PE for some code generation which is however contradicting your statement because this is also giving you black-box like code (with less visibility).
Even if you don't want to use the uTasker solution, which would allow you to complete the entire project in a couple of days, you can still use its simulator and code base to analyse the operation. Then you could simply learn all internal workings of peripherals and protocol stacks by stepping code in the simulator, reading the intensive comments which explain how it operates and monitor the peripherals registers/behaviors with little need to consult the user manual to understand how it all works together.
To your question about the Ethernet:
You have shown the TxBD in enhanced mode (to use this one the enhanced mode needs to be enabled, but its basic operation is similar to the standard buffer descriptor too).
- TxBufferPointer points to the frame that your SW needs to prepare - this must be 8 byte aligned. (This memory is the buffer descriptors actual frame buffer memory)
- The destination MAC address is written to the first 6 byte of that buffer (not the Buffer descriptor itself).
- After the MAC address (in the frame buffer memory) you fill it with the other values in the Ethernet II frame (including your own MAC address too) and then with your own protocol payload (or IP/TCP etc. with payload)
- You must ensure that there are at least two Tx buffer descriptors chained otherwise the frame will be sent more than once (see errata).
- You must also provide the buffer descriptor memory, which must be 16 byte aligned.
Regards
Mark