Skip navigation
1 2 3 4 Previous

Embedded

60 Posts authored by: Jan Cumps
I've reviewed the Monarch Go LTE/4G modem for a road test. For that exercise, the modem was mounted on an Arduino-style shield. And there was a complete software example. In this post, I am checking the lower levels of the modem. How to directly talk to it and get logging info out. Most of the Monarch Go documentation is available under NDA only. I'm restricting the info here on what's available in public, or what you can find out without the NDA restricted info, by poking at the serial ports ...
Modifications don't always go right. Yesterday morning I tried to replace the PCB WiFi / BT antenna on a Avnet SmartEdge with an external one. I had to place a fitting connector on a footprint and turn a resistor 90° to route the signal to it.   I got he connector off a launchpad that's no longer supported. That wasn't hard, although it took a decent time to heat up the big ground plane.     The drama occurred when I tried to unsolder the tiny resistor with a hot air ...
This is a little side note, related to the project Arduino Day Workshop: NanoDrone II: AI and Computer Vision with LoRa (Win a PSoC6 and a Pair of MKR 1300 Boards!). In this project, 4 attributes are sent to Amazon Web Services, via MQTT. We get the data as a fixed length char array. And at some point it needs to get converted into a JSON message.     fixed length record: The red marks are not in the record. They indicate where decimal and field separators are.   JSON forma ...
The steps to integrate incoming UART data with FreeRTOS on a PSoC 6. Part 2: now with low power support.   image source: Infineon application note AN219528 PSoC 6 MCU Low-Power Modes and Power Reduction Techniques   In the first iteration of this exercise, I wrote: The focus is on saving processor power. The design does not poll for incoming data. It yields all powers to the RTOS scheduler (possibly going to low power mode) until a trigger fires after a defined number of bites a ...
In this post: what happens if you remove the debugger. Will everything still work? What's the difference?   TL;DR: you can still use all functionality.   Difference when debugger is broken off  When you break the debugger off the main PCB, you break all PCB traces. Only the specific "for-debug" signal traces are available on the debugger's J4 header. So when you plug your debugger on the main board via J4, you will be able to: program the device step through the code via ...
In this post we react on a message on the RTOS queue and publish its payload on Amazon's AWS IoT MQTT service.   Together with the two previous posts, this one describes a hardware component in the NanoDrone II project of balearicdynamics. Scenario: receive 16 bytes of payload from an Arduino over serial, and forward it to AWS cloud. The summary of the flow: 2 main tasks, one for the UART with Arduino, one for MQTT with AWS. all tasks sleep. when Arduino sends 16 bytes, a trigger ...
The steps to use an RTOS message queue to exchange data between tasks. In this post, we post data from the low level hardware (UART peripheral) to a task that handles a logic part of our firmware.   This is a direct follow up from the previous FreeRTOS post, where semaphores and triggers were used to collect incoming UART data without burning CPU cycles. Now, we add the mechanism to give that data to the logic part of the application, while keeping the UART / low-level part lean. We' ...
The steps to integrate incoming UART data with FreeRTOS on a PSoC 6. The focus is on saving processor power. The design does not poll for incoming data. It yields all powers to the RTOS scheduler (possibly going to low power mode) until a trigger fires after a defined number of bites arrived at the UART input.   Define a UART with TRIGGER Support  In the initial part of the exercise, I follow the PSoC 6 documentation for Serial Communication Block configuration. You will recognis ...
The steps to create an empty PSoC 6 project and run FreeRTOS on the CM4 core.   It's easy to set up a FreeRTOS project in ModusToolbox. The simplest way is to start from one of the examples of the IDE's Application Creator. But adding FreeRTOS to a project is straightforward too. And it allows you to select the newest version. In my case 10.3.   Start an empty project File > New > ModusToolbox Application Select the PSoC empty project for your board: I use the WiFi BT p ...
When you're making a low power design, it's interesting to know the energy use of your gizmo. In this 2nd post of the series, I measure the current in the different power modes. image source: readme file of the PSoC 6 MCU: Switching Between Power Modes example project   The PSoC6 has several sleep modes. Depending on the one that's active, parts of the controller are switched off: The example project Switching_Power_Modes (source code) demonstrates the modes. When you load this exam ...
When you're making a low power design, it's interesting to know the energy use of your gizmo. I'm working on PSoC6 projects, and I'm going to calculate its energy profile. I'll need to measure the current used by the SoC, and that requires a mod of the proto kit.   The PSoC6 has several sleep modes. Depending on the one that's active, parts of the controller are switched off: Normal state Low Power mode Low Power state Ultra Low Power mode MCU Active CPU Active MCU Sleep CPU Sl ...
By default, projects in a workspace in the Cypress ModusToolbox IDE (mtb) share board and device configuration files. There are several good reasons to do this, but it's not always what you need. If you want to build designs with a different configuration, there are a few options. The two easy ones are: multiple workspaces and - what I test here - a project with fully contained configurations.   The procedure is explained in the ModusToolbox User Guide, 5.4 Modifying the BSP Configura ...
I'm playing with object oriented firmware for embedded controllers. In this blog I review object oriented callbacks. How to invoke the correct function of the correct object.   I've been using the C / C++ mix for a decent time now, with good results. During the blog series, I focused on getting things compiling and working. This was partly based on getting C++ work on an environment that's C focused, but a toolchain that supports C++. Then, as proof of concept, port parts of the MBED li ...
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  ...

Filter Blog

By date: By tag: