If((pObj->IO.GetTick() - tickstart) IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) IO. * wait until software reset is done or timeout occurred */ If(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) >= 0) * Get the device address from special mode register */įor(addr = 0 addr IO.ReadReg(addr, LAN8742_SMR, ®value) DevAddr = addr PObj->DevAddr = LAN8742_MAX_DEV_ADDR + 1 Uint32_t tickstart = 0, regvalue = 0, addr = 0 So that function looks like: // Used in ethernetif.c, 363, static void low_level_init(struct netif *netif) PObj->IO.WriteReg(pObj->DevAddr, LAN8742_BCR, LAN8742_BCR_AUTONEGO_EN) In the file lan8742.c (driver), I added an extra line for the LAN8742_Init function, around line 190, to set auto-negotiation: // Link did not come up after HW reset. The HAL_Delay mentioned may not be required, though. On this page you will find good information: You may likely need to change your linker script. The default Ethernet GPIOs speed may be too low. You may need to adjust the tour stack/heap size. Memory buffers need to be assigned to RAM that can be accessed by the Ethernet Information about this issue can be found here. Then I built another input coupling transformer like the one described in my older blog entry.This will probably help you (it did for me): I used some enameled wires for connecting the oscillator VCC, GND and OUT pads to the ZI2: Then I soldered a 40-MHz-quartz-oscillator (I chose an ABRACON ASAAIG-40.000MHZ-K-C-S-T) to a small piece of PCB with 4 solder pads and glued this PCB onto the ZI2 board. ![]() You can either remove it completely or you can move it over to position SB46. In order to circumvent these problems, I decided to solder-in my own clock source instead of clocking the H7 by the ST-LINK V3.įirst I removed SB45, which connects the MCO-pin of the F723 to the PH0-OSC_IN-pin of the H7. You choose the precise, stable, low-noise HSE/3 = 8.3333333 MHz, which is a frequency that is impossible to type-in, and where the clock-issue-resolver never finds any solutions Now you have the choice between the devil and the deep blue sea:Įither you choose the imprecise, unstable and noisy HSI/2 = 8 MHz, which allows you to quickly find solutions for your clock tree in STM32CubeIDE by pressing the „resolve clock issues“ button In the dialog window of this software you can change the clock signal from 8 MHz, driven by HSI, to 8.3333 MHz, driven by the external clock generator divided by three: This is probably the reason why ST chose to offer an alternative clock signal that can be selected by starting a ST-LINK firmware upgrade. One cannot use this signal for precise timers or for interfaces that require a precise timing, like the CAN bus! This RC oscillator is neither as precise as a quartz oscillator nor as stable and quite noisy. ST chose to put out 8 MHz on PA8/MCO of the STM32F723, most likely in order to stay compatible with the clock frequency on the ZI board.īut this 8-MHz signal is now derived from the internal, factory-trimmed 16-MHz-RC-oscillator of the F723 and not anymore from a precise quartz crystal, like it was done on the old ZI-board! A much better choice would have been 24 MHz or 32 MHz.īut for the default configuration, this frequency does not play any role. This choice was not very clever in my opinion. The STM32F723 is clocked by a 25 MHz clock-oscillator. On the ZI2, a much more powerful STM32F723 is used for the ST-LINK debugger. This clock signal is made available on PA8/MCO of the STM32F103 for use by the STM32H7 as external clock signal. Sanguino ATmega644 or ATmega644A (16 MHz) Sanguino ATmega644 or ATmega644A (8 MHz) Sanguino ATmega644P or ATmega644PA (16 MHz) Sanguino ATmega644P or ATmega644PA (8 MHz) Seeeduino. The STM32F103 is clocked by a 8-MHz-Quartz. On the ZI-Board, the STM32H7 gets clocked via a stable 8-MHz-signal coming from the STM32F103 that is used for the on-board ST-LINK V2. Then I found out that the H7 of the ZI2 is no more clocked from a stable 8-MHz-signal like it was on the ZI! ![]() The ZI2 is also equipped with the newer version V3 of the ST-LINK debugger.īut after experimenting a little with the ZI2, I found out that the MCU clock frequency shows some instabilities. The STM32 Nucleo-144 board provides an affordable and flexible way for users to try out new concepts and build prototypes by choosing from the various. ![]() The results of my measurements of the ADC driven by different clock sources will be discussed in a future blog entry. This is not possible with the older H7-MCU (mask revision Y) on board of the NUCLEO-H743ZI. This new clocking scheme is interesting and I wanted to try out clocking the ADC by the H7 system clock instead of clocking the ADC via a PLL output. In mask revision V, ST changed the clocking scheme of the ADC. I wanted to try out one of the newer NUCLEO-H743ZI2 boards, because they are populated with MCUs with the newer mask revision V.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |