2020-11-28 05:06 AM
I have custom stm32f765 board it has very minimal design. only some caps and resistor for the reset and boot. My problem is i have attached hse crystal of 16Mhz.
this one
https://www.digikey.in/product-detail/en/epson/TSX-3225-16-0000MF09Z-AC0/SER4069DKR-ND/5413941
and also 12pf ceramic capacitors. i have configured a code to work with hse but still it is not working is there anything i can do to check wether external crystal is working or not ?
by debugging the code i came to know that
while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)
{
if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)
{
return HAL_TIMEOUT;
}
}
code is not going further from this lines
Can you please guide my how can i debug. ? since the same code is working on the nucleo and nucleo has stlink external clock.
Thank you.
Solved! Go to Solution.
2020-11-29 02:19 AM
Sir i tried to use 4pf cap but still it isn't working. at first it work. it was a one second delay blink. after that delay slowly going higher on its own. and then now again it is not working. now the thing is sys tick is working perfectly. i got the time out and now it is going in the error handler. i debug the code using stlink. which is on the nucleo board.
2020-11-29 03:48 AM
I don't really have an opinion either way on the use of 16 MHz, I don't know your reason for choosing that frequency over reference designs using 8 or 25 MHz which are more prolific.
You need to ensure that HSE_VALUE and PLL settings reflect the actual choice. By using a HSE == HSI the PLL settings will be consistent.
2020-11-29 04:12 AM
Oh okey than i will change the design . since i tried about a 5 different types of crystal with 1 to 6 pf caps but none of them are working. but with hsi it is working.
Actually i saw that i can pick any number in stm32cubeide so that's why i choose 16Mhz since i have that in my stock that's why. i will try to buy 25Mhz crystal since i want to run this mcu at 216Mhz.
Does stm provides any refrence for 25Mhz crystal?
Hey can you give me one more help ? can you post a pdf number or link for a refrence design i have created this pcb by just googling and nucleo refrence . i couldn't find a proper refrence design for stm32f7
thank you sir
Is there any chance i can get usb work on hsi ?
2020-11-29 07:53 AM
If not the capacitors, need to really review the circuit as built
USB really needs a crystal to meet specs. 25 MHz typically used for Ethernet centric applications so the PHY can be driven of a direct clock buffer rather than off a PLL
They have moved schematics to .ZIP files, Google the boards, go to the Documentation tab for the product, and pull the BOM and Schematics from there.
F769/F779I-EVAL
H743I-EVAL
2020-11-29 08:49 AM
2020-11-30 12:33 PM
AN4661, AN4879, AN2867,
https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/
NRST has an internal pull-up - remove the R2. That can also be related to your HSE problem.
2020-11-30 09:42 PM
Oh ok , i thought we have to pull up the nrst.. i will try that out today and will report thank you sir.. and that adafruit link is very helpful i will try these solutions and get back to you thank you
2020-12-02 03:44 AM
Hello, i removed the R2 nd then place 1pf cap as load and now it is working..... one another weird stuff i found is that even if i remove the caps the hse is working and usb is also working.. is there a way or flag that i can check if the hse is used instead of hsi ???
2020-12-02 01:55 PM
For a 9 pF load crystal the correct capacitor values should be somewhere in the 8-12 pF range. If that doesn't work for you, the following (said by Clive) should be the case:
With 4 pins you need to insure you've connected the right two, and not mirrored/transposed them. If the circuit is otherwise electrically sound my concern is that you have close to 3x the required capacitance.
All of the clock configuration and statuses can be seen in RCC registers.
2020-12-05 02:44 AM
Oh okey. i don't kno why is it working when even the caps are disconnected .... well thanks for the help now it is working. building some cool projects with the stm32. i love stm32 it just came with lots of rtos out of the box. currently working on the micropython and nuttx
thanks again @Piranha and @Community member