Tagged: stm32f4

LwIP ethernet on STM32F4-Discovery 17

Ethernet server using STM32F4-Discovery and SD card

It’s been a while since my last library on the web. I’m making ethernet library with TCP client and TCP server support using external PHYs (currently testing with DP83848, but it will support any PHY you want). I have some troubles yet with code, so library is not prepared for download. It will be as soon as I made it clear and stable. Library is available here. Library key features: Currently support only for RMII interface with PHY and STM32F4...

How to properly set clock speed for STM32F4xx devices 71

How to properly set clock speed for STM32F4xx devices

I see that you have problems with your devices when you don’t know even (and you don’t even ask) on which speed your device is actually running. Speed of your device depends on PLL settings or clock source you have selected for system core clock. In most cases system core clock’s source isĀ PLL output. To get proper value, you check ALWAYS first these settings when something is not working. Because I’m tired of questions that something is not working but...

PWM graph 47

Library 48- Measure PWM input signal with STM32F4

First library in 2015 is here. With it, you will be able to measure PWM input signal from “other world”. STM32F4’s timers have capability to make an interrupt on edge, when signal is active on input pin for specific timer. This allows us, to measure signal in input. With a simple calculations, we can detect frequency of signal and duty cycle. Of course, this is not veery accurate, but with 168MHz F407 device, using 32bit TIM2 (high resolution) I got...

Library 47- CRC module on STM32F4 5

Library 47- CRC module on STM32F4

STM32F4xx devices have CRC (Cyclic Redundancy Check) module inside. This is small and useful unit when working with communications. It might become very useful to verify if your packet of data is correct. STM32F4 devices uses “Ethernet” CRC with polynomial below: X32 + X26 + X23 + X22 + X16 + X12 + X11 + X10 +X8 + X7 + X5 + X4 + X2 + X +1 It is quite ugly šŸ˜€ Well, using this module is very easy....

Library 46- Debug STM32F4 device with SWO feature 43

Library 46- Debug STM32F4 device with SWO feature

All Cortex-M4 devices have feature to output different data for debugging. This can be used instead of one USART available in STM32F4 to display data to user when something is going wrong and you want use debug. STM32F4 has SWD (Serial Wire Debug) option for programming/debugging. All STM32 boards, which have ST-Link on board, uses this option. For programming, only clock and data lines are required. Full SWD also enables you to output something from MCU which debugging. This is...

Library 45- Interface backup SRAM on STM32F4 7

Library 45- Interface backup SRAM on STM32F4

Almost all (with few exceptions) STM32F4xx MCUs have internal backup SRAM, which stores data, if power is available at leastĀ on VbatĀ rails. These MCUs have internal 4-kBytes of SRAM.Ā Backup SRAM can be also used as EEPROM, if your Vbat supply is always active, so you can store data which will stay there also if you reset your device. You just have to make sure that you don’t shut down your power supply or re-write them during startup sequence of MCU. Difference...