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 an STM32F401CDU6 blackpill board and I have a USB not recognize code 43 error when activate dfu mode. It's don't do it 3 months ago
Dear All,I'm using STM32F429ZI-Nucleo for Ethernet, I'm using this board as TCP server, Connecting with client Thats working fine but whenever client send data to server MCU going to HardFauld_Handler, I'm not able to identify this issueKindly guide why this happen.static void tcp_server_handle (struct tcp_pcb *tpcb, struct tcp_server_struct *es){ struct tcp_server_struct *esTx; /* get the Remote IP */ ip4_addr_t inIP = tpcb->remote_ip; uint16_t inPort = tpcb->remote_port; /* Extract the IP */ char *remIP = ipaddr_ntoa(&inIP); esTx->state = es->state; esTx->pcb = es->pcb; esTx->p = es->p; char buf[100]; memset (buf, '\0', 100); strncpy(buf, (char *)es->p->payload, es->p->tot_len); strcat (buf, "+ Hello from TCP SERVER\n"); esTx->p->payload = (void *)buf; esTx->p->tot_len = (es->p->tot_len - es->p->len) + strlen (buf); esTx->p->len = strlen (buf); tcp_server_send(tpcb, esTx); pbuf_free(es->p);}On execution the Last
I'm using FATFS with DMA to read/write a SD card. Everything works fine until I introduced low power mode to my code. Currently, I just run the init function generated with cubemx and mount again after waking up. After the first wakeup, everything still works, mount, open, write, close all return success, but after the second wakeup, mount returns FR_NO_FILESYSTEM. As far as I can tell, the filesystem collapsed as soon as write operation after the first wakeup before entering stop mode the second time, despite it returns success.It's the first time I ever come across low power mode so it may be just some basic problem but I really have no idea. What do I need to do with FATFS/SDIO before entering and after exiting stop mode to make it work properly?
Hello,We observe issues with a set of stm32F407ZETx.The application stalls / hangs somewhere while calling MX_USB_DEVICE_Init(). We are using the USB in CDC class. The board is powered via a USB cable, and the issue is not observed when using a good-quality USB power block, but it is observed if we e.g. put a dongle in between (https://us.transcend-info.com/product/card-reader-accessory/hub2). The production site (in a different country) is also observing these issues, I'll ask if they use a hub as well.The application seems to hang, but I could not pinpoint where exactly, since the program counter register suddenly becomes 0x0!!! That seems to happen on a random place during MX_USB_DEVICE_Init(). Sometimes, the application recovers automatically (on the production site, they say that the startup time usually takes 2 minutes instead of 3 seconds), but on our reproduction setup, the application never recovers automatically.Surprisingly, the application DOES recover if we touch the groun
I have a problem in sending udp multicast frame via wifi (with the MXCHIP embedded on the card). The problem occurs when there are chained buffers in play. These buffers come from the lwip lib when Pbuf is allocated with the PBUF_REF option in the pbuf_alloc() function. Note : I work with the project base b_u585i_iot02a_ntz from the extension : X-CUBE-AWS (STM32CubeExpansion_Cloud_AWS_V3.0.0).The pointer given as parameter to xQueueSend for the wifi sending via the MXCHIP module in the mx_lwip.c file (line 170) is "pxPbufToSend". But, at line 159 of this same file, we add to "pxPbuf" a "MXHeader" with (vAddMXHeaderToEthernetFrame), which seems useful for the sending of the frame. When this buffer (pxPbuf) is not chained, pxPbuf and pxPbufToSend are linked with the same address (line 126) so the addition of this Header on pxPbuf is propagated on pxPbufToSend. And the sending is done correctly. However, a problem occurs when pxPbuf is chained (pxPbuf->next != NULL). So, at line 136 o
Hi, I have STM32F413VHT6 board and trying to use FATFS and SDIO card slot, but f_mount returns FR_NOT_READY. i worked in 1 bit mode is working perfectly but SDIO in 4 bit mode f_mount return FR_NOT_READY.i am using below code for both 1 bit and 4 bit mode i am changing the clock divider value 4 to 10 and check clock divider in 96 also 4 bit is not working.Any ideas what is the issue and how to solve this problem?
HI: Due to special needs, the system clock frequency needs to be changed during work, switching between 72M and 48M. Using STM32F103, the USB CDC Virtual COM Port cannot function properly after switching the clock.Using STM32F407 to dynamically change the system frequency, the entire function of the chip is working normally. No issues similar to STM32F103 have occurred.The important thing is that the USB CDC Virtual COM Port is broken. STM32F103 is still running. After switching the frequency, there is a program that lights up the LED, which is working.Computer Device Manager reports an error:Device Not Migrated due to Partial or Ambiguous Match.Windows has stopped this device Code 43.thanksMy code(F103): __HAL_RCC_SYSCLK_CONFIG(RCC_SYSCLKSOURCE_HSE); __HAL_RCC_PLL_DISABLE(); &nb
I paid someone and she came up with a solution using STM32F103 and claims that it works for wav files using PWM and low pass filter with a digital attenuator. It didn't, and 1 year on I am still looking for the right MCU and the right solutionUM1642 digital potentiometer supports only F4, F7 series MCU, not F1.Parts 1-3 of how to play audio files .... features a G0 series.So which MCU should I use without an external audio DAC?
Hello,I'm using SDMMC to save ADC DMA data to an SD card on Nucleo H723ZG. I made some tests and got distorted results. Then I realized a problem, sampling speed is too slow when I use fatfs writing commands. What might be the problem?I use a 64K buffer for ADC.The code for the writing process with half and full callback:/* USER CODE BEGIN 4 */ void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc) { for (int i = 0; i < ADC_BUF_LEN/2; i++) { fres = f_printf(&fil, "%d\n", adc_buf[i]); } } void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_11); for (int i = ADC_BUF_LEN/2; i < ADC_BUF_LEN; i++) { fres = f_printf(&fil, "%d\n", adc_buf[i]); } if(HAL_GPIO_ReadPin(B1_GPIO_Port, B1_Pin)==GPIO_PIN_SET){ //Check if button pressed f_close(&fil); f_mount(NULL, "", 0); myprintf("closed\r\n"); } } /* USER CODE END 4 */The first pic is from full callback without fatfs write cmds: The second pic is with fatf
HI, I m trying to send a 16 bit word using SPI HAL to a SPI external interface driver. SPI is configured as:-Transmission master-16bit data TX-MSB first.This driver requires first address of the register and then the content to be received. I created a struct:typedef struct{ uint8_t regAddr; uint8_t regData;} SDR_TypeDef;and then I define a variable with the contents: SDR_TypeDef decodeMode_Reg={0}; decodeMode_Reg.regAddr = DECODE_MODE_ADDR; // 0x9 decodeMode_Reg.regData = 0b10001010; //0x8Aand then transmission by HAL: HAL_SPI_Transmit(&hspi, (uint8_t*) &decodeMode_Reg, 1, HAL_MAX_DELAY);On the scope I have a reverse endian transmission: 8A09 instead of 098A.Any ideas?I would like to let the struct in this way, without reversing the order of registers, since it fits better the definition of the register of the receiver driver datasheet. Some ideas?Thanks
Wireless Firmware version 1.13.0Wireless Firmware build 5FUS version 1.2.0SHCI_SUB_EVT_CODE_READY - WIRELESS_FW_RUNNINGDBGMCU_GetRevisionID= 2001***************************************************************************** STMicroelectronics** STM32WB5MMG - Bluetooth Low Energy 5.0 and 802.15.4 module** STSW-PROTEUS | BLE-CbM V1.0.0 - April 07, 2022** CMSIS Core(M) V5.3** HAL V1.10.0 RC0** Compiled Apr 7 2022 11:21:15 (IAR)***************************************************************************** MCU Unique device ID is 0x203232533456500B00350027** MCU Flash Size is 1024 KB*************************************************************************** BD Name PROTEUS BD Address 00:80:E1:26:41:39 BLE Stack V1.13.0 BLE Stack Branch 0 Type 5 FUS V1.2.0STSAFE-A1xx initialized successfullySTSAFE-A1xx echoed successfullyPairing: 1. Check local envelope key presence through STSAFE-A1x0 
HiIn main.c I have got these lines: osMailQDef (object_pool_q, 10, MEM_memberTypeDef); // Declare mail queue osMailQId (object_pool_q_id); object_pool_q_id = osMailCreate(osMailQ(object_pool_q), NULL);in another file in my therad I want to access object_pool_q_id, extern osMailQId (object_pool_q_id);extern osMailQId (object_pool_q_id);void Start_Mem_Task(void const * argument){ while (1) { osEvent event = osMailGet(object_pool_q_id , osWaitForever); ... }}The linked complains: undefined reference to `object_pool_q_id'What is going wrong?Thx
..
I'm running the SBSFU on a STM32H7 where I can succesful upload a new application and it is starting. The application is running on an external flash.The question is, can I simply change the clock system settings to the applications need at startup or do the bootloader and app must have the same clock settings? Because the bootloader already sets the clock settings for it's own need. Can I usethe same clock settings as it would run as a standalone app?The second question is, the application is running azure RTOS which uses the SysTick as a base timer und the normal tick is incremented via TIM6. Is this possible to simply change the Tick sources or do I have to stop the current clock system inany way?I appriciate your help
Hi,I am developing a sensor board that includes an STM32U575CGTx MCU, an IMU, a microSD card slot, USB, and a battery (rough schematic attached). If you have a better suggestion for the MCU, please feel free to suggest it. The data logging rate is relatively low at 60 kB/s, and the IMU sample rate is 1600 Hz.The basic requirements for the sensor board are as follows:Act as a USB mass storage device when connected to a computer.Charge the battery whenever a USB cable is connected.The MCU should read the battery voltage and act according to instructions.ChatGPT suggested the following steps to achieve these requirements:Set up the USB stack on the STM32U5 microprocessor to act as a USB device and implement the MSD class. There are several libraries available, such as the STMicroelectronics USB Host and Device Library or the FatFs library.Implement the interface between the microprocessor and the microSD card. This can be done using the SDIO interface or SPI.Use the FatFs library to read
Dear everyone, I am using an STM32F429ZI Nucleo board and using the ADC_RegularConversion_DMA example on STMCubeIDE 1.10.1I must say on a first point of fiew, the example seems to work fine, there are some analog data in the variable: __IO uint32_t uhADCxConvertedValueBut as I am a suspicious guy and want to be sure that this code works perfectly. My aim is to check that for ALL conversion of ADC, converted result is saved in memory after DMA transfer.For that I looked at function:void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* AdcHandle)There, if I understand correctly, it is called each time a conversion on ADC1 channel 10 is finished. But the limitation is that DMA transfer will always "push" ADC result into the same memory address (pointed at uhADCxConvertedValue). So it will overwrite last ADC conversion value saved there if I don't copy it elsewhere.Fine, thank you DMA you did great job, I will take it from there and save uhADCxConvertedValue in an array I will process in my app
I'm trying to make use of the HAL_UARTEx_ReceiveToIdle_DMA() functionality.So far no reaction on an IDLE event. The corresponding HAL_UARTEx_RxEventCallbackgets called when a certain amount of bytes has been received, but not on an IDLE event.The development board I use: NUCLEO-L031K6The UART of interest:USART2So here's my setup:I added the following code:.../* USER CODE BEGIN PFP */void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t size);/* USER CODE END PFP */.../* USER CODE BEGIN 2 */HAL_UARTEx_ReceiveToIdle_DMA(&huart2, rx_buf_usart2, rx_buf_size);__HAL_DMA_DISABLE_IT(&hdma_usart2_rx, DMA_IT_HT);/* USER CODE END 2 */.../* USER CODE BEGIN 4 */void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t size){ if (huart->Instance == USART2) { HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin); HAL_UARTEx_ReceiveToIdle_DMA(&huart2, rx_buf_usart2, rx_buf_size); __HAL_DMA_DISABLE_IT(&hdma_usart2_rx, DMA_IT_HT); }}/* USER CODE BEGIN 4 */...rx_buf_size i
I am using the UX_Host_MSC example project. When a connect a USB drive to the USB-C port, the demo app detects a physical connection but power is never activated.
I have recently bricked my STM32H7 discovery kit by trying to select the M4-only boot option, but I am no longer able to connect the debugger. I have had a similar problem with the Arduino Giga board but I managed to "unbrick" it by running a bootloader and pressing the "BOOT0" button. According to the STM32H7 manual, the bootloader should is loaded by a combination of a high BOOT0 and the status of certain option bits (over which I obviously do not have any control any longer). For the Discovery board, I have soldered in a button that shorts out R192 and which I then press while powering up / resetting, but neither the STM32CubeProgrammer nor the ST flash loader demo is able to connect through the UART (via the in-built ST link programmer). Do you have any advice on how to start the bootloader? Surely there must be a way to save that board? Do I need to use a different USART port?Many thanks, Clem
I am developing on the STM32U5 family and i need to use UCPD. As far as I know the UCPD middleware is no supported on this family, so I need to implement my functionality using the LL driver for the UCPD module. I am not experienced with usb power delivery. It would be nice to see and example of the ll_ucpd usage.
The standard STM32F407 USB audio driver only supports 48k, is there any info available to up it to higher speed?
Using an STM32F107 without an operating system. Looking for an open source SSH library that can be used along side LwIP.Has anyone had any luck doing this previously?
Why are no HAL APIs changing the pulse period and duty cycle? Only init, start and stop are available. If we need to change the period and duty cycle how one can achieve this?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.