Opublikowano przez Mateusz Salamon, temu

Radio communication using nRF24L01+ modules, part 3

So far I’ve shown you how to use nRF24L01 with polling and I’ve already started doing something with interrupts. More precisely, I used the data-receive interrupt so that incoming data is read from the chip instead of constantly polling the chip to see whether something has arrived. It may not seem like much, but it was still some wasted time on communicating with the chip. What if we used the full potential of interrupts?

(more…)
Opublikowano przez Mateusz Salamon, temu

Radio communication using nRF24L01+ modules, part 2

In the previous post I showed you the simplest way to communicate between two Nucleo boards using the nRF24L01+. For sending and receiving data I used the simplest method, i.e. polling. While checking whether something arrived didn’t do much harm because I only read a single register in the chip, when transmitting I waited in vain until the transfer finished. On top of that, fixed-length data packets were being sent and received. This time I’ll show you how to send data of different lengths and how to receive messages in interrupt mode

(more…)
Opublikowano przez Mateusz Salamon, temu Opublikowano przez Mateusz Salamon, temu

How to Ask for Help with Embedded Programming?

Everyone who programs microcontrollers will sooner or later run into some problems along the way. More experienced people will first try to find a solution on their own. What if you’re a beginner and you don’t know what to do with your problem? It’s best to ask colleagues with more experience. How do you ask for help properly to increase your chances of success? I’ll give you a few tips.

(more…)
Opublikowano przez Mateusz Salamon, temu Opublikowano przez Mateusz Salamon, temu

Additional RTC features in STM32F4 part 1

The RTC clock you’ll find in STM32 microcontrollers is used not only for simple timekeeping. Besides this basic function, it also has several other more or less useful ones. I’ve already shown you the backup registers, which can be used to store sensitive data or remember the date in a less advanced clock. This time I’d like to show you a few other features that are available to us.

(more…)
Opublikowano przez Mateusz Salamon, temu

What’s the deal with the RTC on the STM32F4?

The real-time clock in STM32 microcontrollers is not the same across all families. Basically, we can encounter two different RTCs. One basic one, which is found in older and less advanced microcontrollers like the F1 series, which I covered in previous articles. There is also a more advanced clock, which you can find for example in the F4 family, and that’s exactly what I’m going to take a look at this time.

(more…)
Opublikowano przez Mateusz Salamon, temu

Preserve STM32F1 RTC settings using a battery on VBAT + an external crystal on the BluePill

We made it through together how to work with the time and how to tame the date so that the default one doesn’t come back. We’ve also mastered restoring the date from the hardware RTC backup registers after a power loss. However, we do not have backup power, and in this post I’d like to mention it. What’s more, we will switch to an external crystal on the BluePill board, running into a problem… a hardware one.

(more…)
Opublikowano przez Mateusz Salamon, temu

What is this date in the STM32F1 RCT?

In the previous post I started a mini-series dedicated to the built-in RTC in STM32 chips. I began with probably the most popular microcontroller SMT32F103 found among others in the cheap BluePill board. I got to the point where after resetting the microcontroller the time was still correct, but the date started from zero.

(more…)
Opublikowano przez Mateusz Salamon, temu

Built-in RTC in STM32F1

STM32 microcontrollers undoubtedly have many killer features. Of course, compared to the ancient AVRs that are still used in the most popular Arduino Uno. One of those things is that STMs have a built-in real-time clock, RTC for short. Let me show you in detail what working with such a clock looks like using the HAL library generated by CubeMX.

(more…)