2015-11-07 01:24 PM
Hello.
I am trying to understand a few things connected with the Ethernet peripheral (more precisely � its dedicated DMA) which can be found in some STM32F4 devices. In this post I am referring to the
http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf
.The reference manual describes two basic structures which are formed by the descriptors � they are the chain structure and the ring structure. In the case of the ring structure everything seems clear to me. But I have 2 questions connected with the chain structure and both of them:
1. In the chain structure � I have seen some drivers in which the chain structure is formed and the last descriptor points to the first one. My question is (as an example � the case of transmit descriptors): could the last descriptor, instead of pointing to the first descriptor, have TER (Transmit end of ring) bit in the TDES0 (Transmit descriptor Word0) set?2. Is it possible to mix both ideas (ring & chain structures)? As an example � the case of transmit descriptors: some descriptors would have TCH (Second address chained) bit of the TDES0 set and point to the next descriptor as in the �pure� chain mode. Others would have the TCH bit reset and point to 2 buffers each; then the next descriptor would be obtained as in the �pure� ring mode � from the DSL (Descriptor skip length) field in the Ethernet DMA bus mode register (ETH_DMABMR). The last descriptor would either point to the first descriptor or have TER (Transmit end of ring) bit in the TDES0 (Transmit descriptor Word0) set. #!stm32-!ehternet-!dma2015-11-26 08:45 AM
Hello,
Below my comments about your post:
1. The Transmit end of ring (TER) bit of TDES0 is used only when working in ring structure mode, because in this mode we don't have the information when we should return to the first DMA descriptor.
2. No you can’t, as explained in the Reference Manual user has to create the TX and RX descriptors list (chain or ring structure) before starting DMA transfers.
Best regards,
LEO.
Hello.
I am trying to understand a few things connected with the Ethernet peripheral (more precisely – its dedicated DMA) which can be found in some STM32F4 devices. In this post I am referring to the
http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf
.The reference manual describes two basic structures which are formed by the descriptors – they are the chain structure and the ring structure. In the case of the ring structure everything seems clear to me. But I have 2 questions connected with the chain structure and both of them:
1. In the chain structure – I have seen some drivers in which the chain structure is formed and the last descriptor points to the first one. My question is (as an example – the case of transmit descriptors): could the last descriptor, instead of pointing to the first descriptor, have TER (Transmit end of ring) bit in the TDES0 (Transmit descriptor Word0) set? 2. Is it possible to mix both ideas (ring & chain structures)? As an example – the case of transmit descriptors: some descriptors would have TCH (Second address chained) bit of the TDES0 set and point to the next descriptor as in the “pure� chain mode. Others would have the TCH bit reset and point to 2 buffers each; then the next descriptor would be obtained as in the “pure� ring mode – from the DSL (Descriptor skip length) field in the Ethernet DMA bus mode register (ETH_DMABMR). The last descriptor would either point to the first descriptor or have TER (Transmit end of ring) bit in the TDES0 (Transmit descriptor Word0) set.