-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DFU hijack warning to manufacturer guidelines #208
Conversation
What about F7? The text only comment about F4 but I think it happens too on F7. |
Please can you determine the UARTs for F722, F745 and H743? I'm not familiar enough to say for sure. |
6264659
to
fe8dc91
Compare
@SteveCEvans this is a known STM32 design issue - but like to have a low level professional for final review. For the record, using MAMBAG4 with GPS on UART 4. EDIT: Tested with an ublox M8N GPS attached to the FOSSF4ELRS. Several successful flashes without resorting to DFU button (with M10 module it was mandatory). After a few retries even the boot button didn't get me in DFU mode. Removing UART1 connector worked. YMMV. |
Does this mean that the PR is good to go or do you have unresolved problems? |
Happy with the information provided. Just want low level expert confirmation and sharing some test results. As why would this only be limited to UART 1 -3 ? |
To clarify something on this: using the DFU button shouldn't help, as the same problem exists no matter how the chip entered DFU mode. |
Check the AN2606 doc referenced here, it lists the pins which the bootloader listens on: |
Which UARTs and pins are affected on each chip is documented in ST Application Node 2606. The information in this documentation is copied from that document. |
Still part of the question remains. As indeed it only should interfere with UART 1-3 using GPS on UART4 on MAMBAG4 it won't boot into DFU, while removing the GPS it does. |
Please check the table in the PR, you will see that pins PC10,PC11 are referenced for G473 which are mapped to uart4 on the mambaG4: |
Cool, so not the UART mapped to the pin but the PINS itself are suspect-able to the issue (as not reflected in the table) |
Remember that when the bootloader is running, betaflight's pin mappings have not yet been applied. Instead the bootloader has its own pin mappings. In some cases these mappings map one UART to multiple pairs of pins. So for the purposes of this documentation, the UART numbers are actually not relevant, only the pin numbers really matter. |
Should I remove the UART column? It's hardware USART and not betaflight UARTs anyway |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Updated the table, removing the manufacturer USART definition and leaving pairs of pins instead. These pins should be avoided when using GPS or RX that may be powered from 3.3V or 4v5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments have already been addressed, so looks good to me.
Apologies for not getting to this sooner (been on vacation) but it’s a good update. DFU should be entered if 0x7F is received on a monitored USART. It’s evident that a number of peripheral devices can do this. This is described in more detail at https://www.st.com/resource/en/application_note/an3155-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf#page5 Newer processors provide secure boot mechanisms to inhibit DFU attacks, but we have to live with F4s. I’ll look into our options for newer processors. |
No description provided.