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
Hi all, i am planning on making an adapter board to use SD cards as a storage media for ipod classics which uses IDE hard drive. I will be using stm32f407 (512kb) for the development works. And yes i looked around and there seems to be no ic currently able to accomplish thi task apart from chinese boards, and for the ipod itself we have adapters but are locked down and to me it seems a bit pricey so trying to make a open source hardware/software solution with additional features which are not available anywhere for this device. I have figured out bits and pieces (hdd uses 3.3v, and ATAPI-6/UDMA-100 protocol) for this project but i have a few questions:1) how do i go about creating a driver to translate the commands made with the ipod,2) i will be using the fatfs file system for handling data on the sd card. How would the addressing and data read/write on atapt/udma works and any info on translating this to fatfs commands and vice vera will be helpful. Even crumbs of info! ;)3) and most
Hi I am using STM32L031F6 microcontroller and trying to read data from BNO086. The HAL driver i2c code is working fine but LL driver code doens't work. I want to use LL driver for i2c. Following is my LL driver code for reading and writing. Read Function: void LL_I2C_Master_Receive(uint8_t i2cAddr, uint8_t *aReceiveBuffer, uint16_t size) { uint32_t startTime = SysTick_Get(); // Get the current SysTick value LL_I2C_HandleTransfer(I2C1, (i2cAddr<<1), LL_I2C_ADDRSLAVE_7BIT, size, LL_I2C_MODE_RELOAD, LL_I2C_GENERATE_START_READ); if(LL_I2C_GetAddressMatchCode(I2C1) == i2cAddr << 1) { /* Verify the transfer direction, a write direction, Slave enters receiver mode */ if(LL_I2C_GetTransferDirection(I2C1) == LL_I2C_DIRECTION_READ) { /* Clear ADDR flag value in ISR register */ LL_I2C_ClearFlag_ADDR(I2C1); } else { /* Clear ADDR flag value in ISR register */ LL_I2C_ClearFlag_ADDR(I2C1); } } else { /* Clear ADDR flag value in ISR register */ LL_I2C_ClearFlag_ADDR(I2C1); }
Hi, I have created a code snippet to communicate with I2C using LL API instead of HAL. The code is given below uint8_t temp[2]={0xF9,0x00}; while(LL_I2C_IsActiveFlag_BUSY(I2C1)); // Wait until the I2C bus is not busy LL_I2C_HandleTransfer(I2C1, 0x94, LL_I2C_ADDRSLAVE_7BIT, 2, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_START_WRITE); LL_mDelay(10); for (int i = 0; i < 2; i++) { while (!LL_I2C_IsActiveFlag_TXE(I2C1)); // Wait until the data register is empty if (LL_I2C_IsActiveFlag_NACK(I2C1)) { // Check for NACK (Not Acknowledged) return 1; } LL_I2C_TransmitData8(I2C1, temp[i]); // Transmit data byte LL_mDelay(10); LL_I2C_ClearFlag_TXE(I2C1); } LL_I2C_GenerateStopCondition(I2C1); LL_mDelay(10); LL_I2C_ClearFlag_STOP(I2C1); // Clear the stop flag // Reception (Rx) LL_I2C_HandleTransfer(I2C1, 0x94, LL_I2C_ADDRSLAVE_7BIT, 16, LL_I2C_MODE_AUTOEND, LL_I2C_GENERATE_START_READ); int i = 0; // Wait for the stop condition or reception of 16 bytes while
Hi!Some time ago I did a post asking for a problem i had with this board used as a USB HID Device for a Midi Keyboard project when i wanted to read the value of a potentiometer with the ADC using DMA and send it as a Control Change command.I solved the problem and i managed to send the control change command only when the knob is rotated, using only one channel and one potentiometer. (I'm also sending Note on and Note off commands with switches)The configuration i used for only one channel that works is the following:Spoiler (Highlight to read)And this is the code (please note that it has a lot to improve still, i'm just testing everything works for now, but with only one channel it's working)#include "main.h" #include "usb_device.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "usbd_hid.h" #include "struct.h" #include <stdlib.h> /* USER CODE END Includes */ /* Private typedef --------------------------
I've connected the Nucleo-H755ZI board to a GPS module (GY-GPS6MV2) via USART2 with a baud rate of 9600. The RX and TX pins are configured to PD5 and PD6, and I've enabled global interrupts to manage the incoming data. However, instead of receiving the expected NMEA sentences, I'm consistently getting a value of `-1.888836e-019`, which leads me to believe there might be an issue with the communication setup or data interpretation. Additionally, when I connected a WiFi module to the Nucleo-H755ZI using the same USART2 interface (on different occasions), the board consistently received the data `0x84`. Could you help me diagnose these issues and suggest what might be going wrong with the GPS and WiFi module connections? /** ****************************************************************************** * @file : main.c * @brief : Main program body */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h
I am not receiving the correct data from the NEO-6M GPS module when interfacing it with the Nucleo-H7 series board. Instead, I am getting a value of -1.888836e-019, which leads me to suspect that the connection with the GPS module is not properly established. Additionally, when interfacing the Nucleo board with a Wi-Fi module, it only receives 0x84 data for any that is transferred.
Hi,I am using the STM32H563 and WF18GTLAADNN0 display with SPI for interfacing and the ST7735 library from Controllerstech. However, the application is not functioning. Could you confirm if any driver initialization steps have been omitted? Hardware Circuit: Please note that the VDD_MCU for the circuit below is 3.3V. To verify SPI communication:I am using a 3-wire SPI setup. Connection:LCD_SDA = SPI4_MOSILCD_SCL = SPI4_SCKLCD_NCS, LCD_RS, LCD_Reset = GPIO_OUTPUT I am experiencing significant noise, making it difficult to read data on the SDA line. While executing the write command, the CS pin goes low. To identify the data value, I toggled the CS pin during data transfer. When I sent 0x75, I received the same value in the waveform. thanksMathan
Hello,I am trying to convert HDMI ARC audio to I2S using STM32H7 series.AFAIK, ARC uses IEC 60958 SPDIF standard, which STM32 SPDIF-RX accepts.Is this implementation possible?Connection would be likeHDMI ARC(HEAC+) -> Inverter -> STM32H7
Hi there,I'm developing my own bootloader for a stm32H755 MCU and I would like to b able to write just a single 32 bit word (or even also a single 64 bit double word) to the flash.Using standards HAL API and theHAL_FLASH_Program function, I'm able to choose only the entire flash word programming (there is only the FLASH_TYPEPROGRAM_FLASHWORD define).I discovered that in the legacy hal header (stm32_hal_legacy.h) there are also other programming types definitions...Is there any limitation/risk using programming types other than entire flash word?Thanks!iTTy
I want to control GPIO output using DMA and Timer. The target is generating a CLK signal of 1MHz and control PB0 synchronized with the CLK.I am using Nucleo-F411RE as the development board. I have followed the instructions from the forum and configured the program.Configuration:HCLK: 100MHzTimer3: Program in main.c: uint32_t dummy_data[7] = {0} ;dummy_data[0] = 0x00000001 ;dummy_data[1] = 0x00010000 ;dummy_data[2] = 0x00000000 ;dummy_data[3] = 0x00000000 ;dummy_data[4] = 0x00000001 ;dummy_data[5] = 0x00010000 ;dummy_data[6] = 0x00000000 ;HAL_DMA_Start(&hdma_tim3_ch4_up, (uint32_t)dummy_data, (uint32_t)&(GPIOB->BSRR), 7) ;HAL_TIM_Base_Start(&htim3) ;HAL_TIM_OC_Start(&htim3, TIM_CHANNEL_4) ;TIM3->DIER |= (1 << 8 ) ; I am expecting to see a pulse in PB0 synchronized with PC9 PWM. But as output, I am getting only 1MHz PWM in PC9 and there is no change in PB0.Am I missing something? Any suggestions would be helpful.
I am working with the STM32F429 discovery board trying to prove out the ability to do OTA updates via a connected cell modem, but I am having trouble getting the MCU to boot from bank 2. I have created 2 simple freeRTOS applications which blink the onboard LEDs in different configurations and watch for a press of the user button to switch to the other memory bank. I have flashed each application individually at memory address 0x8000000 to verify that they execute properly. Then I flashed one application at 0x8000000 and the other at 0x8100000 using the STM32CubeProgrammer tool and then read out the memory at each location to verify that they were successfully programmed. Finally, I have tried a coupled different approaches to swapping the memory bank that is executed, but neither way has worked as expected.The first thing I tried was setting the BFB2 bit when the user button was pressed and then resetting. I verified that the BFB2 bit was successfully set, but when I reboot the board I
Hi!I am performing a calculation in an interrupt as this:L1L2_filteredTimeNegFlank = ((TIM_GetCounter(TIM16)*50) + 206*L1L2_filteredTimeNegFlank)>>8;But it seems like that it sporadically computes the wrong value and it disappears when I reformulate the calculation like this:L1L2_filteredTimeNegFlank = TIM_GetCounter(TIM16)*50;L1L2_filteredTimeNegFlank = L1L2_filteredTimeNegFlank + 206*L1L2_filteredTimeNegFlank;L1L2_filteredTimeNegFlank = L1L2_filteredTimeNegFlank>>8;Does anyone know why this happen?Thanks/Tomas
I use stm32h563 project with netxduo and need to set 1ms timer for rtos time base. After changing TX_TIMER_TICKS_PER_SECOND to 1000 and NX_IP_PERIODIC_RATE to 1000 and generating new files from ioc i see following: problem # 1 TX_TIMER_TICKS_PER_SECOND updated in tx_user.h (correct) but NX_IP_PERIODIC_RATE is still 100, is seem like a bug, I defined it as 1000 at beginning of nx_user.h. I would expect the generator to update the value here but that does not happen and it says commented /* #ifdef TX_TIMER_TICKS_PER_SECOND #define NX_IP_PERIODIC_RATE TX_TIMER_TICKS_PER_SECOND #else #define NX_IP_PERIODIC_RATE 100 #endif */ problem # 2 is NX_SECURE_DTLS_MAXIMUM_RETRANSMIT_TIMEOUT 6000 before the rate change it was: /* This option defines the maximum DTLS retransmit rate. The default value is60 * NX_IP_PERIODIC_RATE. */ which make sense and it should stay the same to or be defined as 60000. 6000 seems like wrong value and I don't know how to fix that. can someon
There are some older posts on the net about how to achieve a reboot in DFU mode but none of them worked for me. So I want to share my solution on how to add this functionality to your embedded firmware. First off all, I am using CUBEIDE with a STM32F412, but this method should work with all controllers. What you need:1) The memory address of the bootloader of your MCU2) The start address of your RAM3) Some magic number of your choice (my favorites are 0xFEEDFEED, 0xDECAFBAD, 0xDEADBEEF, ...)1) and 2) can be found in the AN2606 on the ST page. For my controller the relevant part looks like this: So the address of the bootloader is 0x1FFF000 and the start address of the RAM is 0x20000000.Now add a function to your source code that sets the magic number you chose and resets the controller. It could look something like this: void reboot_into_dfu() { *((uint32_t *)0x20000000) = 0xDECAFBAD; NVIC_SystemReset(); } Replace 0x2000000 with the RAM start address of your controlle
Hello all. I have another problem related with Modbus TCP communication. I use STM32VG board and W5500 ethernet IC. My problem is about after i establish connection, communication is broken one time in five seconds, another time in one minute. So, connection problem is not periodic or instant. I can share my codes below. First one is initialization of TCP, second one is sending data and last one is receiving data part. I don't know why connection was broken with arbitrary timing.
Hi there!i start to work at one project with STM32G031J. Soo my i have this problem one of the pin is use for reset when i download the program at the same time is configurate a single wire half duplex , and - i can't simulate- and it's look like every time i send out data they reset the CPUSome one can help meThank youSergio
Is it possible to programm STM32U083C-DK as USB Device MSC? I can't see any examples of USB MSC in repository.
Hi,I have following settings: IDE : VS Code (NRF connect plug-in) Programmer : Stm32Cube programmer (West tools used from zephyr sdk to flash and build) Stlink Debugger OS: Zephyr MCU: Stm32u5 series (Stm32u575) Imagetool used for the signing of the image that is part of the zephyr sdk. I'm trying to upgrade application firmware using MCUboot ( Zephyr's) bootloader and AWS FOTA .I can upgrade application firmware however, as soon as I change the size of the image slots the MCUBOOT bootloader on stm32 chips mcuboot does not upgrade the image after the download is complete and complainsE: Image in the secondary slot is not valid!. (image attached)Then the mcuboot fallback to the primary slot image after reset.On reverting back the size of the slots it works again every time.I have put some debug messages in mcuboot which shows the hash mismatch issue (image attached for code snippet with debug message from M
Hi, I've been trying to find something on WebSocket connections to a public domain for sending and receiving data for the past month, but couldn't find anything related to Cubeide or C library for WebSockets or the public domain, all I can see are codes associated with Arduino IDE for WebSocket which straight forward uses simple functions, Can Anyone help me with c code for the WebSocket connection to the public domain. I have initialized the w5500, static/dynamic IP allocation, I can send or receive data through the local network on a local IP address and I can create a socket server on stm32 to receive and send data locally.
Hello all,I am learning to implement a bare-minimal code that let PTP(OC, slave mode) works with STM32H755(Nucleo-H755ZI-Q with FreeRTOS). I have read RM0399, UM2217 as well as stm32h7xx_hal_eth.c with corresponding chapters. And here is the first draft I have done: https://codefile.io/f/vny07A1hYW. In this implementation only PTP-over-Ethernet (PTPv2) will be considered.So basic ideas are:+ "DataQ_PTP_Init" implements RM0399 §61.9.9 "Initializing the System time generation". This function will be called with ETH_Init(). As well as when network cable status is changed(connected).+ "DataQ_PTP_DeInit" will be called when e.g. network cable is disconnected.+ "DataQ_PTP_SysTime_Fine_Correction" implements RM0399 Page 3037 "System time correction" algorithm, with Fine-Correction only.+ "DataQ_PTP_TSI_ISR" will verify Addend Register, has been updated correctly. By referencing RM0399 Page 3037 "System time correction" algorithm step 3-8. (When TSI interrupt is triggered.)+ "DataQ_PTP_Rx_ISR"
Deos anybody know how to change UART configuration to send MSB or LSB first? I use STM Cube MX with STM32F446RE.
With latest STM32CubeIDE:when I try to import a project for U585 with ThreadX and NetX Duo, I get local file copy failure.Issue #1 - you need to add more details/logs, so that we can know WHICH file / package is causing the issues. It's a guessing game now.Issue #2 - the importer downloads some file, which has a license I should read. If you click there to read it - browser just says the file is not available!Issue #3 - the README.md file is missing. Is it because I can't read the license file? I did accept the terms and conditions (god knows what they were).But, how do I know what other files are missing? Is the project now usable or not? I have plenty of disk space available.annek@jannek-P720:~$ df -h .Filesystem Size Used Avail Use% Mounted on/dev/nvme1n1p1 916G 305G 565G 36% /home Connections to GitHub are otherwise working just fine.- Multiple pushes & fetches done to GitHub today w/o issues. jannek@jannek-P720:~$ ll STM32Cube/Repository/total 360496d
Hi,recently I changed my microcontroller from STM32L152 to STM32L552. In L1 I was using the code in the following link to activate the internal bootloader.https://community.st.com/s/question/0D50X00009XkeeWSAR/stm32l476rg-jump-to-bootloader-from-softwareBut apparently that piece of code is not working on STM32L552. Actually by looking into aplication note (AN2606) in "table 153. STM32L552xx/562xx configuration in system memory boot mode" in system memory row it isn't stated that system memory contains the bootloader firmware.I was wondering how I can activate internal bootloader in the software?
Hi,I try to enable the hardware ARP Offload in a STM32H753 custom board. The problem is, that it doesn't take the given IP adresse in die MACARPAR register regardless what the sequence of code is. I tryed it before and after enabling the ARPEN bit and before and after enabling the ETH Modul. The adresse where the MACARAR register is, is staying at zero. Does anybody know, how to enable the ARP offload?Best regards,Andreas
Not able to send STM32L4S9ZIJ6 into low-power sleep mode even after using inbuilt sleep API calls. Have used HAL_PWR_EnterSLEEPMode function call after configuring SLEEP_PD register, configuring system clock to run at 2MHz & changing the regulator mode into low power regulator mode while configuring interrupt mode for device wake up. The input supply voltage is 3V.Please suggest any resolution on the issue as the board is not entering low-power sleep mode.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.