Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi, I've installed TouchGFX designer 4.26.0 on my laptop and i see a difference in behaviour to the previous versions.The problem is that we want to update our IAR project ewp file as we change or add new items in our designer. However we have issues when we do. At the moment our designer makes the following change<option> <name>IlinkAdditionalLibs</name> <state>$PROJ_DIR$\psi_board_lib.a</state> <state>$PROJ_DIR$/../../lib/touchGFX/touchgfx/lib/core/cortex_m7/IAR9.x/touchgfx_core.a</state> </option>changes to <option> <name>IlinkAdditionalLibs</name> <state>$PROJ_DIR$\psi_board_lib.a</state> <state>$PROJ_DIR$/../../touchgfx/touchgfx/lib/core/cortex_m7/IAR9.x/touchgfx_core.a</state> </option>That would not be a problem if the new folder "$PROJ_DIR$/../../touchgfx/touchgfx/lib/core/" was not empty after every build.I've tried to set the files back into that folder but every tou
TFT-LCD driver:void touchgfxDisplayDriverTransmitBlock(const uint8_t* pixels, uint16_t x, uint16_t y, uint16_t w, uint16_t h) { static uint16_t old_x0=0xFFFF, old_x1=0xFFFF, old_y0=0xFFFF, old_y1=0xFFFF; IsTransmittingBlock_ = 1; uint16_t x1 = x + w - 1; uint16_t y1 = y + h - 1; // Set columns, if changed if (x != old_x0 || x1 != old_x1) { parameter[0] = (x >> 8) & 0xFF; parameter[1] = x & 0xFF; parameter[2] = (x1 >> 8) & 0xFF; parameter[3] = x1 & 0xFF; send_cmd(DCS_SET_COLUMN_ADDRESS, parameter, 4); old_x0 = x; old_x1 = x1; } // Set rows, if changed if (y != old_y0 || y1 != old_y1) { parameter[0] = (y >> 8) & 0xFF; parameter[1] = y & 0xFF; parameter[2] = (y1 >> 8) & 0xFF; parameter[3] = y1 & 0xFF; send_cmd(DCS_SET_PAGE_ADDRESS, parameter, 4); old_y0 = y; old_y1 = y1; } send_cmd(DCS_WRITE_MEMORY_START, NULL, 0); send_data((uint16_t*)pixels, w * h); } int touchgfxDisplayDriverTransmitActive(void)
Post Edited by ST moderator to apply source code formatting to comply with the community rule: I wonder if any one can help me.The rtc Cal freq produced by the init code below produces on 490Hz. The RTC clock is loosing about 55 sec in 20 minutes.Is there a way to increase this freq without replacing the crystal? static void MX_RTC_Init(void) { /* USER CODE BEGIN RTC_Init 0 */ /* USER CODE END RTC_Init 0 */ RTC_TimeTypeDef sTime = {0}; RTC_DateTypeDef sDate = {0}; /* USER CODE BEGIN RTC_Init 1 */ /* USER CODE END RTC_Init 1 */ /** Initialize RTC Only */ hrtc.Instance = RTC; hrtc.Init.HourFormat = RTC_HOURFORMAT_24; hrtc.Init.AsynchPrediv = 127; hrtc.Init.SynchPrediv = 255; hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; if (HAL_RTC_Init(&hrtc) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN Check_RTC_BKUP */ /* USER CODE END Check_
Hi,I am using Nucleo-L476RG. My I want to send data over SPI every 20000ms and during this 20000ms MCU will goes in sleep/standby mode. I want to keep track time of last 2 SPI data transmission.But the issue is HAL_GetTick() reset after waking up from standby mode. so not able to track the time between last two data transfer.
Hello I'm working with the STM32N6570-DK board to capture images using the IMX335. I want to save 480x800 images from PIPE1 of DCMIPP to External RAM. I've tried searching for examples on the STMicroelectronics Github, but most examples save to AXISRAM. Does anyone have simple example code or steps for doing this? Do i need to config xSPI first? or do i need to put something into ".ld" file?
Hi,I'm in charge of the motor driver for a new project we've started working on. I freshly installed MotorControl Workbench, CubeMX and the IDE. After setting all parameters in Workbench and hitting "Generate the project" button I get a Java runtime Exception "unkown protocol c". I've hit a wall trying to fix this as there's almost no info about similar issues on the web.I tried uninstalling and installing different versions, too.Using windows 11 pro, 24H2. Any suggestions what might go wrong here? I've tried installing the oracle JDK and using that instead of the openJDK runtime but I couldn't get Workbench to use it (this was the only info I could find).Thanks for any help on this!
I’m using an STM32F439VIT6 on a custom board. PA5 is used as the DAC output, and PA0/PA1 as the ADC inputs. On 1 out of 5 boards, the ADC and DAC functions stopped working, but the same pins still work correctly as GPIO.Setup (failing board)PA5: DAC → op-amp → 0–10 V outputPA0, PA1: ADC inputs from INA190A1 for 4–20 mA sensorsVDDA/VREF+ = 3.3 V (measured OK)Same firmware as working boardsPins configured in analog modeIssueDAC produces no valid analog output, always zeroADC readings are invalid or stuckGPIO input/output on the same pins worksQuestionCan the STM32F4 analog (ADC/DAC) circuitry be damaged while the GPIO still works on the same pins?How can I confirm if the ADC/DAC core is damaged (e.g., internal channels/tests)
Hi all,I am using an STM32H5 micro. I need to send out a buffer of data at regular intervals. I use TIM15 to trigger the GPDMA which sends blocks of 6 bytes to the SPI. The SPI is programmed with TSIZE=6 to get the SS output low during the transmission. I absolutely need this. The screenshot below is the result from my code.My problem is that the SPI only works ONCE. It seems to be stuck afterwards, I observe that CSTART of the SPI goes to 0. How can I get the SPI going on with TSIZE > 0 ?
Hi,I am working in steval-esc001v1. I have set the a2212-13t-1000kv bldc motor to ran at minimum of 1000 rpm and at maximum of 9924 rpm using the foc algorithm in the motor control workbench software. I have ran till the 8000 rpm. But our goal is to ran any type of motor with in the ESC's voltage rating of 3S to 6S (11 V to 22V), also Is it possible to calibrate esc by giving maximum pwm input and minimum pwm input without profiling the esc using pc software every time if the motor changes? If not possible, how does the general ESCs available in the market can do that. If anyone worked in these area, kindly assist.Thanks and Regards,Santhosh.
Hi, I would like to capture a TextArea's content and use it with TextureMapper for scaling animation and a blurry filter effect on the bitmap data.However, there is noise for the TextArea background in HW, but the simulator result is perfect. The reasons for using TextureMapper with Bitmap Data:the TextArea content will be updatedthe screen background will be updatedfilter effect function will be applied to the TextArea's contentAble to implement the scaling & fade animation How to create a Bitmap Data with Font/image's content without a noisy background?----------------------------------------------------------------------------STM32U5G9-DK Result (noise for the Background):Simulator Result (expected):----------------------------------------------------------------------------The Dynamic Bitmap creation (Reference to advanceAnimationContainer.cpp in Text Animation Demo):TestFont1Bitmap = Bitmap::dynamicBitmapCreate(Container.getWidth(), Container.getHeight(), Bitmap
STM32F4 is working in USB Device MSC mode successfully.I need to detect the USB connection state. I put the HAL_PCD_ConnectCallback function in main.c but on compiling I received warning.Debug/../USB_DEVICE/Target/usbd_conf.c:307: multiple definition of `HAL_PCD_ConnectCallback';I see it is weak in HAL_PCB_IRQHandler. Please suggest what I am missing.
Is there a build tool to insert two .hex files into my final image? I am retroactively updating an existing firmware by moving a bootloader I've created from an unused place in the updated image into its proper sector. But to do this, I need to insert the bootloader into the image I am updating with. (Update image contains existing code + boot image1 + boot image2) My main update image will be contained in sector 0 - 5. My first separately built bootloader.hex file must be squeezed into sector 6, and my second separately build bootloader2.hex must be squeezed into sector 7. I have found it is possible to use the linker file to insert raw hexadecimal bytes, but this requires converting the .hex file to an ascii hex array, copying it over and then building. Is there a command line build tool alternative to do this cleanly?
Hello,I want to learn that whether it is possible for a permanent magnet BLDC motor to track a specific torque value using field oriented control (FOC) SDK of STM?Best, Erdem
Hello, i am trying to store adc calibration data in flash on my H7A3 project.Writing the data (64byte, flash addr 16byte aligned) is successful (at least i hope, since i get no errors), but when reading the same data back from flash via that same Bank2 memory address, i only read zeroes.I was trying to use a same approach like the example program.Can somebody review my code and point me in the right direction?#include "stm32h7xx_hal.h" #include "stm32h7xx_hal_flash.h" #include "string.h" #include <stdint.h> #include "settings.h" #define FLASH_USER_START_ADDR FLASH_BANK2_BASE /* Start @ of user Flash area in Bank2 */ #define FLASH_USER_END_ADDR (FLASH_BANK2_BASE + FLASH_BANK_SIZE - 1) /* End @ of user Flash area in Bank2 */ // get flash sector number from address uint32_t GetSector(uint32_t Address) { uint32_t sector = 0; if (Address < (FLASH_BANK2_BASE + FLASH_BANK_SIZE)) { sector = (Address - FLASH_BANK2_BASE) / FLASH_SECTOR_SIZE; } else { sector = (Address - (FLASH_
Hello...I wish to setup ADC oversampler but seems that i really dont understand if its capable to do what i want. this is what i wish to got: ADC triggeredSample adc0, 1 of 4 in oversamplerSample adc1, 1 of 4 in oversamplerADC triggeredSample adc0, 2 of 4 in oversamplerSample adc1, 2 of 4 in oversamplerADC triggeredSample adc0, 3 of 4 in oversamplerSample adc1, 3 of 4 in oversamplerADC triggeredSample adc0, 4 of 4 in oversampler -> result to dmaSample adc1, 4 of 4 in oversampler -> result to dmanext loop:ADC triggeredSample adc0, 1 of 4 in oversamplerSample adc1, 1 of 4 in oversamplerADC triggeredSample adc0, 2 of 4 in oversamplerSample adc1, 2 of 4 in oversamplerADC triggeredSample adc0, 3 of 4 in oversamplerSample adc1, 3 of 4 in oversamplerADC triggeredSample adc0, 4 of 4 in oversampler -> result to dmaSample adc1, 4 of 4 in oversampler -> result to dmaBut whatever i try i fail. There is no clear statement if oversampler does that per adc channel, or it need to be l
Hello, I'm trying to run SDRAM (AS4C4M16SA-5TCN) with FMC. It looks like all connections are correct. When I try to read/write to memory pointer, I got memory management fault handler.My FMC configuration:Clock connected to FMC is 275MHz (HCLK3). I've tried also to lower it to ~30MHz, but it didn't help.Under "USER CODE BEGIN 2" I'm executing FMC_Init() function. This is it:I tried to write something to memory, but this is the moment when fault handler is activated:*(__IO uint8_t*) (SDRAM_START_ADDR) = 0x00;SDRAM_START_ADDR is defined as 0xC0000000.All FMC's GPIOs are set to Very High speed. What else can I check?@Tesla DeLorean maybe you could help, please?
Hi everyone,I’m trying to design my first PCB using STM32F103 and I’m still a beginner.I see that the PAx pins (PA0–PA15) have multiple alternate functions like GPIO, ADC, USART, SPI, etc.I’m a bit confused about how to properly choose which PA pins to use for my peripherals.If I use PA9/PA10 for USART, can I still use them as normal GPIO later?What is functionality of PAx pins ?I'm using STM32F103C8T6stm32f103c8 datasheet stm32f103c8t6 I'd really appreciate some guidance before I finalize my board layout.Thanks! Best Regards !
Hi everyone, I'm having trouble jumping to the app from the bootloader.The application is located here, writing doesn't give me errors. So I assume the problem is Jump.#define FLASH_USER_START_ADDR ADDR_FLASH_SECTOR_2_BANK1 Il main del bootloader è costituito così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 SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_QUADSPI_Init(); MX_SPI4_Init(); MX_I2C1_Init(); MX_RTC_Init(); MX_FMC_Init(); MX_USART6_UART_Init(); /* USER CODE BEGIN 2 */ HAL_GPIO_WritePin(ENABLE_3v3_WIFIPRINTER_uC_GPIO_Port, ENABLE_3v3_WIFIPRINTER_uC_Pin, GPIO_PIN_SET); printf("\
Hi ST Support Team,I'm developing a simple FSBL application (LED control) on a NUCLEO-N657X0-Q board to understand the boot management flow with FSBL and application separation.What I've done:Successfully tested the application running directly from RAM via debuggerCompiled the FSBL for external XSPI flash (linker configured for execution from AXISRAM2 at 0x34180400)Signed the binary using STM32_SigningTool_CLI with header v2.3, -nk flag (no keys), -of 0x00000000, and correct load address/entry pointProgrammed the signed binary to external flash at 0x70000000 using STM32CubeProgrammer with the appropriate external loaderConfigured BOOT0=LOW, BOOT1=LOW for boot from XSPI flashThe problem: The Boot ROM does not load the FSBL into RAM. When I read AXISRAM2 (0x34180000) after reset, it contains all zeros, indicating the Boot ROM is rejecting or not attempting to load the FSBL.What I discovered: In STM32CubeProgrammer → OTP MPU tab, I see:BSEC State: SecuredGlobal State: 0x00000001Additiona
Hello ST Community Team, We are currently working with the STM32N657X0H3Q1 device and using an external DRAM – S80KS5123GABHB020 (512 Mbit) connected via the XSPI interface. We have successfully configured XSPI and external memory initialization (using CubeMX / HAL), and the external memory is intended to be used for TouchGFX frame buffers and application data. However, we would like clarification on the following points: What is the correct memory-mapped base address that should be used for the S80KS5123GABHB020 DSRAM on STM32N657X0H3Q1 ? Is the memory accessed through the XSPI1 memory-mapped region, and what is the exact address range? Are there any STM32N6-specific constraints or alignment requirements when using large external DSRAM (512 Mbit) for TouchGFX or heap allocation? Is there any reference example or application note available for STM32N657 with external PSRAM configuration? Currently, we are unsure at which address we should read/write the external DRAM, a
Hi all!I have been working on the stm32h750b board and when i tried to flash a sample example project named TouchGFX for STM32H750B-DK board with external loader MT25TL01G_STM32H750B-DISCO.stldr in the debug session. I'm experiencing these.1. the IDE goes not responding 2. after some time it says download verified successfully.3. But the screen is white, and the board is in reset condition till i press the reset button. Please help me with how to proceed further. I need to make the GUI program TouchGFX be seen on the board. The example code was from the example selector in the stm32cubeIDE named TouchGFX@STea Regards,Siva
Hello,I'm encountering a problem with the STM32G0B0 (also applicable to the STM32G0B1RE) when using flash memory in single bank mode.My application requires single bank mode, but when I use the erase function to erase pages (from both bank 1 and bank 2), it erases the wrong page.using the "FLASH_EraseProgram" example provided on the STM32CubeFw with the updates below:Define bank 2 user pages address in main.h #define ADDR_FLASH_PAGE_128 ((uint32_t)0x08040000) /* Base @ of Page 128, 2 Kbytes */ #define ADDR_FLASH_PAGE_129 ((uint32_t)0x08040800) /* Base @ of Page 129, 2 Kbytes */ #define ADDR_FLASH_PAGE_130 ((uint32_t)0x08041000) /* Base @ of Page 130, 2 Kbytes */ #define ADDR_FLASH_PAGE_131 ((uint32_t)0x08041800) /* Base @ of Page 131, 2 Kbytes */ Update "FLASH_USER_START_ADDR" and "FLASH_USER_END_ADDR" #define FLASH_USER_START_ADDR ADDR_FLASH_PAGE_126 /* Start @ of user Flash area */ #define FLASH_USER_END_ADDR (ADDR_FLASH_PAGE_131 + FLASH_PAGE_SIZE - 1) /* End @ of user
Hello everybody. I'm trying to make LWIP work on NUCLEO-H723ZG board, but I can't even get a ping response so far, even with static (DHCP disabled) network configuration. The project uses FreeRTOS (CMSIS API v2) and is created with MX tool. It seems to be an ARP problem, since there is no ICMP request from my PC when I execute the ping command (checked with Wireshark). Did anyone face similar issues using an environment like this? Attached is the output generated by LWIP, as well as the project configuration file and linker script. Any help will be greatly appreciated. Thank you!
Hi,I’m working with a custom PCB based on an STM32H743BI and an external MT25TL01G memory device.To manage the data I’m using FileX + LevelX. I’m able to create the media, create directories, create files, write to them, and read them without issues. However, I’m running into a problem when trying to read files after a reset.After formatting the media with:fx_media_format(&pFileManagerDesc->fxFileMedia, fx_stm32_levelx_nor_driver, (VOID *)LX_NOR_QSPI_DRIVER_ID, (UCHAR *) mediaBuffer, sizeof(mediaBuffer), QSPI_VOLUME_NAME, QSPI_NUMBER_OF_FATS, 32, QSPI_HIDDEN_SECTORS, ((LX_STM32_QSPI_FLASH_SIZE - LX_STM32_QSPI_SECTOR_SIZE) / QSPI_SECTOR_SIZE), QSPI_SECTOR_SIZE, 8, 1, 1); I open the media and try to read from it, but I always the error FX_NO_FOUND trying to open the file.This doesn’t happen if I create a file first. I’m not sure if I’m missing a step before reading the media after formatting.I’m not performing any erase operation because I have: LX_S
Hi,I am using the steval-esc001v1 and the A2212 1000 KV BLDC Motor with the motor parameters are, The ESC input range is 1060–1860 µs. I arm the ESC at 1000 µs and then increase the input to 1062 µs, at which point the motor starts running. After startup, the RPM and current gradually increase without any change in the input signal. Within few seconds it reaches 4000 rpm (approx), then motor suddenly jerks and then settles at a minimum speed of around 1000 RPM. Sometimes, after this jerk, the motor stops completely.I would appreciate help with maintaining the motor speed at 1000 RPM after startup.Additionally, the motor turns 1 rotation during the power-up of the STEVAL-ESC001V1. Is there a way to prevent this initial turn at power-up?Best regards,Santhosh.
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.