Hello,
I have some questions about management of RXnHDP registers of EMAC in TMS570LC43x microcontroller regarding our software design.
The Technical Reference Manual (SPNU563) provides the following statements:
- 32.2.6.2 Transmit and Receive Descriptor Queues (page 1751)
"The HDP must never be written to while a list is active."
- RXnHDP registers (page 1849)
"Writing to these locations when they are nonzero is an error (except at reset)."
I understand that until a RX buffer descriptors list is active, the user shall not write the associated RXnHDP register.
The software design is based on 2 RX buffer descriptors lists used as flip/flop. When EMAC fills a list, CPU processes the other list. Then at a fixed period, the lists are exchanged and a new cycle is executed. It is ensured by design that no Ethernet frame will be received during the flip/flop processing.
Here are the questions:
- Because of lists are oversized with margins, the EMAC list will be still active at the beginning of the new cycle. If I refer to the technical manual I could not write the new head list pointer in the corresponding HDP. However is it correct to disable the receive (RXCONTROL.RX at 0), perform the write on RXnHDP, and enable the receive (RXCONTROL.RX at 1).
- In case of reception of an Ethernet frame during the receive disable (not possible by design but I ask the question for robustness and safety purposes), I understand the consequence should be the set of teardown complete flag (TDOWNCMPLT) in the buffer descriptor which was currently filled by the EMAC. The EMAC still stays in a valid state.
Regards