Unable to program or modify option bytes on STM32F4

I have a custom PCBA that uses the STM32F439 that I have successfully built, programmed, and validated 10 units. But recently one of them no longer boots after not using it for ~3 months and has become unreadable using STM32Cube Programmer or CubeMX. When I attempt to connect I receive a popup error that states “Error: Data Read Failed”. It seems that the programmer can properly detect the device and validates the voltage on the PCBA, but when attempting to read option bytes it comes back with 0xcffffffd which places the RDP at FF which does not appear to be a valid configuration. I am unable to reset it to AA using the RDP drop down. I would rather not replace the PCBA or microcontroller and want to perform a root cause analysis of why it would become unreadable.

After searching the forums I am able to find others with similar issues but none that came to a resolution, and most suggested fixes are attempts to alter settings within STM32CubeProgrammer rather than suggestions that the hardware has failed.

I post this here because I purchased the parts through Digi-Key and would like to contact a STMicro FAE before we move into production volumes.

Thank You

Hello @userix
Welcome to DigiKey’s TechForum,

Considerations to check for option byte corruption or hardware/power delivery failure.

The flash controller may be misreading data causing corrupted bytes. Check for cold solder joints with external capacitors. Vcap1 and Vcap2 should be stable around 1.2V. If noting any fluctuations or low voltage readings re-solder or replace those capacitors. Datasheet

If powered using solely an ST-Link probe or lower current USB port, voltages may dip low enough during boot to cause issues. If this is relevant try using an robust external power supply.

Thank you for the response.

I have verified Vcap1 and Vcap2 are stable at 1.21v along with validating all power rail inputs to the chip are stable. I have inspected it under the microscope without any notable issues seen and am hesitant to heat it up since it is a conformal coated board if it is only a corruption issue. Additionally I have augmented the power supply with an external bench supply during programming to rule out voltage dips causing corruption.
I have tried two separate st-link v3 mini programmers and two separate computers STMCubeProgrammer installations. We have multiple engineers…
We will be trying StLink next…

Please help me understand how to get in contact with FAE.

image
You would ask STMicro for support directly by visiting this link: https://www.st.com/content/st_com/en/support/support-home.html

I’ll point out that an RDP setting of anything other than 0xAA or 0xCC is interpreted as Level 1 read protection. So 0xFF is actually a valid configuration and, if that option byte readout is correct, would explain the “Data Read Failed” error. Were this, or any of the other option byte settings, intentionally modified for your application?

What error do you get when you try?

Thank You, I see that any value can be considered valid and interpreted as Level 1.

But when attempting to revert it back to 0xAA I receive the following error and immediately reverts to 0xFF.

Error: Option Byte Programming Failed Or Modified by Application After OB_LAUNCH

Option bytes were not intentionally modified at any time.

Interpreting your option byte readout (0xcffffffd), it looks like PCROP protection is enabled for one sector. If I’m correct (and apologies if I’m not), you may have to clear it at the same time you try to regress the protection level:

If this doesn’t work, then escalating to ST using the link Kristof provided is likely the best path forward.