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
Hello,When I builed the project, I had seen the Hal drivers files links in the end file *.HEX.How can I change the project configuration not to put this links in file because it use flash memory unnecessarily ?Thanks
I am using the STM32F413ZH (T6U) model, there is no problem with this model, it is a very nice model in terms of features. However, problems start when I use the I2C protocol.When I checked the line with a logic analyzer, I saw that the SCL line is always pulled high and the SDA line is always pulled low. In fact, the module I use for I2C has pull-up resistors on it, as it should. Of course, I have changed the module several times and tried with other modules, but the result is the same. Moreover, even toggling nine times to save the line does not work.I have read the communities and articles on the internet about the issue, but the solutions that are said to be done are not final.Afterwards, I wondered if there was a problem with STM and tried with different cards, but again, as with STM, sometimes it worked and sometimes it locked up.Note: On other boards, I couldn't toggle the line nine times because I used a high level library instead of writing register level code as in STM.In the
Hi Expert,Now, I am testing IWDG and SPI based on STM32F030CC chipset but I met some difficulty. At first, I used STM32F030R8-Nucleo example which was based on STM32F030x8 so I changed it to STM32F030xC. I changed GPIO/SPI interface for my test board. In the case of IWDG, I set LSI and the relevant registers, but reset is not executed after hard fault. I checked that NVIC_SystemReset() API works properly. Regarding SPI, I checked that GPIO works properly.. to test IO port, first set GPIO mode of SPI interface and checked HIGH and LOW states as GPIO... then set SPI mode but CLK was not generated. I leveraged the example code but strangely it doesn't work as expected. I attached two examples like below. Please help me make it work properly. Examples\IWDG\IWDG_ResetExamples\SPI\SPI_FullDuplex_ComPolling
HI, I am trying to interface the USB device with a customized STM32H563ZIT6 controller board. I followed the example steps from the STM Community, but the USB port is not detected. What should I do? https://community.st.com/t5/stm32-mcus/how-to-use-stmicroelectronics-classic-usb-device-middleware-with/ta-p/599274 https://community.st.com/t5/stm32-mcus/how-to-implement-a-usb-device-composite-in-stm32h5/ta-p/708078 Anyway, I will upload my project. Please verify it
Hi,I designed a sw on STM32F746 with STM32CubeIDE.Some functions work fine when I use the debugger (ST-LINK) but this same functions halts when I don't use the debugger !I play se sequence hereafter : - run the sw using debugger : execution ok- exit de debugger session into the STM32CubeIDE, the sw still running well- disconnect physically the ST-LINK, the sw still running well- reset my board, the functions halt before end execution !!! (others functions work fine) Someone can help me, please ?
Hello! I've been trying to use lwIP library with my STM32F769I-DISCO development board to assign IP address to the microcontroller. While in debug mode everything works fine, in normal mode, however, it doesn't. I had to add two 1s delays before MX_GPIO_Init();MX_LWIP_Init() instructions and SystemClock_Config() instruction to make my program work outside of debug mode (they can be replaced with one 2s delay before GPIO and LWIP init functions).The code is presented below:<code>/* Includes ------------------------------------------------------------------*/#include "main.h"#include "lwip.h"/* Private variables ---------------------------------------------------------*//* USER CODE BEGIN PV */extern ETH_HandleTypeDef heth;extern struct netif gnetif;/* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/void SystemClock_Config(void);static void MPU_Config(void);static void MX_GPIO_Init(void);int main(void){ /* MPU Configuration--
Hi everyone, I'm trying to create an example following this article. I'm using the STM32F429I-DISC1 evaluation board and using X-CUBE-AZRTOS-F4.1.0.0 software package. https://community.st.com/s/article/how-to-create-a-thread-using-azurertos-and-stm32cubeideI have one problem that the thread gets suspended forever when calling the tx_thread_sleep(ULONG timer_ticks) function. My source code and configuration is basically the same as that in the article. Do you guys have any idea what's the problem is? For your information, I create a TX_TIMER in parallel to interrupt every 10 ticks to check if the system tick timer is running. The timer is created successfully (return TX_SUCCESS), but unfortunately it doesn't run either. When I delete tx_thread_sleep(), everything, including the timer, works normally. I also try to create two threads A and B. Both can only run once and get suspended forever. And it works when I delete the tx_thread_sleep(). VOID my_thread_entry(ULONG initial_input) { T
I am trying to get Azure-RTOS/ThreadX running on a STM32F4-DISCOVERY board.I generally followed the instructions from https://community.st.com/s/article/how-to-create-a-thread-using-azurertos-and-stm32cubeide except:- I (obviously) picked a different board in CubeMX- I used TIM11 for HAL timebase- I picked X-CUBE-AZRTOS-F4 instead of X-CUBE-AZRTOS-F7- my task only increments a counter instead of flashing a LED.It all compiles and my task starts. However, when it calls tx_thread_sleep(), it never returns. The scheduler is stuck in the __tx_ts_wait loop.The SysTick is configured properly and running. However, as far as I can tell, the SysTick handler never gets called.Am I doing anything wrong? Are there any ThreadX examples for STM32F411 available?Thanks!Bart
Still trying to get USBX to work, I can now get data out to Putty but it's all garbage and after each send it "dings" (very annoying). I used the H5 example to get it working, last hurdle I guess. Putty is set to 115200, 1 stop bit, 8 data bits just like the configuration: #define MIN_BAUDRATE 9600 UX_SLAVE_CLASS_CDC_ACM_LINE_CODING_PARAMETER CDC_VCP_LineCoding = { 115200, /* baud rate */ 0x00, /* stop bits-1 */ 0x00, /* parity - none */ 0x08 /* nb. of bits 8 */ }; Anything else I can check? This is what I'm seeing:Kindest regards
My last page is: Re: Why DAC output nothing in software trigger? - STMicroelectronics CommunityI have find CubeMX BUG.I use STM32L431RCT6 and software version is STM32CubeL4 Firmware Package V1.18.0 / 07-June-2023My STM32CubeMX config is:And my code in main() is: HAL_DAC_SetValue(&hdac1, DAC_CHANNEL_2, DAC_ALIGN_12B_R, 4095); HAL_DAC_Start(&hdac1, DAC_CHANNEL_2); But the PA5 have no voltage. I find the "stm32l4xx_hal_dac.c" file HAL_DAC_Start() function is: HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef *hdac, uint32_t Channel) { /* Check the parameters */ assert_param(IS_DAC_CHANNEL(Channel)); /* Process locked */ __HAL_LOCK(hdac); /* Change DAC state */ hdac->State = HAL_DAC_STATE_BUSY; /* Enable the Peripheral */ __HAL_DAC_ENABLE(hdac, Channel); #if defined (STM32L4P5xx) || defined (STM32L4Q5xx) || defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5
Hi, I'm using an stm32f102 for making usb game controller (custom hid) with 29 buttons. The problem is, that the latency if I check on PC is feelable, too high. I made some tests to figure out the problem, but I don't have any idea yet. If I just report continiusly in the main while with 50ms delays, the indicator led on game controller window on pc just blinks with ~1s. So, seems, don't receive all of the data. If I increase this delay to 100ms it looks almost fine. I tried also to measure latency with camera (measure the time between click sound and the indicator on pc screen). For STM32 was around 5-6 frame with 30fps. I tried also with a good working game controller, it is 2-3 frame. If I report with every 1ms from systick, it's not better. I looked into the send report function and experienced, that the function sometimes returns with busy, even if data send is with 50ms interval. Why? :o In the MCU runs everything on 48MHz and in the test is just a gpio read and report. Any idea?
I have WeAct STM32H743 (STM32H743VIT6 ) and I can't connect it with a LAN8720 module!I did all my steps according by example from this link https://www.st.com/en/embedded-software/stm32cubeh7.html But, it doesn't help me!How to find out at what stage I have break a code?
Hi there,What are the secret steps for migrating a project to STM32Cube FW_G4 V1.6.0 in a clean way?I had an operational project built with STM32Cube FW_G4 V1.5.1 (CubeMX 6.10.0) and running properly for years!Since I updated Cube IDE I was prompted to migrate the project,and stupidly, I accepted! :(And now, this is a big mess, at least with the timers and uart interface... (probably due to interrupt issues).After spending 2 full days (and nights) I've still not been able to find what was wrong.But I've been able to reproduce the issue on my old dying laptop, where the project was still not updated, and it was perfectly running. I just added a GPIO toggle on each sys-timer interrupt and got a perfect square wave with two milliseconds period (one transition on each interrupt). I just updated the FW package and then it looks like tachycardia...I carefully checked the NVIC settings on both sytems, but they look very similar.Anyway, the IOC differ only by the firmware package revision and
Hi ST,I'm trying to build SMBus Communication in STM32F407 with a battery IC (bq25720), but I can't read the device ID response.Could you assist me with this? Thanks,PSR
Hello All,We are looking into testing our code that access the EDATA and handle FLASH ECCC (single bit error) and ECCD (double bit error).How can we simulate those errors?Is it possible to insert single bit or double bit errors using a JTAG? It would useful to test the code without modifying it.Any alternatives?
Hi All - minor issue I noticed earlier on a Nucleo H563ZI board when configuring the FDCAN filters.With asserts enabled, if I set the allowed maximum filters to a non-zero number and try to set a filter on a higher filter index, it raises an assert as expected. But if the allowed number of filters is 0, it does not.I believe this is because the assert is implemented at line 1332 in stm32h5xx_hal_fdcan.c as: assert_param(IS_FDCAN_MAX_VALUE(sFilterConfig->FilterIndex, (hfdcan->Init.ExtFiltersNbr - 1U))); Init.ExtFiltersNbr is an unsigned integer, so (Init.ExtFiltersNbr - 1) as passed to the IS_FDCAN_MAX_VALUE test will be wrapped-around to a large number?This may be better implemented as: assert_param(IS_FDCAN_MAX_VALUE((sFilterConfig->FilterIndex + 1U), hfdcan->Init.ExtFiltersNbr )); Nic
STM32G474In RM0440 Rev 8, page 641, I learned the "DMACFG bit" in ADC configuration register (ADC_CFGR) set the ADC in either one-shot mode or circular mode. But there is a separate mode setting in DMA which is also one shot vs circular mode. If we use DMA to ransfer ADC result to memory, I am wondering whether this is a legitimate use case that we set the ADC and DMA in different mode?
Greetings and thanks for reading. FreeRTOS has a built in utility function uxTaskGetStackHighWaterMark() that reports on the amount of space unused by the stack. You can use this function to gauge just how much of the stack is used and how close you are to corruption or conversely how much memory you are wasting. Its a way of both preventing crashes (due to blown stacks) and simultaneous allowing you to optimize the size of the stack for applications that may be tight on memory. Within the Azure ThreadX I could find no such function that will report such useful information. Is there such a utility within ThreadX that I can call?Thanks,Hab
hello: I use STM32H7A3VGT6 in our board, two flash regions are available in the MCU and their start address are 0x08000000 and 0x08080000, all in bank1, when I use STM32CubeProgrammer to erase more than 3 sectors from 0x08080000, it works well, but if I do the coding and erase over 3 sectors from 0x08080000,it fails when erase at the 3rd sector, crash in FLASH_WaitForLastOperation, the flash erase code is below, can you help me find out the casue? Thanks.Billstatic uint32_t GetSector(uint32_t Address){uint32_t sector = 0;if (Address < (FLASH_BASE + FLASH_BANK_SIZE)){sector = (Address - FLASH_BASE) / FLASH_SECTOR_SIZE;}else{sector = (Address - (FLASH_BASE + FLASH_BANK_SIZE)) / FLASH_SECTOR_SIZE;}return sector;}HAL_StatusTypeDef flash_erase(uint32_t dest, uint32_t size){uint32_t FirstSector = 0, NbOfSectors = 0, SECTORError = 0;HAL_StatusTypeDef status = HAL_OK;FLASH_EraseInitTypeDef EraseInitStruct;if(size > FLASH_BANK_SIZE|| dest
Hi! I am trying to run a simple blink example using the STM32L552 Nucleo board, but I can't seem to figure it out. Any help in figuring out what my problem is would be very helpful. I've tried looking at the data sheet to figure out what the SRAM-boundaries are etc, but I must have gotten something wrong.I am using the CMSIS stuff. The program is simply supposed to blink on of the LEDs, but nothing happens.Here is startup.c: #define SRAM_START (0x20000000UL) #define SRAM_SIZE (32U * 256U) #define SRAM_END (SRAM_START + SRAM_SIZE) #define STACK_POINTER_INIT_ADDRESS (SRAM_END) #include <stdint.h> #define VECTOR_SIZE_WORDS 464 void default_handler(void); void reset_handler(void); void nmi_handler(void) __attribute__((weak, alias("default_handler"))); void hard_handler(void) __attribute__((weak, alias("default_handler"))); void mem_handler(void) __attribute__((weak, alias("default_handler"))); void bus_handler(void) __attribute__((weak, alias("default_handler
i was debugging code HAL_uart_Receive (); sprintf(command, "AT+CMGL=\"ALL\"\r\n");//read all sms HAL_UART_Transmit(&huart1, (uint8_t *)command, strlen(command), 10); // HAL_Delay(100); HAL_UART_Receive(&huart1, RXbuffer, sizeof(RXbuffer), HAL_MAX_DELAY); i jump suddenly in here/** * @brief This function handles UART Communication Timeout. It waits * until a flag is no longer in the specified status. * @PAram huart Pointer to a UART_HandleTypeDef structure that contains * the configuration information for the specified UART module. * @PAram Flag specifies the UART flag to check. * @PAram Status The actual Flag status (SET or RESET). * @PAram Tickstart Tick start value * @PAram Timeout Timeout duration * @retval HAL status */ static HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout) { /* Wait until flag is set */ while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET
Hi I'm trying to setup TLSv1.3 using STM32H63 Nucleo board. I followed the steps in https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/netx-duo-secure-tls/chapter3.md to enable TLSv1.3 in STM32CubeMX. But all I get from the OpenSSL server is: ssl.SSLError: [SSL: NO_SUITABLE_SIGNATURE_ALGORITHM] no suitable signature algorithm (_ssl.c:1006) How do I solve this? I checked with the debugger and I can see that this code gets hit #if (NX_SECURE_TLS_TLS_1_3_ENABLED) if(tls_session->nx_secure_tls_1_3) { /* Send supported TLS versions extensions (for TLS 1.3). */ status = _nx_secure_tls_send_clienthello_supported_versions_extension(tls_session, packet_buffer, &length, &extension_length, available_size); if(status != NX_SUCCESS) { return(status); } Using wireshark I can see that clienthello from the client Frame 243: 250 bytes on wire (2000 bits), 250 bytes captured (2000 bits) on int
When executing RSTDAA and ENTDAA once, it succeeds, but when executed more than twice, it does not work properly. Since RSTDAA is being performed, I think there should be no problem, but is it not possible to execute it more than twice? //1st rstdaa+entdaa /* Assign dynamic address processus */if (HAL_I3C_Ctrl_DynAddrAssign_IT(&hi3c1,I3C_RSTDAA_THEN_ENTDAA ) != HAL_OK){/* Error_Handler() function is called when error occurs. */Error_Handler();} // This function is succeed while (HAL_I3C_GetState(&hi3c1) != HAL_I3C_STATE_READY){} // This function is succeed //2nd rstdaa +entdaa /* Assign dynamic address processus */if (HAL_I3C_Ctrl_DynAddrAssign_IT(&hi3c1,I3C_RSTDAA_THEN_ENTDAA ) != HAL_OK){/* Error_Handler() function is called when error occurs. */Error_Handler();} // This function is succeed while (HAL_I3C_GetState(&hi3c1) != HAL_I3C_STATE_READY){} // This function is Failed
I am trying to run AcousticBF (Beamforming library v3.1.0 from XCUBE_SMARTMIC_V2.4.0 pack) on STM32H747 development board, but on the output I get only a tone signal, and no audio hearable from Mics. - The inputs are two PDM mics, and the PDM signal is converted to 16kHz, 16bit PCM audio by PDMFilter library. Audio quality for both audio channels are good, when Beamformer is switched off. - When I enable Beamformer I get only a signal tone in the output stream. (Signal tone means a 3kHz sinusoid signal, with a side lobes on 1.5kHz and 4kHz).- Reference output signal is also filled with the same signal tone.- I tryed to work with a precompiled library, and with own compilation of sources, too. Own compilation of sources, generates many warnings, e.g. warning: 'libBeamforming_setConfig' defined but not used [-Wunused-function]But I think it is not a problem, and a linker can found the function. The problem is static declaration of function, and this function is called
Hi ST Team, Currently i am using STM32H523RCT7 MCU for one of my project. In this MCU, i am facing a problem regarding ADC MULTICHANNEL DMA. When i am using the 10 adc channel with dma which is trigger by timer3(trigger timing 100us)using below API..HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);HAL_ADC_Start_DMA(&hadc1,(uint16_t *)uADCConvertedDataCopy,10);HAL_TIM_Base_Start_IT(&htim3);then in main while loop mcu perform instruction execution at very low speed. When i commnet above API as below..//HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);//HAL_ADC_Start_DMA(&hadc1,(uint16_t *)uADCConvertedDataCopy,10);HAL_TIM_Base_Start_IT(&htim3);then MCU perform instruction execution at good speed. that means while loop execution faster.I think their is some issue regarding my cube mx setup or while using the ADC DMA API.For check the execution time i make a pin hig
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.