From b2af36cccabe2d3506365807938f49e28c53a685 Mon Sep 17 00:00:00 2001 From: algin Date: Thu, 28 Sep 2023 14:13:26 +0300 Subject: [PATCH] =?UTF-8?q?fix(UML-1780):=20=D0=92=D0=B5=D1=80=D0=BD=D1=83?= =?UTF-8?q?=D0=BB=20=D0=B8=D0=B7=20=D0=BF=D1=80=D0=B5=D1=80=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F=20=D1=87=D0=B0=D1=81=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=B4=D0=B0.=20=D0=9D=D0=B0=D0=BA=D0=B8=D0=BD?= =?UTF-8?q?=D1=83=D0=BB=20=D0=BF=D0=B0=D0=BC=D1=8F=D1=82=D0=B8.=20=D0=9E?= =?UTF-8?q?=D1=82=D0=BD=D0=BE=D1=81=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=20=D1=81=D1=82=D0=B0=D0=B1=D0=B8=D0=BB=D1=8C=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/free_rtos/ethernet/eth_rx_flow.cpp | 10 +++++----- components/free_rtos/ethernet/eth_rx_flow.hpp | 2 -- .../free_rtos/ethernet_industry/eth_ecat_telegram.cpp | 1 + .../free_rtos/ethernet_industry/eth_ecat_telegram.hpp | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) 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_;