diff --git a/components/free_rtos/ethernet/eth_rx_flow.cpp b/components/free_rtos/ethernet/eth_rx_flow.cpp index 7a7a942..c936f91 100644 --- a/components/free_rtos/ethernet/eth_rx_flow.cpp +++ b/components/free_rtos/ethernet/eth_rx_flow.cpp @@ -51,10 +51,10 @@ void free_rtos::rxIsrHandler(void *appData) // Reload DMA with a new rx free queue as fast as possible rx_flow->submitFreeRxPkts(readyQCount); - //EnetQueue_append(&rx_flow->rx_ready_pktq_, &rxReadyQ); - - //rx_flow->sem_[EthRxFlow::e_signalRxPkt].post(); + EnetQueue_append(&rx_flow->rx_ready_pktq_, &rxReadyQ); + rx_flow->sem_[EthRxFlow::e_signalRxPkt].post(); +/* rxPktInfo = (EnetDma_Pkt *)EnetQueue_deq(&rxReadyQ); while(rxPktInfo != nullptr) @@ -84,7 +84,7 @@ void free_rtos::rxIsrHandler(void *appData) /// ����������� ������� �������� ������� ++rx_flow->rx_pkt_counter_; } - +*/ } void free_rtos::rxTaskHandler(void *appData) @@ -181,7 +181,7 @@ void free_rtos::EthRxFlow::rxProcessPktTask() while(1) { /// ������� ������� - status = sem_[e_signalRxPkt].pend(e_signalRxPkt_timeout_ticks_); + status = sem_[e_signalRxPkt].pend(); if(status != SystemP_SUCCESS) { //EnetAppUtils_print("rx_flow %u: Warning ! No rx packets timeout.\r\n", id_); diff --git a/components/free_rtos/ethernet/eth_rx_flow.hpp b/components/free_rtos/ethernet/eth_rx_flow.hpp index c2f2aca..a9a7011 100644 --- a/components/free_rtos/ethernet/eth_rx_flow.hpp +++ b/components/free_rtos/ethernet/eth_rx_flow.hpp @@ -50,8 +50,6 @@ private: e_signalTotal }; - static constexpr uint32_t e_signalRxPkt_timeout_ticks_ = SystemP_WAIT_FOREVER; - uint32_t id_; /// ������������� ������ bool open_; /// ���� ����, ��� dma ����� ��� ������ diff --git a/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp b/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp index 48d2bb6..f3bc4bc 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_telegram.cpp @@ -32,6 +32,7 @@ int32_t EcatTelegram::Process(uint8_t *p_data, uint32_t len) { uint8_t *p_datagram_last = unpack(p_data - sizeof(TEthFrameHeader)); if(p_datagram_last == nullptr) { + //DebugP_log((char*)"Warning ! Repeated packet skipped\r\n"); return 0; } diff --git a/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp b/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp index 377748a..03a4b6b 100644 --- a/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp +++ b/components/free_rtos/ethernet_industry/eth_ecat_telegram.hpp @@ -76,8 +76,8 @@ public: bool transfer(queue::Queue& next); private: - static constexpr uint32_t connection_timeout_ticks_ = 60; - static constexpr uint32_t max_transfer_attempts_ = 10; + static constexpr uint32_t connection_timeout_ticks_ = 70; + static constexpr uint32_t max_transfer_attempts_ = 8; Eth& eth_; Timer& ecat_timer_;