Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
When I tried it, got the following error:2025-04-18 14:58:31,172 - DEBUG - Executing command: "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -c port=JLINK debugauth=22025-04-18 14:58:31,674 - DEBUG - -------------------------------------------------------------------2025-04-18 14:58:31,674 - DEBUG - STM32CubeProgrammer v2.19.02025-04-18 14:58:31,674 - DEBUG - -------------------------------------------------------------------2025-04-18 14:58:31,675 - DEBUG -2025-04-18 14:58:31,678 - DEBUG - Connecting to J-Link/Flasher Probe2025-04-18 14:58:32,043 - DEBUG - Device=Cortex-M332025-04-18 14:58:32,133 - DEBUG - Device ID : 0x4842025-04-18 14:58:32,134 - DEBUG - Voltage : 3.32V2025-04-18 14:58:32,135 - DEBUG - Frequency : 4000 KHz2025-04-18 14:58:32,218 - DEBUG - Flash size : 2 MBytes2025-04-18 14:58:32,221 - DEBUG - Error: Debug Authentication is not yet supported by J-Link2025-04-18 14:58:32,250 - ERROR - Command '"C:\Program Files\STMicro
[VERSION]: MCSDK 6.4.1[TOOL]:6-Step FirmwareControl by MC Pilot[DETAILS]:In open loop mode, the same duty causes a big speed difference between CW and CCW.It doesn’t make sense.[EXPECTED BEHAVIOR]:In open loop control, CW and CCW should not have a big speed difference.I guess the ".PhaseShift" parameter does not consider CW and CCW.The ".PhaseShift" of CW and CCW should be complementary,and the sum should be 60° electrical angle.[HOW TO REPRODUCE]:Control the motor with 6-step algorithm, current mode.Use Hall signal for commutation and speed calculation.Control by MC Pilot.Set CW or CCW direction.Enable open loop mode and set open loop duty.Start the motor.Get the CW or CCW speed.[2025-10-07 update]I tried using v6.3.2.still In open loop modeI can get the same speed with the same duty when I set the "Placement electrical angle" to 124.so I think my issue is the same issue reported by @jovijuan.
I have previously worked on a BLE-based application that required an external antenna. Based on the use case, I selected the STM32WB1MMC module, which, according to its datasheet, supports external antenna connections. I designed the schematic accordingly and initially conducted tests using the internal antenna. After validating the basic functionality, I transitioned to testing with the external antenna as per the actual use case requirements. I obtained this information from "External antenna interface is only verified for conducted testing. Device has been verified and tested with internal antenna." Based on the information provided in the datasheet, can we proceed with using the module's external SMA antenna connection? Do I need to perform any calculations for a Pi matching circuit or conduct further fine-tuning? Additionally, could you suggest any reference designs or recommended external antenna configurations suitable for this module?"
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code Hello,I am trying to use AES GCM on the STM32U545.When I verify the result, I use the site "AES Encryption Online - Ciphereditor". In the vector, I have to input the value without the counter (0x02); otherwise, the results don't match.Why is this happening? Here are my test vectors: Data: 02 03 04 05 06 07 08 09Key: 59 9e b6 5e 6b 2a 2a 7f cc 40 e5 1c 4f 6e 32 57IV: d4 07 30 1c fa 29 af 85 25 98 1c 17 00 00 00 02AAD: 29 0A 0B 0C Configuration: aesGcmDesc.KeySize = CRYP_KEYSIZE_128B; aesGcmDesc.DataType = CRYP_NO_SWAP; aesGcmDesc.Algorithm = CRYP_AES_GCM_GMAC; aesGcmDesc.pKey = (uint32_t*)v->key; aesGcmDesc.pInitVect = (uint32_t*)v->iv; aesGcmDesc.pAAD = (uint32_t*)v->aad; aesGcmDesc.AADSize = 4; aesGcmDesc.TagSize = 16; aesGcmDesc.Timeout = 0xFF;
Split from STM32U5G9J DK2 + 4G Module (USB CDC ECM) not detecting USB device - this is a different question.这个工程是使用STM32U575 + EC800Z 4G模块,实现ecm上网的。工程测试了sntp,ping,均能正常工作。dns解析运行一段时间后会解析失败,还未去找原因。在这个例子的基础上,另外的工程中使用了MQTT协议,能正常工作,但是如果MQTT消息在超过1000字节左右的时候,会频繁掉线,有时候甚至无法再连上服务器的问题(ERROR: mqtt client connect error: 0x10005),通过日志查看发现网络包也不没有了,一直在查找相关问题,目前还未解决。Google Translate:This project uses STM32U575 + EC800Z 4G module to achieve ecm Internet access. The project tested sntp and ping, both of which worked properly. However, DNS resolution would fail after a while, and the cause has yet to be determined. Building on this example, another project used the MQTT protocol, which also worked properly. However, if the MQTT message length exceeded approximately 1000 bytes, the connection would frequently drop, sometimes even failing to connect to the server (ERROR: mqtt client connect error: 0x10005). Checking the logs revealed that network packets were also missing. We have been searching for re
I want to connect the STM32L433VCT6 to the TLV320DAC3100 using SAI communication.Where should I connect the TLV320DAC3100's MCLK, BCLK, WCLK, and DIN pins on the STM32L433VCT?
Hello Team, Good Day ! Considering USB Specification , D+ line Pull-Up Should be high Once USB Connectors Plugs in , I Tried to Implement Following SCH to accomplish it. 3.3V Enabled through Transistor Q4 (MMBT2222ALT1G). VBUS Signal Comes from Voltage Divider Network when USB Plugs in , See Below : J14 is USB 2.0 Type B Connector. Issue is When I plugged USB , Voltage Down to 2.5VDC from 2.8V @ L2 pin 4 ( i.e. D+ line). Ideally , It should be (3.3V- Vce ). As per USB specs. It should be Minimum 2.8V on D+ pull up. Device is : STM32F303 Regards, Bhupendra
Hi Team, I have been working on the STM32L476RG board for a week now, I have tested a basec button led program and it was working properly, and I developed other sample codes like I2c and buzzer codes and gave a gap, now suddenly I notice that my board is not able to run the previously running codes as mentioned above. I am having no clue what could actually go wrong!!!! I have also came across the STM32 Cube programmer where you can erase the flash memory like doing a mass erase to recover the board, which also didn't work?Does this usually happen with STM32 boards? How to I recover my board right now? Thanks,Pranathi
Hello,I am working on STM32WB5MM custom hardware and trying to implement deep sleep mode using RTC wakeup interrupt. What I want to achieve:MCU should stay active for ~30 seconds after reset.Then enter deep sleep / STOP2 mode.Wake up automatically every 30 seconds using RTC wakeup timer interrupt.Expected current in STOP2 / Standby mode = < 1 mA (microamp level).What is happening:In normal running mode, MCU current ≈ 30 mA (okay).When I put MCU into STOP2 mode, it still consumes ≈ 20 mA, instead of going down to microamps.I am not sure if MCU is really entering STOP2/Standby or staying partially active.while (1){HAL_Delay(30000);HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 30, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);HAL_SuspendTick();HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);SystemClock_Config();HAL_ResumeTick();HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);if (wakeupFlag == 1){wakeupFlag = 0;// Do something on wakeup}}Question:Is this the correct wa
Trying to store some ssl certificates and device configurations in STM32h753zi internal flash using littlefs file system https://github.com/littlefs-project/littlefs. but i could not able find any example in there. i anyone had experience in stm32h7(2MB, 2bank) flash read/write operations with wear leveling. any examples or further guidance could be helpfull. im fine with any effective solutions (not bounded to littlefs).
I am using an STM32H743 FMC to connect to the FPGA to do data transfer. (SRAM type with 16-bit data. I tried this on an STM32F429 and the test was successful) The test is to send some amount of data to the FPGA through FMC.The code is quite simple. Write some data to 0x6000 0000 and check if the FPGA can get the data correctly.My discovery is that if only a small amount of data has been sent and chip select signal FMC_NE1 will remain high and no waveform can be observed...Send 100 data and FMC_NE1 remains high If I send lots of data(for example, 10000 data) then FPGA can receive data correctly, but the data FPGA receives starts from 2020(this number is also random, some time 1820 some time 3020, etc)This phenomenon does not happen on F429... If I send 10 data and the FPGA can receive 10 data correctly...
On the STM32H753, I have configured ThreadX with static allocation. When doing a new and delete, where does the memory come from? As well, where does the memory come from when a, for example, std::vector is created on the stack and then increased in size with a concatenation?
Hi there, I have an B-WL5M-SUBG1 evaluation board which uses the STM32WL5M module.I am having problems with the STM32 receiving a message I am sending it from my laptop via python. I connect between the stm32 and the laptop via an RS422/485 converter. I've used the converter many times before to read print statements from the stm32. Here is the stm32 code I am using: #include "main.h" #include "stm32wlxx_hal.h" #include <string.h> #include <stdio.h> /* Private variables */ UART_HandleTypeDef huart2; uint8_t rx_buffer[4]; // Buffer for received data volatile uint8_t data_received = 0; // Flag for data reception /* Function prototypes */ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_USART2_UART_Init(void); void Error_Handler(void); void check_uart_errors(void); int main(void) { uint8_t tx_ready[] = "READY\r\n"; /* Initialize system */ HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); /* Reset UART2 before use */ __HAL
I have a 2-board communication project set up with 2 NUCLEO-H753ZI boards, where they communicate over UART. The sender side sends a 22-byte stream of data that is received by the receiver side and gets parsed into data. This data can then be streamed to a PC over Ethernet. Inside of the UART_RxCpltCallback, I toggle the Red on-board LED, which gives me the rate at which packets are coming in. Inside the UART_TxCpltCallback I am calling a function that takes the data from the UART buffer, and moves it into a member variable of an object. All this should happen at 2KHz, but for some reason the data is only updating every few seconds, and it is not a specific rate at which it updates, it seems random. The graph might better illustrate what I am talking about. The graph *should* look like a sawtooth waveform. The confusing part is that the LEDs work as expected, i.e. those blocks of code that are responsible for getting the data where it needs to be are surely executing, they ju
[PN]: STM32G431CBU6[VERSION]: 6.4.1[TOOL]: Motor Control Workbench[DETAILS]:The automatic calculation for the speed observer gains in the Speed Sensing Config and the speed regulator gains (Kp & Ki) in the Drive Settings fails. This occurs after importing a custom inverter board JSON file. The tool reports errors and does not populate the gain values.[EXPECTED BEHAVIOR]:After importing the custom inverter JSON file, the Motor Control Workbench should be able to automatically calculate and set the appropriate gains for the speed observer and speed regulators without any errors.[HOW TO REPRODUCE]:Import Custom Inverter Board: Open Motor Control Workbench (v6.4.1) and import a custom inverter board using the following JSON file attached to the post:Navigate to Drive Settings: After the import, navigate to the "Drive Settings" tab.Attempt Automatic Calculation: Check the "Auto Calculate Kp & Ki" box under the "Speed regulator" section.Observe the Error: The tool fails to perform th
Hey everyone!In our app we use HAL_UARTEx_ReceiveToIdle_DMA() to capture serial data to a circular buffer (same as ST Sample 'UART_ReceptionToIdle_CircularDMA UART). It works really well until someone plugs or unplugs cables generating noise on the UART. In this case, we just poll HAL_UART_GetError(), reset the uart using HAL_UART_Init(), and finally call HAL_UARTEx_ReceiveToIdle_DMA() again to recover. The errors returned could be noise, parity, or framing errors (we've seen all 3). The recovery works 95% of the time. But, 5% of the time, after resetting the uart with HAL_UART_Init(), we will enter HAL_UARTEx_ReceiveToIdle_DMA() and it will permanently block/never return. We mitigated this condition by inserting a 50ms delay in between HAL_UART_Init() and HAL_UARTEx_ReceiveToIdle_DMA(). I don't feel super good about this and would rather be checking a flag but I have no idea what co
大家好,我正在使用一塊 STM32L476 Nucleo-64 開發板。我想直接將 USB 隨身碟連接到開發板的 USB 連接埠來讀取它。我正在使用開發板的UART檢查USB讀取操作是否成功。我成功讀取了一個16GB的USB驅動器,但當我嘗試讀取一個256GB的驅動器時卻失敗了。這對我來說很奇怪。有人遇到類似的問題嗎?或是有什麼建議可以解釋一下是什麼原因造成的?任何幫助都將不勝感激!Google Translate:Hello everyone,I'm using an STM32L476 Nucleo-64 development board. I want to connect a USB flash drive directly to the board's USB port to read it.I am using the UART of the development board to check if a USB read operation is successful. I successfully read a 16GB USB drive but failed when I tried to read a 256GB drive.This seems strange to me. Has anyone encountered a similar problem? Or has any suggestions on what could be causing this?Any help would be greatly appreciated!Please see the ST Community Terms and Conditions - The language of the Community is English.
Hi Sir, The peak current of the B-G431B-ESC1 is 40A. Is it possible to modify the board to achieve a higher peak current? If yes, what modifications would be required? If not, could you explain the limitations?Thank you.
Hello everyone,I'm facing an issue with my BLDC motor control system configured via MC Workbench and operated using ST Motor Pilot.Here is my setup:STM32F303FOC with Hall sensorsCurrent sensing with 3 shuntsPWM at 20kHzMotor current limit: 20A, nominal torque current: 4.1AProblem context:When I start the motor under heavy load, it runs normally.Then I stop it by setting the speed command to 0 (to hold position).But when I try to move the arm back up, the motor often fails to restart.I observe Iq saturation at 20A, and the motor doesn’t move.However, if I reverse the direction, it works perfectly.Additional observation:If I directly switch from +800 rpm to -800 rpm using the speed slider, the motor responds very well.So the issue seems to be specifically related to the hold phase at zero speed, which prevents proper restart in the same direction.Investigated lead:I noticed current spikes up to 20A that were blocking the system.
After migration to STMCubeIDE v1.19.0 and STMCubeMX v6.15.0 the working project based on STM32H7 Nucleo-144 Board (STM32H723ZGTx) shows red x for Pinout & Configuration caused by LWIP -> Key Options -> Network Interfaces Options with red x. This error blocks the code generation process.Any suggestions?Thanks.JYI
Hi,We are using the STM32WB5 series. We have implemented a FOTA mechanism to update the BLE Stack and the FUS (both separately).We have noticed a new version of the FUS (2.0.0), which, to our understanding, is not backward compatible with older versions of the BLE Stack. Is our understanding correct?If we just update the FUS to version 2.0.0 without updating the BLE Stack to the matching version, will the BLE stop working? Is there any way to get the BLE to work anyway after just a FUS update to version 2.0.0 with some minor modifications so that we can continue to the next step with our FOTA update and update then the Newer BLE Stack? Thanks,Eyal
Hi,I am working on a project that needs Bluetooth support. Our main MCU: STM32F411CE.Bluetooth module: BlueNRG-2 (Brought a BLUENRG-M2SP module and then fabricated a simple custom breakout board)Initially, I tried to use the official example project from STM32CubeIDE (Beacon, Central, and SensorDemoBLE). But it is not working. I could not discover any signal through a BLE scanner. But I tried to read BLUENRG-M2SP directly using ST-Link and the RF Flasher utility. It worked.I checked the SPI lines of the MCU using a logic analyzer, but I could not read any signal. Why does the MCU not send any data to the Bluetooth chip?How do I set it as workable? Is there any simple example to power up this module?
**Device**: STM32F429 + L3GD20 over SPI**Toolchain**: STM32CubeIDE**Driver**: Custom L3GD20 driver (HAL SPI-based)---**Issue**:I am getting 0.00 °/s output from all three axes (X, Y, Z) continuously, even when I move the gyroscope.WHO_AM_I register returns 0xD4 correctly. SPI read/write seems to work.---**What I Tried**:- Wrote 0x0F to CTRL_REG1 (power on)- Verified all wiring (MOSI, MISO, SCLK, CS)- Read raw data registers: OUT_X_L/H, OUT_Y_L/H, OUT_Z_L/H → always zero- Sensitivity used: 0.00875 for ±250 dps---**Code**:```cif (l3gd20_init(&hspi_5, GPIOC, GPIO_PIN_1) == L3GD20_OK) {snprintf(msg, sizeof(msg), "l3gd20_initialized: who_am_i=0x%X\r\n", l3gd20_read_id());}l3gd20_read_raw(&raw_x, &raw_y, &raw_z);float ang_rate_x = raw_x * 0.00875f;float ang_rate_y = raw_y * 0.00875f;float ang_rate_z = raw_z * 0.00875f;
I am trying to send data from STM32 to the FPGA by using FSMC. My goal is to send data as fast as possible so I set FMC clock to be maximum speed and set sram clock cycles to be as low as possibe. I use FPGA internal Logic Analyzer to capture data from FSMC and the result is shown as below. I found that the data was sent one by one instead of burst mode(send data continuously) and the speed was well below requirement... I want to know how to use burst mode in FSMC?(Since I am using an FPGA to receive data so any mode is ok(PSRAM, SRAM, SDRAM, nano flash, etc))
Post edited by ST moderator to be inline with the community rules especially for sharing a code. Please read this post. I’m working on playing audio on the TAS2110 codec using the STM32U5G9J-DK1 board via SAI. I tested with generated sine and square waves, and I can hear output on the speaker. However, when I try to play audio data stored in memory, I don’t get any sound. To store the audio file, I created a .s file as shown below: .section .wav_data, "a".global _wav_data_wav_data:.incbin "C:/Work/Project/Project/audio_codec/Core/Src/wav/audio.wav".global _wav_data_end_wav_data_end: I can parse the WAV data using my parser API. Parsing works fine, and I copy the samples into a buffer, then send it to SAI via DMA. Could you please help me identify what I might be missing? Why do I not get audio output from the speaker when streaming from the WAV file? My GPDMA and SAI configurations are set up accordingly. In the linker script .wav_data : { . = ALIGN(4); _swav_data_start = .
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.