Category: ARM Cortex-M

USB to LCD converter with STM32F0 7

USB to LCD converter with STM32F0

A great electronic, Marko, did a nice project to show, how STM32F070 in 20-pin footprint can be used with USB and LCD. For 20-pin this MCU is very powerful with his 48MHz and USB with some other peripherals. For hardware specification, including schematics and PCB top layer for toner transfer, you can check an original link, posted at the end of this post.

How to use scanf with USART 3

How to use scanf with USART

I’ve already posted how to use printf (send data to stream) on STM32Fxxx devices. Recently, I received a comment, how to use scanf function to read strings and convert them from USART. Here is a little bit more to do before it will work correct. When you call scanf function, it calls subfunction fgetc, where you return a character. This function is called until it does not return EOF (-1). And it is called very fast. If you check in this function, if...

STM32F7-Discovery. 30

New STM32F7-Discovery board

After STM32F411-Nucleo, STM32F439-Eval board, ST sends me a new discovery board, STM32F7-Discovery. This is a very powerful discovery board according to other series. It is also very big with a lot of features. The STM32F7 discovery kit allows users to develop and share applications with the STM32F7 Series microcontollers based on ARM® Cortex®-M7 core. The discovery kit enables a wide diversity of applications taking benefit from audio, multi-sensor support, graphics, security, video and high-speed connectivity features. The Arduino connectivity support...

How to properly enable/disable interrupts in ARM Cortex-M? 7

How to properly enable/disable interrupts in ARM Cortex-M?

Point of this post is not how to use NVIC (Nested Vectored Interrupt Controller) in Cortex-M processors but how to disable/enable interrupts properly for your system to avoid strange behaviours in your code. Let’s assume you have 2 functions, which do some important stuff and they have to make sure that noone interrupts these 2 functions

ARM Cortex-M SCB ICSR register structure. From 1

Get interrupt execution status on Cortex-M processors

You might come to a situation when you wanna know if current code is executing inside interrupt or not. This might be handy when you do a library and you have one function which you wanna call in interrupt handler for specific event or without interrupt handler, buf wanna execute something specific in function only if you are currently in interrupt. You can create 2 different functions of course, but what if you have one very big function, and for...