cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure NUCLEO-64 board after ST-LINK removed?

danieldaniel93
Associate II
Posted on September 05, 2017 at 12:17

I'm trying to get a NUCLEO-F411RE to work after removing the ST-LINK, and can't seem to figure out the correct configuration - or maybe it's findings parts.

I've been fairly careful, doing things one step at a time and confirming that they worked repeatedly before going on to the next step. So the NUCLEO powers properly from external power. I flashed it using an external ST-LINK before removing the one built in, and have flashed it with that one afterwards.  But after removing the ST-LINK, my firmware (�Python) no longer boots. It should boot and start talking to USART1 (this is not a normal configuration - I changed it to use that instead of USART2), and was doing so before I removed the ST-LINK board.

On checking the solder bridges, it seems that the HSE clock came from the ST-LINK, so I've no longer got that.  Changing two solder bridges - remove SB50, required for any configuration that doesn't have an ST-LINK - and jumpering SB55 - should make it boot without HSE. Except - well, �Python won't work without an HSE. So, questions:

The best solution would seem to be installing X3 and changing the solder bridges to use that. From the manual, the crystal is '8 MHz, 16 pF, 20 ppm, and DIP footprint. It is recommended to use 9SL8000016AFXHF0 manufactured by Hong Kong X'tals Limited.' Except they don't seem to make that any more, and I can't seem to find a datasheet. So, can someone recommend an alternative replacement?  Or at least tell me what the '20ppm' spec means: is it tolerance, stability or something else?

A second alternative - at least for now - would be to provide the clock externally. Is there a way to get to the MCO line from the detached ST-LINK and use that? Possibly some other source?

Finally, any recommended tests to verify that the board in it's current configuration - configured to not use HSE - is working properly?

Update: in looking at the Nucleo, adding a suitable crystal for X3 isn't sufficient. It also needs two 20pf capacitors, and two resistors whose value isn't specified(!). They are R35 and R37, and on the schematic in the user manaul are marked as N/A (presumably because they aren't on the board). Anyone have those installed and can tell me their values? Or maybe an old copy of the manual that shows their values?

#hse-config #nucleo-f411re #st-link
11 REPLIES 11
Uwe Bonnes
Principal II
Posted on September 05, 2017 at 12:28

What about fixing yPhyton so that it can use HSI?

Posted on September 05, 2017 at 12:35

Well, the original authors haven't bothered, so it may not be easy, but I'll ask on their forums. If it's not relatively easy, then the complications involved in that would seem to be worse than any of the other options.

But it's preferable to having to provide an external clock, since the reason for removing the ST-LINK is to save space.
Posted on September 05, 2017 at 18:59

ppm, parts per million, like a percentage from 1000000, not 100, defines the accuracy of the clock

Modify the source, likely to be one line, in one file, and rebuild. I'd assume system_stm32f4xx.c, grep for _HSE_

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 05, 2017 at 19:38

two resistors whose value isn't specified(!). They are R35 and R37,

Use 0R, or just a bit of wire or solder.

JW

Posted on September 05, 2017 at 20:26

You can chew on it or you can get it working.

The schematics to 'F411 DISCO lists one of the series resistors as 220Ohm. The BOM for the 'F411 DISCO lists the crystal as

HC-49S-C20QSA-8.000MHZ

JTVHY

which obviously is a mistype (there's no manufacturer named 'JTVHY', there's one called JFVNY (the BOM was probably hand-transcribed from a poorly printed original, I can quite see how F is mistaken for T and N for H). C20QSA matches JFVNY's numbering scheme (C for -20+70deg.C, 20 for 20pF, Q for 20ppm initial precision at 25degC, S for 30ppm thermal stability, A for AT cut). You can get try this very same crystal, or take the one from a ST board (hint: there's one next to the STLink).

Or simply get any 8.000MHz 20ppm crystal with the same specified load, two zero ohm resistors, two 20pF (or 22pF), and try. You may try to get lower-specified-load crystal with lower capacitors, look around at existing 'F4 boards and into AN2867.

Using a series resistors decreases the drive power of the crystal, which increases precision and decreases mechanical wear of the crystal itself (with long term consequences), but also increases the risk that a crystal different from the original one won't start at all.

In other words, there's a miniscule risk that using 0Ohm resistors will decrease precision and long-term reliability, versus a quite real risk that the oscillator won't start.

If you want to be meticuous in this, read the oscillator appnote AN2867 and follow its letters. It's basically a fresh design then and non trivial work which is mostly useless.

If you want to be on absolutely safe side, willing to pay for it, and willing to improvize a bit with the wiring: get a crystal oscillator (XCO) i.e. a self-contained complete oscillating IC, rather than a bare crystal (whcih depends on the internal circuitry of the mcu and in itself is a passive device). You'll need to set RCC accordingly.

On the software side, start a simplistic blinky project and get it working with the crystal. Then you'll know what to change in your existing project.

Your draw.

JW

Posted on September 05, 2017 at 19:49

Yeah, I know it's parts per million. But searching for a crystal, it's used in two criteria: one for stability, and one for tolerance. Which is which.

Grepping over the entire source tree for the STM ports, minus build & the hal directories, _HSE_ shows up in 4 places in 2 files. Two pass RCC_HSE_ON to __HAL_RCC_HSE_CONFIG, and two assign it to RCC_OscInitStruct.HSEState.  I changed all four occurrences to use RCC_HSE_OFF, because that seemed the most likely fix involving just those lines, and tried it on a whole NUCLEO-F411RE.  It fails just like the original source does on the one without the ST-LINK.  Is there some other change I should make instead?

As for 0R resistors, that was my original thought. But they're in an oscillating circuit with the crystal, and a couple of caps, and they aren't listed as SB like other such thinks. So please don't be offended by my asking if your'e sure of this?

Thanks.

Posted on September 05, 2017 at 21:00

Well, since 1) it's working now, just using a whole nucleo, which may present physical problems when the next round of hardware arrives late this week, and 2) I can't get the capacitors until late this week at best, and early next week more likely, I'm perfectly willing to chew on it for a while to get the best solution for me.

I like the idea of an oscillator. Seems like it ought to be easier than adding a crystal.  Having yanked the crystal off the ST-LINK earlier today only to discover I was still missing parts, the next step would be to put it back with connectors in hopes of getting an appropriate signal off of it. Maybe to someone who actually does hardware design, there's an obvious reason it won't work - but I don't see it.

Thanks.

Posted on September 05, 2017 at 21:11

 Having yanked the crystal off the ST-LINK earlier today only to discover I was still missing parts,

There must've been THE capacitors next to it.

JW

Posted on September 05, 2017 at 21:16

Probably. On the other hand, I tried reusing the 0Ω SMD resistors and found that was way beyond my hardware skills. So while someone competent with a soldering iron - and with the proper equipment - may be able to use them, I can't.