In [ ]:
 
In [2]:
from instruments import *
from matplotlib import pyplot as plt
from IPython.display import display, clear_output
import numpy as np
import math
import time
In [3]:
# STM32F417ZET6 revision 4 bootloader not working when crystal caps are 27pF, works intermittenly with 15pF.
# Another board with STM32F417ZET6 revision 2 works reliably with 27 pF caps.
# Crystal frequency 7.999988 MHz on not working board with the 27 pF caps.
# Freqs on working boards: 7.999937 MHz, 7.999965 MHz
In [4]:
scope.screenshot() # Not working board, crystal startup in normal application, blue = VDD, yellow = Xout/PH1
Out[4]:
No description has been provided for this image
In [10]:
scope.screenshot() # Working board, crystal startup in normal application
Out[10]:
No description has been provided for this image
In [9]:
scope.screenshot() # Working board, crystal startup in bootloader
Out[9]:
No description has been provided for this image
In [8]:
scope.screenshot() # Not working board, crystal startup in bootloader
Out[8]:
No description has been provided for this image
In [ ]:
# Working STM32F417 has bootloader revision 9.1
# Not working one has 3.1

image.png image.png

In [14]:
scope.screenshot() # Crystal startup time with 20 pF caps
# Yellow = Xout, Blue = GPIO pin raised with HSEON and cleared when HSERDY
Out[14]:
No description has been provided for this image
In [15]:
scope.screenshot() # Crystal startup time with 15 pF caps
# Yellow = Xout, Blue = GPIO pin raised with HSEON and cleared when HSERDY
Out[15]:
No description has been provided for this image
In [ ]:
# Conclusion: V3.1 bootloader has needlessly short timeout for crystal startup.
# The larger capacitors push the startup time beyond the limit.