Giter Club home page Giter Club logo

freemodbus_slave-master-freertos-stm32's People

Contributors

armink avatar ericqiang avatar guoweilkd avatar mysterywolf avatar podom avatar xmanazc avatar xubovey avatar

Stargazers

 avatar  avatar

freemodbus_slave-master-freertos-stm32's Issues

porttimer.c 问题

void vMBPortTimersEnable(void * this)
{
TIM_HandleTypeDef *p = (TIM_HandleTypeDef *)this;
__HAL_TIM_SET_COUNTER(p, 0);
HAL_TIM_Base_Start_IT((TIM_HandleTypeDef *)this);
}
开启定时器前先清清零定时器,否则从机接收数据总是出错

eMBMasterPoll函数代码错误

  case EV_MASTER_FRAME_RECEIVED:
         eStatus = p->peMBMasterFrameReceiveCur(this, &ucRcvAddress, &ucMBFrame, &usLength);
         /* Check if the frame is for us. If not ,send an error process event. */
         if ((eStatus == MB_ENOERR) && (ucRcvAddress == p->ucMBMasterDestAddress))
         {
             goto EV_MASTER_EXECUTE_LABLE;
         }
         else
         {
             p->eMBMasterCurErrorType = EV_ERROR_RECEIVE_DATA;
             goto EV_MASTER_ERROR_PROCESS_LABLE;
         }
         break;

     case EV_MASTER_EXECUTE:
     EV_MASTER_EXECUTE_LABLE:
         ucMBFrame = (UCHAR *)&(p->ucMasterRTUSndBuf[MB_SER_PDU_PDU_OFF]);
         ucFunctionCode = ucMBFrame[MB_PDU_FUNC_OFF];
         eException = MB_EX_ILLEGAL_FUNCTION;

代码中 ucMBFrame = (UCHAR *)&(p->ucMasterRTUSndBuf[MB_SER_PDU_PDU_OFF]); 不应该出现这行

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.