Category: STM32F429 Discovery

Locked OTP Bytes 7

Library 49- One-Time programmable (OTP) bytes on STM32F4

STm32F4xx devices have OTP (One-Time-Programmable) bytes. They can be used for permanent store of configuration data for your device. Bytes are structured in 16 data blocks where each block has 32 data bytes of available memory. There is also 17th block with 16 bytes of data. His “work” is to store information about states of data block, because you can lock each block forever even if it is totally empty. Important notes: When you write data to specific OTP location...

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 (except STM32F401/STM32F411) STM32F4xx MCUs have internal backup SRAM, which stores data, if power is at least on Vbat, or main voltage is active. These MCUs have internal 4-kBytes of SRAM. It is on location where if you read “too much” you can make a HardFault error and this is something you don’t want. So be careful when you are doing with this ram. Backup SRAM can be also used as EEPROM, if your Vbat battery is always active, so...

STM32F4 identification example result 5

Library 44- STM32F4 unique ID and flash size

STM32F4xx devices have some parts in memory, which are read only and store some information about device. You can use them to protect your program if it is stolen from memory, or to tell programmer/debugger which device is connected with and detect flash size. This library covers 4 things you can read from device: Device signature Device signature is something that you probably want to know when you are working with some device. This feature returns you 16-bit length device...