Skip navigation
1 2 3 4 Previous

Embedded

47 Posts authored by: Jan Cumps Top Member
At times it is useful to get activities in your firmware synced up with external events. There are several types of events that are dependent of the speed, frequency, state, ... of something external. In this blog, I'm showing martinvalencia's solution to synchronise a microcontroller PWM signal with an external clock.   image: a blue 20 kHz signal kept under control of an external 60 Hz pulse   The PWM is (in this example) 20 kHz. The external clock is a 60 Hz signal. Those two ...
The STM32H7 firmware pack comes with a very nice encrypt / decrypt example. This example uses the STM32 HAL libraries, and configures all periherals in source code. I'm going to replicate the exact same example, using the CubeIDE MX STM32 Device Configuration Tool.     The goal is to maximise the use of MX, and to show how such a project is built. Software versions: CubeIDE 1.4.2 STM32CubeH7 Firmware Package V1.8.0 STM32CubeMX Version: 6.0.1-RC3     Example Code  ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT road test. I'm working on a touch screen GUI for my electronic load. I'm going to review the ModelListener today. A software component that takes care that your business logic (electronic lab instrument in my case) does not need to know what screen is active, and what it displays.   video: capture in the simulator. This is no longer a mock GUI but a real GUI with a mock SCPI instrument.   I've reviewed the Model-View-Presen ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT road test. I'm working on a touch screen GUI for my electronic load.     In this part of the review, I explore the application layer: request data from the business layer display that data use the Model-View-Presentation style paradigm, where the display logic only deals with display matters use a freeRTOS message queue to send business layer data to the TouchGFX application   image source: ST TouchGFX documentati ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT road test. In this part of the review, I try to mount the extra fan-out PCB and use its UART pins.   I'll start with a rant. The fan-out expansion board does not fit. It is not possible that STMicroelectronics have tested it. The i2c Grove connector blocks against the WiFi module. It is not physically possible to plug them together. I'll desolder the i2c connector. But what a shame. Even with he connector off, the fan-out will i ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT road test. In this part of the review, I try to integrate a UART listener in freeRTOS.   listen to UART characters arriving from the USB port interrupt driven, no constant polling use HAL and freeRTOS to prevent polling tasks, use task notification to wake up the UART task at interrupt use the latest released versions of CubeIDE, HAL layer and CMSIS freeRTOS   Create a Project  In CubeIDE, create a new STM32 project ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT road test. In this part of the review, I'm writing a first custom handler for a button click.     The scenario is simple: you click a button, and that makes a square show up and disappear again. What we'll see: create an event handler control the attributes of another graphical object based on that. I'm assuming that you can bring up a TouchGFX aplication. If not, check STM32H7B3I - Create a TouchGFX Project.   Creat ...
Continued from Pt 1: Screen Works. We left off at the point where the LCD shows out TouchGFX design, but touch screen doesn't work yet. We'll fix that.   5. Add Touch Screen init and handling  The two methods in TouchGFX/target/STM32TouchController.cpp aren't implemented by the wizards. Open the file and implement them as below:   #include <stm32h7b3i_discovery_ts.h> #include <TouchGFXHAL.hpp> #include <cmsis_os.h>   void STM32TouchController::init() { ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT road test. I'm working with the STMicroelectronics software that was in release version at the time I received the kit. Versions: STM32CubeIDE Version: 1.4.1 GNU for STM32, 7-2018 -q2 update TouchGFX Designer 4.14.0 (HAL 1.6.0 and) 1.8.0 STMCubeProgrammer  2.5.0   1. Create a .ioc file with TouchGFX Designer  .ioc files are the heart of the CubeIDE MX HAL configurator. You can start a project from 0 and configure all ...
I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT. I have just set up a clean CubeIDE install, and also installed the resource packages for this kit. Additional I installed TouchGFX and the standalone Cube Programmer. Versions: STM32CubeIDE Version: 1.4.1 GNU for STM32, 7-2018 -q2 update TouchGFX Designer 4.14.0 STMCubeProgrammer  2.5.0   The kit has arrived, and the first results have been mostly successful, except for graphic projects using TouchGFX.     W ...
Goal: Continuously sample an ADC on a single thread microcontroller, with as little as possible CPU overhead. I'm trying to use internal timers and DMA to fill memory with samples, and leaving all processing power for working with that data.   This post is a side effect of porting a TI example for another controller of the Hercules family. The example works, but it's useful to find out the settings done in the HAL utility. Those weren't documented so it took me some effort to sort thos ...
The port of the MBED Timeout works. In this blog you can see the internals of this class and how to set up configuration and handling.       My port is for a Hercules TMS570LC43. I use the HAL utility and api for that controller where possible.   This was the most difficult part. The MBED Timeout inherits from Ticker. And that one inherits from TimerEvent. There's good reasons for this. A Timeout is a Ticker that fires once. A Ticker is TimerEvent that can call a callbac ...
Goal: This post tries to explain what objects are placed where in RAM when using the GCC toolchain. It's intended as self-documentation. When using the LCD, you need large continuous chunks of memory for the frame buffers. Memory is limited on controllers. Continuous large blocks even more so. To be able to reserve these buffers, it's useful to understand where the linker places code, data, stacks and housekeeping blocks. Knowing their position and size - and knowing if you can move things w ...
I'm evaluating the Renesas RX65N MCU EV Kit. In this post,  I make the emWin libraries work with the GCC toolchain   Renesas CC-RX Dependencies  The emWin that's available for the Renesas RX family can be built with the GCC Toolchain, but there are changes needed a CC-RX construct is used to call the NOP() machine instruction. a compile time definition needs to be set. a different emWin library needs to be linked in. take care that code and data are not overlapping the f ...
I'm evaluating the Renesas RX65N MCU EV Kit. In this post,  a mechanism to reserve memory for the LCD module frame buffer with the GCC toolchain   LCD Frame Buffer The Renesas library for LCD, r_glcdc_rx, supports two frame buffers. These are memory areas where you can draw your graphics, then activate the refresh of the LCD from that buffer. There's no specific requirement from the library where the buffers should reside in RAM. You just need to know what address it's located. An ...

Filter Blog

By date: By tag: