weixin_39990410 2020-11-20 23:41
浏览 1

Boot firmware if there is unrecognizeable characters streaming onto serial port


Optiboot, like stk500v2, appears to endlessly attempt to parse incoming serial 
traffic before
booting the app.

Can we have an option or a fix that will either timeout and start the app if no 
good bootloader
packets have been found, or some other recognition system that the traffic is 
not meant for the bootloader, that will trigger the app to start anyway.

The reason for this is in an environment with an attached serial device, 
perhaps a radio, there will
be serial traffic on the UART and if there is a reset for whatever reason, this 
traffic will stop the boot loader from booting the firmware.

Original issue reported on code.google.com by justinbe....com on 24 Jan 2012 at 1:40

该提问来源于开源项目:Optiboot/optiboot

  • 写回答

5条回答 默认 最新

  • weixin_39990410 2020-11-20 23:41
    关注
    
    A good part of how optiboot stays small is that it doesn't have a complete list 
    of commands that are "legal" bootloader commands.  It had the few that it 
    recognizes, and everything else it just says "yes, I did that."
    http://code.google.com/p/arduino/issues/detail?id=368 
    (https://github.com/WestfW/Arduino/commit/e81c1123b624b6cac7da018c9c786700f3152b
    c9 ) added a feature where if there are uart errors (ie speed mismatch), the 
    sketch will be started, so if the sketch operates at different than 115200, you 
    should be OK.
    I could probably add a check for "carriage return" (which is common in many 
    apps, but not used by the bootloader protocol) and treat that as "quit" - that 
    might fit.  Do you think it would be sufficient?
    
    

    Original comment by wes....com on 24 Jan 2012 at 6:21

    评论

报告相同问题?