Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I am using STM32F407 with eclipse IDE. And I want to generate PWM signal using TIMER12. After all the configuration, when I call, "sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim12, &sMasterConfig) != HAL_OK) { Error_Handler(); }" inside MX_TIM12_Init(); function, the MCU just stuck and I get no print function. On debugger console I get a the following message,"Wrong parameters value: file ../../stm32f4-hal/stm32f4xx_hal_tim_ex.c on line 1636".And this line refers to the following lines of codes, " HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef *htim, TIM_MasterConfigTypeDef *sMasterConfig) { uint32_t tmpcr2; uint32_t tmpsmcr; /* Check the parameters */ assert_param(IS_TIM_MASTER_INSTANCE(htim->Instance)); assert_param(IS_TIM_TRGO_SOURCE(sMasterConfig->MasterOutputTrigger)); assert_param(IS_T
I'm working on an audio-processing application with the STM32H747I-DISCO board (MB1166-A9). While trying out how the recording works on the board, I downloaded and built the latest version 1.11.0 from: https://www.st.com/en/embedded-software/stm32cubeh7.htmlSpecifically, the code in:.\STM32Cube_FW_H7_V1.11.0\Projects\STM32H747I-DISCO\Examples\BSP\STM32CubeIDEI noticed that the LCD part requires some effort to switch to 1.11.1 version (I failed to manually add (the github one didn't provide BSP) the NT35510 library to version 1.11.0 in BSP because some linking issue), so I modified the main function to directly running the AudioRecord_demo function and deleted the last while loop in AudioRecord_demo function (so it would never be in a stop state).The main function looks simply like this: while (1){if(ButtonState == 1){ BSP_examples[6].DemoFunc();}}I have verified that the speaker is working with the AudioPlay_demo, but the recording is not. I used the debug
My program, linked with Paho SDK C library, works fine connecting to a UNIX-hosted Mosquitto MQTT Broker. The required SSL/TLS connection involved self-signed certificate generation. Those same client certificate sets work with "MQTT Explorer" and MQTT-spy. The 3 required certificates in each client-set are:Server Certificate (CA),Client Certificate, andClient Keythey are generated using OpenSSL from the terminal and are all in PEM (text) x509 format and constitute the minimum certificate info. that must be built-in and handled by each client. The program I'm developing talks to my Mosquitto Broker configured with:listener 8883cafile ...path to.../ca.crtcertfile ...path to.../broker.crtkeyfile ...path.../broker.keyrequire_certificate trueuse_identity_as_username trueQuite straight forward with Paho SDK. Clients connected - All working great!I need to get this client program working on an STM32 board. I have ST.com MQTT example code running against mosquitto.org's test broker. I impleme
I hope I have put this in the right forum. Will move it if not!I have a finished product so all peripherals are already selected and configured. I need to increase the max motor speed by 10%.It is a STM32F0 with single FOC and a matched BLDC.I don't have an ST-Link, but I do have a proprietary tool to flash the board with the required 64KB .bin file. This tool can't read back anything from the MCU.As some background, an earlier iteration of the product used the same family of MCU and had three available .bin files. We could flash one or the other onto the MCU to change the max speed. Let's call those A090.bin, A100.bin and A110.bin, where A110 would increase the motor max speed by 10% compared with A100, and A090.bin would decrease the motor max speed by 10%.For my current iteration of the product, I have just one .bin file, let's call it B100.bin - I need to change parameters in the bin file to make my own B110.bin (I don't need to decrease max motor speed, i.e I don't need a B090.bin
Hi, I am working on a project using the STM32H730 with the M24C64 I2C EEPROM chip. In my project I am using the HAL_I2C_Mem_Write functions to load and save values from the EEPROM. I'm running into an issue where the wrong value gets read if there are sequential calls to HAL_I2C_Mem_Write or HAL_I2C_Mem_Read functions. I already have a short delay of 1ms after the reads and writes, but it seems longer is necessary, more in the realm of 10ms, which is a major drag on performance. I discovered this when debugging because I do not get read/write errors when stepping through slowly with a debugger, as this adds a time delay between the I2C functions being called. Here are my I2C read / write functions:/*** @brief Erases the entire i2c_eeprom memory*/void persistent_memory_i2c_eeprom::erase_all(void) {clear_block(0, mem_size);} /*** @brief Writes a byte to i2c_eeprom memory*/void persistent_memory_i2c_eeprom::write_val(uint32_t offset, uint8_t val) {HAL_StatusTypeDe
Hello,I am trying to evaluate the DRP USB C solution ST has to offer.I have available to me a NUCLEO-G0B1RE and an X-NUCLEO-DRP1M1.I understand that the code written in the DRP1M1_DRP example was written for the NUCLEO-G071RB, but I cannot find any reason this code wouldn't run on the NUCLEO-G0B1RE. Pinouts seem fine, Capabilities seem fine, and the readme.md file in this example says it should work on STM32G0XX devices.However, when I debug this code on the board it enters a hard fault loop while trying to run MX_USBPD_Init(). Digging further down, it seems as though it fails to validate that the GUI area hasnt been corrupted. Specifically, at line 80 in "bsp_gui.c":if ((0xFFFFFFFFu != *((uint32_t *)_addr)) && (MagicNumber != *((uint64_t *)_addr)))The call stack looks like this:Are there things I need to adjust to get this code working on the NUCLEO-G0B1RE rather than the NUCLEO-G071RB?Thanks,Nate
Hi,I am trying to communicate between 2 Nucleo boards(Nucleo-F446RE) using I2C in interrupt mode,when I am sending data from master to slave in Interrupt mode it works fineBut when I try to send the data back from slave to master, it fails and while debugging the Slave it shows HAL_BUSY.Its been several days but the problem has not been solved since, I would really appreciate your help in this issueI'm using:Cube MX version 4.1.0.0STM Cube ide version 1.11.2 In Master device program I've defined the following in the while loop:if(HAL_GPIO_ReadPin (GPIOC, GPIO_PIN_13) == GPIO_PIN_RESET) { Dummy_var++; while(HAL_GPIO_ReadPin (GPIOC, GPIO_PIN_13) == GPIO_PIN_RESET) { for(int i=0; i< RxSIZE; i++){ TxData[i] = i+Dummy_var;&nbs
Hi, I have an STM32F411RE master device connected to a slave STM32F411RE device via a UART connection. I need to update the firmware of the slave device using a UART bootloader. How can I initiate the bootloader mode on the slave device, and what protocol should I follow to transmit the new binary code to the slave device? Are there any examples available that I can use to get started?
Hey. I am trying to develop a web page about the NUCLEO-H723ZG, the MCU is STM32H723ZGI want to develop a product that can be connected to the network. I want to be able to connect to my product with website on the browser and use it to control the product, like some electronic equipment like Oscilloscope, spectrum analyzer, routers, etc.I succeeded to create a simple web page on my development board,NUCLEO-H723ZG, but I want to develop a more complex web page but I have a memory problem. Not enough memory. I would like to hear and understand what is the best solution I can do. I will have to add external memory but it is not clear to me if I need for example an SD card or add big Flash.I would appreciate your help
Hi team,We have selected Trust zone MCU STM32U585ZIT6Q (U5 series) for our project.We are using with Trust zone enable in our project with AZURE RTOS. 1: without Thread x STL Lib working . 2: with Thread x STL lib failed for CPU TM7 function . PSP ,MSP how to activate privilleged mode in CPU TM7. thank you
Hi All,I have recently joined a new company and I currently responsible for the Firmware design on a new product that has been externally advised that it should be rated as Class C, with regards the following standards (IEC-60730 and IEC-60335). The main and only processor on the Safety Board in question is an STM32G0C1.Being new to this level of code complexity, where Class C as far as I can see and correct me if I am wrong is basically equivalent to the SIL - 3 standard. My main goal is to try and achieve compliance with the existing one processor design.At the moment from my research ST can provide me with Class B safety libraries, but I was hoping to fill in the gaps, with a mixture of hardware and software elements. I am aware that the STM32G0 series has ECC protected Flash, so that is a plus, along with hardware CRC for memory integrity and dual watchdogs etc.However I am currently unsure how I can comply with the address decoding section, which means testing the instruction set,
I have came across the Library package X-Cube-ClassB which certifies household electronics appliance Class B. I couldn't find anything for class C. Is ST working on developing a Class C library? If so, Can I get a roadmap? If not, can I get support for class C certification?
I'm working with the discovery board stm32H750B .I've created a basic CubeMX project with just LWIP enabled with LAN and unable to ping the board. I'm using version stm32cubidie1.13.1, stm32cubeMX 6.9.1. I have done the configurations. "MX_LWIP_Process();" in while loop shows no error I've set a static IP address, on both the sides. It shows host unreachable. I have tried many things. I am new with the ethernet can anyone please help me.
I am working on NUCLEO-U575ZI-Q. The code is generated with STM32CubeMX (using STM32CubeIDE) and the application uses ThreadX, which was added to the project using CubeMX.When a thread call any function that would lead to a suspension of the thread, the function _get_ipsr() (file Middlewares\ST\threadx\ports\cortex_m33\gnu\inc\tx_port.h) is called and it directly triggers a Hard_Fault.The error would trigger 100% of the time with some source code, and never with some other source code. I am having this error for a while. I thought I found the solution before, but I was wrong and it was all just luck.According to this link:How to debug a HardFault on an ARM Cortex-M MCU | Interrupt (memfault.com)There is a usage fault with the flag "UNALIGNED" raised. However please note that last time I had trouble with _get_ipsr(), the only flag set to 1 was in the "reserved" field of the usage fault register.I still working on the issue but I am having trouble finding a solution. Do you have an
Hello. I am getting fault error or uart_waitonflaguntiltimeout error when receiving data from UART via DMA on STM32F4 series microcontrollers when the power of the device on the other side is turned off. What could be the reason for this? What should I do to solve it? Thank you.
Hi!I'm using a custom PCB with STM32F767 on it with LAN8742a for Ethernet communication.Just to mention, I'm totally new to Ethernet topics.I have already search for an very simple example on how to just test the connection from the STM to LAN8742a (RMII) and to the PC via Ethernet cable.Is it possible to just use the CubeIDE with the Ethernet driver but not to use and LwIP or RTOS for a simple test (ping)?Or do I need to use the above mentioned components in order to just "see" if the HW is alive? Where to start the work? Are there any simple examples/app notes on that?Like I wrote it is just for a basic HW test. Nothing more.Thank you for any hints!Regards,Gregor
To whom it may concern:We are currently developing a wearable devices, which is running on a STM32L031. In Bootloader mode, while I am trying to write data to vaild RAM address(0x20001F00), it returns NACK. Every step is followed instruction, but it just won't work on STM32L031 platform. Then I ran the same code try to write STM32H750 address and success(write to 0x20004108). I think I can't solve this on my own, Please help. :crying_face:I've attached a logic analyzer photo includes UART data, first line is host side, second one is device side.(See attachments)By the way( Another question), I have two identical MCU(let's call master and slave) which connected with UART, I want to copy master's firmware to slave through UART bootloader. The hardware connection is correct and the bootloader can be entered. In this write process, on every stage slave returns ACK, but after reboot the code doesn't run. Then I dumped slave's hex file by SWD and compared with master's o
Hello Everyone,I have STM32MP157F-DK2 board has an ARM Cortex-M4 chip that supports a frequency range of approx 209MHz. It takes about minimum 3.02 microseconds (Attached Screenshot) to achieve 40 clock pulses on this board. I also tried the STM32 Nucleo-144 MCU Development Board, which has the same frequency range. Using the mbed software, I was able to get 40 clock pulses in about 2.2 microseconds.I'm not sure why there's such a difference in speed between these two setups when they have the same frequency range. I'm using STM32CubeIDE for the STM32MP157F-DK2 board and mbed software for the STM32 Nucleo board.Your help on this matter would be greatly appreciated. Thanks and RegardsKundan Jha
Hello everyone,I am doing project that is based on a B-L072Z-LRWAN1 core that has a couple of sensors connected to it. One of them is an ADC sensor that measures the humidity of the ground.My problem is that I would like to send the data from an external sensor via LoRaWAN to TTN. In support they helped me with the existing example (I-CUBE-LRWAN) and told me that I could modify this code to do it.The example project don't have an .ioc file.what are the possible solutions to do this Best regards, and thanks a million.
Hi All, We ran the example application code on our board with STM32U575VIT6Q and the USB CDC is not enumerating,whereas USB DFU mode is working when we trigger the boot0 button while powering on or resetting the devicehttps://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/NUCLEO-U575ZI-Q/Applications/USBX/Ux_Device_CDC_ACMNote: Code is executing without any errors, but still it is not enumerating on the PCB.Any idea what could be the reason?
When I try to add USB_OTG_FS (host only) to a project which uses FreeRTOS the code locks up on initialisation of USB_OTG_FS. When USB OTG FS is added, a call to "MX_USB_OTG_FS_HCD_Init" is added to "main" function. It goes before a call to "osKernelStart()". During initialisation HAL_Delay is called, and the code locks up on that.The path looks like this: MX_USB_OTG_FS_HCD_Init >> HAL_HCD_Init >> USB_SetCurrentMode >> HAL_Delay(1U)And that is where it locks up.If I comment out the call to "MX_USB_OTG_FS_HCD_Init" the rest works fine. If I put "HAL_Delay" in one of FreeRTOS threads, that works as expected (presumably due to OS being fully functional by that point). If I put "HAL_Delay" just before a call to "osKernelStart()" - it locks up.It seems that HAL_Delay cannot be called before the call to osKernelStart, and the auto-generated code for initialisation of USB is doing exactly that.Is it a bug or I am missing something? What would you recommend?
Hi,Currently, I am working on a project where we need to transfer data from PC to uC (STM32L4 series) at a high rate (real-time application). So, we have decided to use USB 2.0. First, we tried the communication device class, but it wasn't fast enough. So, now we are trying using the audio device class (also because of synchronization). I am using STM32CubeMX to initialize the discovery kit with STM32L4R9AI as a USB device with audio device class. I have generated the code, made no changes to it, and simply flashed the code and connected the USB in the hope that it will be recognized as an audio device (I have shared the *code as a zip file). But in device manager, it is always shown as a virtual COM port. I can't understand if it is a driver problem on the PC side or if the error lies on the uC side. I have tried uninstalling the device in device manager and again plugging in. But nothing works. I am also finding difficulties in with the documentation(couldn't find proper documentatio
I use STM32H745xi discovery board. When i do some test, i download code that Cortex-m7 will enter standby mode after power on 3 seconds. And i set wrong wakeup pin(wakeup pin 1&not config PA0, it should be wakeu4). After power off and power on, i find that it can't recognize the mcu through ST-LINK though i try RST pin. I dont understand why RST pin not work.Pls help to save the board,thx. code: MX_GPIO_Init();HAL_Delay(3000);HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);while (1){HAL_PWR_EnterSTANDBYMode();HAL_GPIO_TogglePin(GPIOJ,4);HAL_Delay(500);}
Hello,I'm currently working on an STM32WB55VCQ7 microcontroller using Visual Studio GDB. My project involves implementing a bootloader for over-the-air updates via BLE. I've made some progress by successfully flashing the example application located at 'Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_Ota.' The application works as expected, allowing me to use the ST BLE sensor app to update the microcontroller with a new image.However, I've encountered an issue related to code optimization. The application only functions correctly when optimization is enabled. As soon as I disable optimization, the program enters a hard fault loop (HardFault_Handler) when attempting to erase sectors with FD_EraseSingleSector().In order to make custom adjustments and facilitate debugging using GDB, I need to disable optimization. Could you please provide guidance on the necessary adjustments or steps needed to ensure the application works reliably even with optimization turned off?Thank you for
Hello to all. I am new to the STM32WL series and have been trying to implement the STOP2 mode and STANDBY mode (both with RTC enabled) for STM32WLE5JC, but have not been able to achieve the low current consumption that is expected of it. The datasheet shows current consumption of 1uA and 0.4uA respectively for STOP2 and STANDBY Modes respectively (with RTC enabled; VDD= 3V) , but mine has only been able to come down to 450uA for both modes, which is not even close to the datasheet.I have implemented STOP2 from the code provided in the following link:https://github.com/androbi-com/STM32WLE5JC-Blinky-StopMode int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN Sy
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.