cherry pick from master branch
add pins from master
fix jumping into bootloader once and for all