Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
I want to calculate the resistance/power of an AC heating element by measuring voltage (via a voltage divider) and current (using an ACS71240 current sensor). The hardware setup is fine. I get the expected values. I checked this when using Arduino Framework's analogRead(). But that call is so slow (because it does the whole ADC initialization and deinitialization every time), that there's too much time between the voltage and current measurement.So while I'm still using the Arduino Framework for most of the code, I've used CubeMX to configure the ADC with DMA and integrated that code into mine. I initialize the ADC/DMA, run one ADC calibration, then in a loop call HAL_ADC_Start_DMA(), wait on a dma_complete variable, that is set in the HAL_ADC_ConvCpltCallback(). This works ... almost.At some point the values of the channels end up in the wrong order in the DMA buffer. So the second channel's conversion result is first in buffer and the first's in the second place. This
Hello everyone. I am trying to build an i2c multi-drop network with STM32C0316CT6 targets. To achieve that i use the differential buffer PCA9615. Each target (and the master of course) has its own PCA9615, the topology is as shown in the picture below. My problem is that when clock stretch is enabled (default) and master pulls the clock low, then the target pulls the clock also low for a tiny amount of time during the normal pulse duration. PCA9615 i2c a-side (non-differential) sets the SCL (a-side) low to ~0.3V (as expected) and then the target pulls the SCL to 0V for that tiny amount of time. For that tiny amount of time, the master and the target are both holding the clock low. That results in an extra voltage offset on the differential side of the buffer. On the multi-drop network, all targets do the same and the differential voltage offset is multiplied and gets huge. The expected behaviour would be from the target to pull the line low only in the stretched pulse and not on
Hello,Does anyone know if there is a stack analyzer tool / plugin available in CubeIDE, in particular to analyze the stacks dynamically allocated in ThreadX Memory pools?Also, under ThreadX Thread List, there is a "stack usage" column. This column is always blank (or N/A), is there something that needs to be done to enable the "stack usage"?
This example work perfectly using non interrupt driven UART HAL library, HAL_UART_Receive and HAL_UART_TransmitAny idea on changing to HAL_UART_Receive_IT and HAL_UART_Transmit_IT?Many thanks https://forum.digikey.com/t/easily-use-scanf-on-stm32/21103
Hi,I am making updates to a custom PCB where I would like to add ADC functionality. My board is powered by batteries and I expect the supply voltage to fluctuate slightly and I need the ADC conversions to be accurate. The reference manual says I can use the internal Vrefint to calculate what the value of VDDA/VREF+ so that I may calculate my conversions with better accuracy. Additionally, I wanted to follow this guide (https://community.st.com/t5/stm32-mcus/how-to-use-the-stm32-adc-s-internal-reference-voltage/ta-p/621425) to understand how I may implement this in firmware.The issue I see now is that on the chip's datasheet it mentions that Vrefint is internally connected to ADC1_IN0, however, ADC1_IN0 has no pinout on this package of the chip. Furthermore, in STM32CubeMX the ADC1_IN0 channel is not able to be selected (although Vrefint channel is able to be selected).Now I have some confusion since the datasheet mentions the internal connection. Maybe this package does not have this a
On an STM32U5G7VJTX I'm using a custom board with an ILI9488 480x320 display in 16-bit mode on the FMC.I am using NemaGFX version 3.5.0 for the STM32U5x9 as I don't have STM32U5x7.Drawing lines for a test works fine as long as I skip the nema_cl_wait() function, which hangs forever.To give GPU2D time to finish the work, I replaced nema_cl_wait() with a short loop that takes enough time. But that's obviously not a good idea, as some tasks can take longer or shorter.On the STM32U5G9J-DK2 Discovery kit the same GPU2D stuff runs just fine!Is this because the GPU2D in the STM32U5G7VJTX isn't exactly the same as in the STM32U5G9ZJT6Q?I've experimented with the GPU initialization in nema_hal.c, but without solving this issue.Does anyone have any ideas?/** * @brief Draws a line * [in] x1 * [in] y1 * [in] x2 * [in] y2 * @return None */ void Draw_Line(float x1, float y1, float x2, float y2) { /* Create GPU Command List */ Display.NemaGFX.cl = nema_cl_create_sized(8192);
Hello STM32 enthusiasts,While testing NemaGFX v1.3.0 for the STM32H7RS (M7), I discovered some differences compared to NemaGFX v3.5.0 for the STM32U5x9 (M33).1. nema_clear(color); Doesn't work, I had to come up with some solution: nema_matrix3x3_t m; NEMA_VG_PAINT_HANDLE paint; uint32_t color = nema_rgba(0xFF, 0xFF, 0x00, 0xFF); /* Fill the screen with a color */ #if defined(STM32H7S7xx) /* Use this on STM32H7RS */ paint = nema_vg_paint_create(); nema_vg_paint_clear(paint); nema_mat3x3_load_identity(m); nema_vg_set_fill_rule(NEMA_VG_FILL_NON_ZERO); nema_vg_paint_set_paint_color(paint, color); nema_vg_draw_rect(0, 0, DISPLAY_SIZE_W, DISPLAY_SIZE_H, m, paint); nema_vg_paint_destroy(paint); #else /* Does not work on STM32H7RS */ nema_clear(color); #endif2. nema_bind_src_tex / nema_blit Does not work with the NEMA_AL88 format, but luckily it does work with the NEMA_ARGB8888 format.// Format = NEMA_AL88 /* Doesn't render any output using AL88 bitmaps */ Format = NEMA_ARGB88
Hello everyone,I am working with STM32G431CBT6 using Keil MDK. I want to develop a bare-metal project (without CubeMX or HAL).However, when I open Manage Run-Time Environment (RTE) in Keil, under the Device section I only see the CubeMX option. The “Startup” component is not available.What I expect:Under:Device → StartupI expect to see the standard startup files for STM32G4 series so I can build a bare-metal project using only:CMSIS → CORE Device → StartupWhat is happening:Only CubeMX appears under the Device section.The Startup option does not show up.Additional Information:MCU: STM32G431CBT6Toolchain: Keil MDKProject type: Bare-metal (no HAL, no CubeMX)I have selected the correct device in "Options for Target → Device".Could this be related to the STM32G4 Device Family Pack (DFP) installation or version?Is there any specific pack configuration required to enable the Startup component?Any guidance would be appreciated.Thank you.
Hello. I purchased two STM32F407VGT6 controllers from different sellers. Later, I noticed that the markings were different. Is it possible to determine the originality of the chip based on the markings? The absence of the ARM label is alarming, and the VGT6 parameters have the number 6 on a separate line.
When opening a project directory in VS Code, the STM32CubeIDE for Visual Studio Code extension gets stuck in an infinite loading state (as shown in the screenshot below).Symptoms:"Go to Definition" does not work.The Build Analyzer view does not appear. clicking the "Build" button still triggers a successful compilation.Most dependent extensions, such as STM32Cube CMake Support, remain inactiveHere is the log output from STM32Cube Core during the failed loading:I discovered that if I completely disconnect my PC from the internet before launching VS Code, the extension reports a network error but then successfully initializes after a short period. Once initialized offline, all features (including Go to Definition) work perfectly.Here are the logs from a successful (offline) launch:My computer’s network connection is working fine. I tested this URL in the VS Code command line —developer.st.com/bundles/BundleRepositoryIndex.json — and it downloads normally. I’ve tried both the latest
We are using STM32G030C8T6 (LQFP48 package) in a new design and need clarification regarding pin 36: PA14‑BOOT0, which according to the datasheet serves both:SWCLK (Serial Wire Debug clock)BOOT0 (boot mode selection)In our earlier designs using similar STM32 devices, BOOT0 and SWCLK were separate pins. BOOT0 was typically pulled down, and SWCLK required no external pull.However, in the STM32G030 series, BOOT0 is multiplexed on PA14, which is also SWCLK. The datasheet states that upon reset, PA14 is configured as SWCLK with an internal pull‑down enabled.We would like clarity on the following points:Is an external pull‑down resistor required on PA14‑BOOT0, or is the internal pull‑down on PA14 sufficient for all conditions?Will adding an external pull‑down interfere with SWCLK operation during debugging?Are there recommended application notes or hardware guidelines specific to STM32G0‑series devices where BOOT0 is multiplexed with SWCLK?
Hello everyone, I'm having some trouble implementing I3C communication and would like to ask for some help. I am using the NUCLEO-H503RB board as my main controller. For the target devices, I have the NUCLEO-IKS01A3 expansion board and the TSC1641 (Click Board) connected. I'm currently facing some issues with the I3C communication setup between these components. I have successfully managed to read the WHO_AM_I ID from the LSM6DSO (on the NUCLEO-IKS01A3). However, when I attempt to read the ID from the TSC1641, the SCL line continues to output a clock signal (or stays toggling) without a proper response. I am seeking assistance in analyzing the root cause of this issue.
Hi,I am trying to figure out what is the easiest way to extend the object detection app provided in https://github.com/STMicroelectronics/STM32N6-GettingStarted-ObjectDetection/In particular, I would like to add one of the many N6 supported libraries such as threadx.Lacking the ioc file, I am currently updating by hand the cubeIDE cproject file with the path to the threadx distribution I imported from the N6 examples repository but I wonder if there isn't a better way.Streamlining or at least providing one example on how to integrate any of the provided supporting libraries would be very helpful. Can anyone point me to any documentation I can use as a reference?
Split from STM32G0B0: RM0454 link out-of-date ? - this is a new topic raising issues in the document itself.Hi @Amel NASRI ,Thank you for your quick answer.I have however encountered a few errors in that RM0454 Rev 5 that are different/fixed in RM0444 Rev 6. For example, the following is all done on an STM32G0B0CE (512kiB) rev Z.Erasing a flash page (page 78/989) PNB's limit should be 128 so it stays limited to the 256KiB of the selected bank using BKER. A higher value (for example 256+) errors the flash controller.If this is correct, the following image should also be incorrect (Table 9, pg 55/989)and be changed toAnother issue that I encountered is that the 512kiB STM32G0B0CE sometimes bricks when attempting to change the option byte DUAL_BANK (pg 81/989)I believe this should also be as in RM0444, 512kiB devices always operate in DUAL_BANK mode. Have I looked over something that caused me these issues? Or could you confirm that these are indeed errors in RM04
I'm trying to make audio equipment using stm32f446re board and pcm5102 module. When I used the audio equipment, when I sent music using i2s communication, the output came out well, but when I finished DMA setting after selecting i2s protocol in sai, the output didn't come out smoothly. (DMA checked operation using callback)Also, I checked pcm5102 can be operated no external sck.What's the problem?
Hello,I am working with STM32 IDE v2 and stm32u585 processors. I have a project which is configured with the help of stm32 cube mx and has its own core/Drivers/.ioc files. It is like a ground for using the processor together with other external modules, like sensors, flash chip, LED drivers which are on the same PCB together with the MCU. I have two products using a processor of this family - one is with 64 pins and other with 100 pins. But they have basiccally the same hardware design and use the same pin mapping and peripherals as close as possible to one another. So both can use the same ground project and its configuration and picking different peripherals based on needs. The customer interface is defined separately, in a project that used to be called Application where MMI part is. It is a higher level project and does not need to know what hw there is. Before it was possible to have the ground project as a submodule to a couple of application projects and it was building wi
Hello, I have a nucleo board with STM32H563. I am trying to make a simple application that will take two ADC measurements with regular conversions. I've been going through the refference manual(RM0481 Rev4) and in the ADC overrun chapter on page 1072, It is stated that there is a three stage ADC_DR FIFO, but not much more about it is explained. My question is: If i create a sequence of 2 channels and trigger them, would I be able to read the DR register twice with value of channel 1 and 2(with an assumption I am using channels 1 and 2), or will the value of channel 1 be overrun by channel 2 value immediately.I don't want to read the data in an ISR after one conversion is completed, I would liek to read them both together after they are both completed.And I don't need a workaround, I am trying to get to know what this ADC can really do. Thanks, Ivan
Hi I have been looking into the boot process for stm32n6 and was unclear about a few things. For booting from external flash the steps are as follows 1. build your app's bin file. The app should be built with the vector table at the start and the linker script should have a base address 0x341804002. Add the header using the signing tool3. Upload the code to flash using extloaderThis is correct right? The second step is what confuses me. I use the command STM32_SigningTool_CLI -bin Project.bin -nk -of 0x80000000 -t fsbl -o Project-trusted.bin -hv 2.3 -dump Project-trusted.binas indicated in https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/NUCLEO-N657X0-Q/Templates/Template. I did a hexdump on the generated Project-trusted.bin file and I have the following questions regarding it 1. The base header and padding header have a combined length of 576 bytes (0x240). After that the app starts. This doesn't line up with the linker script or UM323
Hello all,Currently I have been working on a project which involves reading values using ADC. This is the following connection: AD8495 is used as an ambient temperature sensor. The connections given in the image are taken from the datasheet for adr8495. I have connected the output to channel A0 of my ADC on board with STM32F407ZGT6. The configuration of ADC is as follows. static void MX_ADC1_Init(void) { ADC_ChannelConfTypeDef sConfig = {0}; hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.ScanConvMode = ENABLE; hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.DiscontinuousConvMode = ENABLE; hadc1.Init.NbrOfDiscConversion = 3; hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.NbrOfConversion = 3; hadc1.Init.DMAContinuousRequests = DISABLE; hadc1.Init.EOCSelec
Hello,I’m working on a project using the STM32N6 NPU, and I’m consistently encountering a HardFault during model inference.To set up my project, I followed this tutorial:https://community.st.com/t5/stm32-mcus/how-to-build-an-ai-application-from-scratch-on-the-nucleo-n657x0/ta-p/828502I also used a TFLite model from the Model Zoo on GitHub (I tested several models from the zoo as well as my own custom models).Using the debugger, I was able to pinpoint that the crash occurs on the following line in network.c:LL_Arithacc_Init(2, &Conv2D_7_mul_scale_4_init3);More specifically, the fault happens inside ll_aton.c at:uint32_t t; uint32_t A = Ap != NULL ? LL_ATON_getbits(Ap, bitcnt_A, nbits_A) : (uint32_t)conf->A_scalar;The convolution configuration generated in network.c looks like this:static const LL_Arithacc_InitTypeDef Conv2D_7_mul_scale_4_init3 = { .rounding_x = 0, .saturation_x = 0, .round_mode_x = 0, .inbytes_x = 2, .outbytes_x = 2, .shift_x = 0, .rounding_y = 0, .satura
Hi everyone, I am facing an issue with CAN communication on STM32F446ZCT6, where the CAN controller frequently enters the Bus-Off state. Hardware Details MCU: STM32F446ZCT6 CAN Transceiver: (TJA1042T) I am working with CAN communication on STM32F446ZCT6, and the CAN controller is frequently going into the Bus-Off state. I am using the HSI clock, configured from 8 MHz to 42 MHz, with the CAN clock derived from APB1 = 42 MHz I have enabled Auto Bus-Off Management and tested multiple bitrates (500 kbps, 250 kbps, and 125 kbps), but the issue still occurs. I see bit errors and acknowledgment errors, which eventually cause Bus-Off.Can you please help me to solve this issue.
I am working on STM32h747 series. I am debugging both CM4 and CM7. After a while, CM4 stops responding and the debug messages shows:"Error in final launch sequence: Failed to start GDB serverFailed to start GDB serverError in initializing ST-LINK device.Reason: (4) No device found on target." If I run CM7 independently, it works but CM4 is not responding. I tried to erase the entire board but CM4 is still not responding and the same message is appearing.
Does anyone have a component to display audio spectral graphs, specifically for the STM32N6570 Discovery?
I installed the latest STM32Cube AI Studio along with STM32CubeMX 6.16.0, STM32CubeProgrammer 2.21.0, and ST Edge AI Core.CubeMX has STM32CubeU5 Firmware Package V1.8.0 / 04-June-2025 installed.All attempts to run a neural network end with: ../../Middlewares/ST/AI/Misc/Inc/ai_device_adaptor.h:624:8: error: unknown type name 'UART_HandleTypeDef' When AI Studio generates a project from any neural network, it disables the UART in stm32u5xx_hal_conf.h.Even if I uncomment the #define of HAL_UART_MODULE_ENABLED, the app cannot be compiled because the stm32u5xx_hal_uart.h header was never generated.If I click on the little gear at the upper right in Cube AI Studio, it shows me that the COM5 LPUART1 is configured.So I'm stuck -- Cube AI Studio cannot be used with the stm32u5xx devices.Any advice?Thanks! --Mike
During Startup,after MX_NVIC_Init();when it jumps into /* USER CODE BEGIN 2 */The code is interrupted by TIMx_UP_M1_IRQHandler() in its routine, (void)R3_2_TIMx_UP_IRQHandler(&PWM_Handle_M1);the code gets stuck at /* We can not change OPAMP source if ADC acquisition is ongoing (Dual motor with internal opamp use case) */ while (0x0u != pHandle->pParams_str->ADCDataReg1[pHandle->_Super.Sector]->JSQR) { /* Nothing to do */ }I'm not able to understand why this is happening. I have not initialized any custom ADC (RCM) yet.Everything that has run, until that point is generated code only.With some research I have understood that the TIM1 update routine is infinitely waiting for the ADC(Injected Conversion) to finish. Is this some kind of race condition ?This doesn't happen always on every boot/startup. Only randomly, some times. If it does not crash at this point, I have not observed it to crash at a later point of time.Am I suppose
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.