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 have a question about the usage of the Cache in a Bootloader for the STM32H730I am using:STM32H7external Flash connected to over OCTOSPI in QSPI ModeCMISIS version V5.0.8I first run a Bootloader that initialized the OCTOSPI/QSPI and then loads the Application from Flash and jumps to the ApplicationI have based my Code on the example for the STMH735G-DK which comes with STM32CubeMX in the Folder "C:\Users\<Username>\STM32Cube\Repository\STM32Cube_FW_H7_V1.9.0\Projects\STM32H750B-DK\Templates\ExtMem_Boot\Src "I am using Code generated by CubeMX and the following USER CODE:int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* Enable I-Cache---------------------------------------------------------*/ SCB_EnableICache(); /* Enable D-Cache---------------------------------------------------------*/ SCB_EnableDCache(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash i
STM32CubeIDE v.1.15.1Currently on the official STM32F4 MCU package site there is a patch 1.28.1 to download which should include some fixes for ethernet issues (I hope those are fixes for issues I have) but this version is not availablie through Embedded Software Packages Manager (I did refreshed the list). I can download zip file from STM32CubeF4 - STM32Cube MCU Package for STM32F4 series (HAL, Low-Layer APIs and CMSIS, USB, TCP/IP, File system, RTOS, Graphic - and examples running on ST boards) - STMicroelectronicsbut I can't import it using "From local..." What's current status of 1.28.1 package? I'm currently using 1.27.1 version, is there any reasonable way to update to newer package or do I have to generate a new project?
Dear Members,We are using STM32L4P5VGT, with USB (supports OTG). The said product has a USD card with an SDIO interface to store the sensor data. The USB is planned to be used following purposes.1. CDC for Laptop serial communication to send real-time sensor data in office climate.2. MSC (upload the stored data on the USD card to the Laptop, ie stored data in the field and dump in the office). I know, that it can be done using CDC also, using command and reply base mechanism. Already been used in one of the products, using the STM32L1 series processor.3. Support for Pen Drive - To dump the data from the USD card to the External Pen Drive in the field.I have used CDC for serial communication and USD data dump using command and response mechanisms. Similarly, I have worked on real-time data streaming using a USB device/CDC class and a Pen Drive with a USB Host. Never worked on OTG mode.I need advice from you, who has already done or is aware of the best solution.Is it only OTG solution f
In startup_stm32f411xe.s, the FPU seems to be incorrectly declared. It is: .fpu softvfpShouldn't it be: .fpu fpv4-sp-d16I checked other files in the same family and they also have the softvfp declaration.
I'm working on a project that involves using FATFS and I was curious if I had to use the specified anti-tamp pin that gets shown. I declare other input GPIO, but only PC13 shows up as PC13-ANTI_TAMP
Hello,We've recently got our hands on 2TB SD Cards and discovered limitations with the FileX library provided through Cube. When mounting systems with exFAT using the provided FileX library, the bitmap is initialized by opening the volume and then calling _fx_utility_exFAT_bitmap_initialize within the _fx_media_open function. However, _fx_utility_exFAT_bitmap_initialize takes a significant amount of time for a large SD card since it checks all the cluster states (15,000,000+ on a 2TB card!). As a reference, a 10MHz clock for an SDIO peripheral takes 10+ minutes to initialize the bitmap. Azure has given the reigns of FileX over to Eclipse ThreadX and archived the original repo so an issue can't be opened there. Given the licensing issues with exFAT, the exFAT-specific code generated from Cube doesn't exist within the newer Eclipse ThreadX FileX repo and isn't found on any official GitHub repo that I could find. After reading the exFAT s
I have a STM32U5G9 based board. I use 2 ADCs, ADC1 and ADC2 in independent mode. I need to measure changing voltages with a lot digital noise filtering. I achieve this by setting ADC to sample the signal to a memory buffer via DMA, then averaging the noise, and if the average shows significant difference from the previous run - a notification is sent to the program to react. The basic idea is simple - read data from ADC continuously, so - I used circular buffer. After fixing the last HAL package issue with removed `HAL_PWREx_EnableVddA()` call (I added the call, it's necessary for the ADC to work), I managed to have my setup up and running. However, the problem starts when I stop the conversion, and then want to start it up again. So: `HAL_ADC_Start_DMA` call - passes with `HAL_OK`. `HAL_ADC_Stop_DMA` call - passes with `HAL_OK`. But then again `HAL_ADC_Start_DMA` call - fails with `HAL_ERROR`, and as I figured out, internally `ADC_Enable` function fails with a ti
Hello Everyone,I'm new to USB peripheral. I have STM32H573I-DK and trying to make Type-C work in Device CDC ACM class. I read some documents and examine example codes. After all this, I create a project and I can transmit data from my DK to PC but I can not see the data that I sent from PC to DK. When I debug the read thread, it looks like this SUSPENDED(ux _transfer_request_semaphore). Thread waits for some semaphore but I dont know where to put this semaphore.I dont know what I'm doing wrong, can you help me or guide me? Thanks. I attached my files, please review. Best Regards.
Hello everyone,I'm currently trying to emulate both a keyboard and the mouse as hid-devices using stm32 and the descriptor that contains two collections.The descriptor: // Keyboard 0x05, 0x01, 0x09, 0x06, // USAGE (Keyboard) 0xa1, 0x01, // COLLECTION (Application) 0x85, 0x01, // report id 1 0x05, 0x07, // USAGE_PAGE (Keyboard) 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl) 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x08, // REPORT_COUNT (8) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x01, // REPORT_COUNT (1) 0x75, 0x08, // REPORT_SIZE (8) 0x81, 0x03, // INPUT (Cnst,Var,Abs) 0x95, 0x05, // REPORT_COUNT (5) 0x75, 0x01, // REPORT_SIZE (1) 0x05, 0x08, // USAGE_PAGE (LEDs) 0x19, 0x01, // USAGE_MINIMUM (Num Lock) 0x29, 0x05, // USAGE_MAXIMUM (Kana) 0x91, 0x02, // OUTPUT (Data,Var,Abs) 0x95, 0x01, // REPORT_COUNT (1) 0x75, 0x03, // REPORT_SIZE (3) 0x91, 0x03,
Hello, I’m encountering multiple errors and warnings when trying to compile a project using the STM32F10x Standard Peripheral Library in Keil uVision. The specific errors are related to assert_param being undeclared and numerous UTF-8 warnings in comments. Environment: STM32F10x Standard Peripheral LibraryKeil uVision (Using ARM Compiler v6.21)Key Errors: call to undeclared function 'assert_param'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]invalid UTF-8 in comment [-Winvalid-utf8] in stm32f10x.hIt seems like the compiler isn't recognizing the assert_param macro, which is leading to multiple errors. I’ve ensured that the stm32f10x_conf.h file includes the necessary header files, but the issue persists. Has anyone experienced similar issues or can provide guidance on resolving these errors? Thank you!
If this question is silly or obvious, I apologize, but I'd like some guidance on understanding this.I am playing around with C++ and freeRTOS on a STM32L476RGT6, below is a code snippet that creates an object main function of my program. This object contains a task function which blinks and an LED via calling a set(bool on) member method. int main_cpp() { Led led_1(GPIO_PORT, GPIO_NUM); //case 1 (broken): allocating object application stack/main stack of program (RAM) //static Led led_2(GPIO_PORT, GPIO_NUM); //case 2 (works): allocating in .bss segment (Flash) //Led *led_3 = new Led(GPIO_PORT, GPIO_NUM) //case 3 (works): allocating on heap (RAM) vTaskStartScheduler(); return 0; } //inside Led.cpp: #include "Led.h" Led::Led(GPIO_TypeDef *gpio_port, uint16_t gpio_num): gpio_port(gpio_port), gpio_num(gpio_num){ xTaskCreate(blink_task_trampoline, "Blink Task", 255, this, 1, &task_blink_hdl); } void Led::set(bool on) { HAL_GPIO_WritePin(gpio_port, (1U &l
hello everyone i have a small pcb made by myself with an STM32f030f4p6 which will read the data from my ADC and send it to a master (Arduino) via I2C... For a start I just wanted to write a code to test the correct configuration of I2c between the two MCUs by sending a simple constant value from the STM32f030f4p6 after requesting the master ... but it does not work, I also used the examples seen online but even so they do not work. I then decided to scan with the arduino master to see if it recognises the slave connected to the line, then I find that when I compile the scanner code in the master, it identifies the address of the slave just once, but then it doesn't do it any more, returning nop device found as I defined in the scanner code on the ... does anyone have an idea why this is?these are my first steps with the stm32 microcontroller thank you for your understanding here is my code of the main.c/* USER CODE BEGIN Header */ *//* USER CODE END Header *//* Includes -----
I am looking into using the Open Bootloader to develop a FDCAN/CAN bootloader for the STM32G431RxTx MCU. Does anybody have an example for this? Or any pointers to good resources.The examples in CubeMX seem to be for an older version of Open bootloader then the one that can be found in https://github.com/STMicroelectronics/stm32-mw-openbl/tree/main and have not seen any for FDCAN/CAN at all.
Hi,I am trying to use the DTS on the STM32H5, but after i call HAL_DTS_Start_IT(&hdts), the state of the handle is stuck in HAL_DTS_STATE_BUSY, resulting in a HAL_BUSY when i am trying to get the temperature via HAL_DTS_GetTemperature(&hdts, &temperature) in the HAL_DTS_EndCallback(DTS_HandleTypeDef *hdts). I debugged through my code and the HAL library and found out that during the execution of the HAL_DTS_Start_IT(&hdts) code (see below) it jumps directly into the HAL_DTS_EndCallback(DTS_HandleTypeDef *hdts) after Line 47 and therefore never reaches Line 50, where the handle state would be set back to HAL_DTS_STATE_READY. I "fixed" this problem for now by either setting the state manually back to HAL_DTS_STATE_READY at the beginning of the HAL_DTS_EndCallback(DTS_HandleTypeDef *hdts) or commenting out the HAL_Delay(TS_TIMEOUT_MS) call in Line 47. My DTS_HandleTypeDef configuration is: DTS_HandleTypeDef hdt
I have set up a project in STM32CubeMX. I have setup both I2S1 for Receiving and I2S2 for Transmiting with DMA. After the normal initalization i start receiving from the DMA: if (HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)&output_buffer, 1) != HAL_OK) { Error_Handler(); } And the setup of the I2S are as following: void MX_I2S1_Init(void) { hi2s1.Instance = SPI1; hi2s1.Init.Mode = I2S_MODE_MASTER_RX; hi2s1.Init.Standard = I2S_STANDARD_PHILIPS; hi2s1.Init.DataFormat = I2S_DATAFORMAT_32B; hi2s1.Init.MCLKOutput = I2S_MCLKOUTPUT_ENABLE; hi2s1.Init.AudioFreq = I2S_AUDIOFREQ_48K; hi2s1.Init.CPOL = I2S_CPOL_LOW; hi2s1.Init.FirstBit = I2S_FIRSTBIT_MSB; hi2s1.Init.WSInversion = I2S_WS_INVERSION_DISABLE; hi2s1.Init.Data24BitAlignment = I2S_DATA_24BIT_ALIGNMENT_LEFT; hi2s1.Init.MasterKeepIOState = I2S_MASTER_KEEP_IO_STATE_ENABLE; if (HAL_I2S_Init(&hi2s1) != HAL_OK) { Error_Handler(); } } void MX_I2S2_Init(void
Hello,I just started my experience with STM32 MCUs with a NUCLEO-F767ZI board. I tried to utilize the Ethernet Port of the Nucleo Board. I created a small test Firmware to get known to LWIP and FREERTOS, since i want to use both in my later Firmware. DHCP and IP Address allocation now finally works and I am able to ping the device. I use the automatically created thread to blink the led. The problem is that the device stops after some time to answer to the pings. Also the LED stops blinking. In debugger something is happening, but it doesnt seem like the thread function is called anymore. Even if I dont ping the device it stops after some time blinking. Only if I disconnect the cable it runs like charm.I have uploaded my whole code to github, maybe somebody can tell me where my problem is. Also, is ther a way to debug the FREERTOS with the STM32CubeIDE?Help is very appreciated.Thanks https://github.com/darkmaterial/Nucleo-FZ767ZI_Ethernet_Test
Configuration:Stm32F767zi board is connected to laptop via LAN connection and no other network is connected.Step1: The IP address , netmask and gateway are same from the ipconfigStep2: Then I have configured the Cubemx based on itcubemx config Issue:I have configured the LwIP stack and is calling MX_LWIP_Process(); in the while loop, which is sufficient for me to get a ping back.Source code:Source code Debugger output:(It verifies that the essential function is being executed)Debugger output Cmd output for Ping: (The response to ping is from a different IP address, and why is that?) Is everything correct in this scenario? Or is there something essential,that I am missing here.I am following the feedback from this question post from myself.https://community.st.com/t5/stm32-mcus-boards-and-hardware/stm32f767zi-nucelo-ethernet-hardware-setup-can-we-use-our-laptop/m-p/576027#M14298And I am attaching a file that I have referred along below. @LCE&nb
Hi,a bit of a basic question... for years I used PIC micros so I was very familiar with their manuals, register and bit naming etc.But being new to STM32 I found it difficult to figure out an easy way to find the naming of registers and bits inside register (without having to read tens of pages every time)? Both in the reference manual (RM0394) and also the related HAL function? So for example, what is a quick and simple way to find the register name and description for things like changing the polarity PWM CH1 CHN polarity as highlighted in the screenshot below (or any other register and register bit)? Thank you as always.
The hardware for my project is an Arduino Opta, which utilizes the STM32H747XI dual core processor. We are trying to implement a watchdog timer for our application because the OS occasionally crashes. The start and kick timer functionality works without a problem. However, we are having trouble stopping the timer. We need to stop the timer during over-the-air "OTA" updates because it is a long running process.If I am understanding the datasheet correctly, it appears that stopping the timer is only available in debug mode. Please confirm.If stopping the timer is not an option, how would you recommend we tackle this problem? Is it possible to do the OTA update on the second core while the timer is running along with the main application on the first? Thanks in advance for your help. I've spent a lot of time trying to solve this problem.Regards, Mark
HIGot an I2C device connected to my p nucleo wb 55 board. currently no luck communicating.I've been instructed to to use a repeated start condition in I2C https://www.i2c-bus.org/repeated-start-condition/Not sure if my current HAL functions work for an I2C repeated start condition device? they are :HAL_I2C_Mem_Write XXXHAL_I2C_Master_Transmit XXX Any other example I can use ? need to achieve this : S startR restart THNAKS
HAI , I have STM32L496ZGP nucleo 144 board, I want port threadx on that. I gone through some youtube video , in that in middleware and software packs option they told to select threadx , but in my STM32cubeIDE , threadx option is not there. Only FREERTOS option is there. So how to add threadx to that. Can you share me some documents/links to do threadx on above board from scratch. Thanku
Hello all,it seems that when starting a timer in PWM mode, using TIM_CHANNEL_ALL does not work. Everything works fine as long as I start the channels consecutively, (i.e. TIM_CHANNEL_1, then TIM_CHANNEL_2, etc.) but as soon as I change this to TIM_CHANNEL_ALL, the PWM output stops working. Has anyone else encountered this problem yet or am I doing something wrong?regardsHerby
Hello ST Community,I'm working on implementing C++ exceptions in my project. My setup includes an STM32H735 board and I'm using FreeRTOS. Here’s a snippet of my code that involves try and catch blocks: extern "C" void myTaskFunction(void* pvParameters) noexcept { try { //throw exp seems work fine with debug } catch (const std::exception& e) { // print something that I cant see in console } // HARDFAULT } From my research, it seems that I need to disable the --specs=nano.specs option.However, in the IDE, under Runtime library options, I have the following choices: Standard C, Standard C++Standard C, Reduced C++ (--specs=standard_c_nano_cpp.specs)Reduced C, Standard C++ (--specs=nano_c_standard_cpp.specs)Reduced C, Reduced C++ (--specs=nano.specs)With the first option, the compilation fails because it can't find the asserts. I'm currently using the third option, but I encounter a hard fault when exiting the catch block.I
Hi,I am using a STM32L452RET6. How do I generate spread spectrum PWM on that particular micro?I read somewhere it has a dedicated mode but did not find where.Is there perhaps a library specifically for it?If it does not have a dedicated mode or peripheral for spread-spectrum, how do I generate it in other ways using the standard PWM channels?Thank you :)
I want to read ADC values from 2 joystick. My aim is design a controller RC. I use stm32f103 and set up ADC1 with channel 0,1,2,3. I used interrupt but it read only one channel. Can you help me how to read 4 channel?Thank you!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.