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,Part number: STM32G0B0Flash : 512KBytesThis chip supporting only extended erase (0x44) command. Its working perfectly fine for Full chip erase(0xFFFF) , Bank-1(0xFFFE) and Bank-2(0xFFFD). But facing issue when try to erase specific memory/number of page.Logs as following:I (3137) : stm_pro_mode (resetSTM_to_enter_boot_mode:104) Enter boot mode I (3137) : stm_pro_mode (cmdSync:144) SYNC I (3137) : stm_pro_mode (sendBytes:267) 0x79I (3147) : stm_pro_mode (sendBytes:271) Sync SuccessI (3147) : stm_pro_mode (cmdGet:153) GETI (3157) : stm_pro_mode (sendBytes:267) 0x79I (3167) : stm_pro_mode (sendBytes:271) GET SuccessI (3167) : stm_pro_mode (cmdVersion:162) GET VERSION I (3177) : stm_pro_mode (sendBytes:267) 0x79I (3187) : stm_pro_mode (sendBytes:271) GET VERSION read command successI (3187) : stm_pro_mode (cmdId:171) CHECK IDI (3197) : stm_pro_mode (sendBytes:267) 0x79I (3207) : stm_pro_mode (sendBytes:271) CHECK ID command SuccessI (3227) : stm_pro_mode (cmdExtErase
Hi, I am using H743.I am testing to upgrade my firmware using the FWupgrade_Standalone example.My firmware worked fine.However, when I modified the next two lines of the icf file to 0x08020000 to upload to FWupgrade_Standalone, HAL_GetTick returned 0 and it doesn't work. /*-Specials-*/ define symbol __ICFEDIT_intvec_start__ = 0x08020000; /*-Memory Regions-*/ define symbol __ICFEDIT_region_ROM_start__ = 0x08020000; Is there a solution?
Hey,I use stm32h745, I want to use FDCAN1 communication with both cores.What is the effect of the decision on which core to perform initializer in the CubeMX?
I am struggling with the SDADC of the STM32F373My goal is to read 3 different channels of the SDADC3 using DMA. I was able to get a single channel working, but as soon as I add the other channels, the data seems not to be ok.I used the following code to initialise SDADC3: static uint32_t sadc3_buf[3]; void HAL_SDADC_MspInit(SDADC_HandleTypeDef* sdadcHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(sdadcHandle->Instance==SDADC3) { /* USER CODE BEGIN SDADC3_MspInit 0 */ /* USER CODE END SDADC3_MspInit 0 */ /* SDADC3 clock enable */ __HAL_RCC_SDADC3_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); __HAL_RCC_GPIOD_CLK_ENABLE(); /**SDADC3 GPIO Configuration PB14 ------> SDADC3_AIN8P PB15 ------> SDADC3_AIN7P PD8 ------> SDADC3_AIN6P */ GPIO_InitStruct.Pin = UI3_1_Pin|UI2_1_Pin; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); GPIO_InitStruct.Pin = UI1_1_Pin; GPIO_
Hola,Desde hace unos días me encuentro con el siguiente error en un programa que había completado. Lo único que hice ese día fue cambiar el tiempo de retraso; No cambié nada más.[Imagen: Foto 1]Después de horas de búsqueda, encontré en el foro que borrando la memoria flash se soluciona (Para borrar el flash, simplemente lo conectas presionando el botón de reinicio y conectándote al mismo tiempo). Soluciona el problema, pero sólo hasta que recargue el programa. Después de cargar el programa algo en la memoria se rompe porque me sale un mensaje de que la tarjeta ha sido desconectada y no hay conexión. Además, aparece el error "Manejador de señal llamado () en 0xFFFFFFFE", como puede ver en la imagen.[Imagen: Foto 2] [Foto 3]He realizado las siguientes pruebas para identificar cualquier problema:Borre parcialmente la memoria para ver si restablecer líneas específicas lo soluciona. No importa si borro una línea aleatoria o todo; después de hacerlo, el problema está solucionado.Cargue un có
I am using LWIP stack on my STM32F429 Nucleo board. Since this board has only one Ethernet interface i want to get Dual IP Support ( Static and Dynamic ) on the same interface. I did find certain community threads that explains some ways to achieve this by doing modifications in lwip stack but is there any document version or steps that i can follow to get Dual IP Support without much changes in lwip stack.Thank you for help.
STer: Using the ADC's Differential Function,But I can't find ADC12_INN1 ADC12_INP1 match PIN ?
The MCU is STM32F469, using RTOS: AZURE ThreadX and FatFS. The system is fetching data through 3 UART ports and doing logging (saving data into a file).Logging is setup to run once one hour, about 1000 bytes.UART read and write both use DMA. The system sometimes gets into frozen state after 1~2 days.Here frozen means the UI becomes unresponsive (not responding to keypresses). Logging also stops. Note the freezing only happens when logging is running. If logging is turned off, the system can keep running for very long time. Using debugger, it shows this stack:HAL_UART_IRQHandler() at stm32f4xx_hal_uart.c:2,489<signal handler called>() at 0xfffffffdHAL_UARTEx_ReceiveToIdle_DMA() at stm32f4xx_hal_uart.c:1,855ReceiveProbeMsg()WaitCmdResponseState()StartPortBTask()... Also the USART_SR value is 0xd8, which means there is ORE error. Watched a few freezing cases, the stack is always the same, stuck in HAL_UART_IRQHandler().It looks like the USART inter
Posted on June 13, 2014 at 07:33 Finally find the way out of the Keyboard LEDs working. I use STM32F4 disc with STM32Cube_FW_F4_V1.1.0 and STM32CubeMX 4.2 The HID keyboard program is modified from HID Mouse program Update the usbd_hid.c ... static uint8_t USBD_HID_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum); ... USBD_ClassTypeDef USBD_HID = { USBD_HID_Init, USBD_HID_DeInit, USBD_HID_Setup, NULL, /*EP0_TxSent*/ NULL, /*EP0_RxReady*/ USBD_HID_DataIn, /*DataIn*/ USBD_HID_DataOut, /*DataOut*/ NULL, /*SOF */ NULL, NULL, USBD_HID_GetCfgDesc, USBD_HID_GetCfgDesc, USBD_HID_GetCfgDesc, USBD_HID_GetDeviceQualifierDesc, }; __ALIGN_BEGIN static uint8_t USBD_HID_CfgDesc[USB_HID_CONFIG_DESC_SIZ] __ALIGN_END = { 0x09, /* bLength: Configuration Descriptor size */ USB_DESC_TYPE_CONFIGURATION, /* bDescriptorType: Configuration */ USB_HID_CONFIG_DESC_SIZ, /* wTotalLength: Bytes returned */ 0x00, 0x01, /*bNumInterfaces: 1 interface*/ 0x01, /*bC
Hi,I am using random number generator of STM32F407VGT-DISC1, which generates values between 0 to 4294967295. In order to make sure if I get random value for debug purposes, I want to write this value to serial console via UART. When I write my code as attached, I cant see the value at the serial console as expected. The code calls the hard fault handler. Nothing written on the console.Could anyone please help me with this ?
Hey there :)I am having trouble running the nucleo (NUCLEO-U5A5ZJ-Q) as an I2C slave where read/write sizes are unknown (only known by master)For the configuration I am using CubeMX and most of the time the slave is working quite fine. However sometimes (1 in 100), the slave transmit count (how many bytes have been read by the master) is not correct (one off - although the master reads the correct amount of data (see analyzer picture)) My code structure:// First run the cubeMX init code and enable listening MX_I2C2_Init(); HAL_I2C_EnableListen_IT(hi2c); // When the slave address maches, the write or read HAL function is called void HAL_I2C_AddrCallback(I2C_HandleTypeDef* hi2c, uint8_t TransferDirection, uint16_t /*AddrMatchCode*/) { if (TransferDirection == I2C_DIRECTION_TRANSMIT) { slave_match_master_write = true; HAL_I2C_Slave_Seq_Receive_IT(hi2c, buffer_, sizeof(buffer_), I2C_FIRST_FRAME); } else { slave_match_master_write = false; HAL_I2C_Slave_Seq_Transmit_IT
Hi,I'd like help to understand what is thew PWM frequency.As far as I understand:1. The main system clock is 64MHZ -- see below SystemClock_Config()2. PWM frequency is 64KHz (= 64MHZ / (1000 - 1))BUT, measuring the frequency shows 4KHz (rather than 64KHz).Can some please explain it? Thanks,Aviv void SystemClock_Config(void){RCC_OscInitTypeDef RCC_OscInitStruct = {0};RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};/** Configure LSE Drive Capability */HAL_PWR_EnableBkUpAccess();__HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW);/** Configure the main internal regulator output voltage */__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);/** Initializes the CPU, AHB and APB busses clocks */RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI1|RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE|RCC_OSCILLATORTYPE_MSI;RCC_OscInitStruct.HSEState = RCC_HSE_ON;RCC_OscInitStruct.LSEState
Hy guys, I want to be able to create a named file in an SD card based on how many files I have in the directory, per example: if I have only 1 file "file1", I'll create the next one as "file2". I searched the ff.h library, but didn't find anything that seemed usefull. Has anyone know any ideas I might implement to make it work? Also alternatively, is there a function that reads or compares the name of the file and then create another file with a different name?
Hi all,AbstractWe are developing our product based on STM32H7. We would like to use the HTTP server and Netconn to update the firmware for our product. We consider this method easy to use for customers more than Serial or USB. We have tried looking for some references but for now, we are having a lot of problems.QuesionIf you could answer any of those questions that could help us greatly!1. Do you have an example, reference, or tutorial of working to update firmware via web server stm32h7?2. Do you have any idea how to start?Thank you for taking the time to read this and to answer me!Regards
Hello everyone, I have STM32F407 and RJ45 connector i want to establish a ethernet connection using this rj45 connector so that i can send and receive data through tcp/ip or UDP using RTOS. can anyone help me to get start. Any leads will thankful. Thank you.
Hello,I have been trying to connect my STM32H573I-DK to our web server for some time now, unsuccessfully.I am basing my secure application on the X-CUBE-AZURE-H5 Expansion Package project.I can successfully run the example and connect (and publish) to Azure DPS.The main issue I am facing is that there seem to be something wrong when using any cipher suite that isn't TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, despite them being defined and supported throughout the NetXDuo stack. This also happens to be the one cipher suite used to establish the connection with Azure in the example.This cipher suite is considered to be weak and unsecure, hence our preference in using a different one.We tried the following cipher suites, with no luck:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256Use GCM instead of CBC. This errors during the TLS handshake with "bad record MAC" (Authentication tag check failed)TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256Use ECDSA and GCM (preferred TLS 1.2 method). This fails
Hi, I'm a student that want to integrate a logger in my project: I configured the fatfs middleware and i tried a lot of different libraries but none of them worked for my nucleo-f401re. When I tried to import the libraries, I had a lot of errors that i tried to resolve at the best possible but I only received, after working compilation and debugging, FR_DISK_ERROR from the mount operation. Is anywhere there a working library for module sd with spi communication and fatfs middleware?
Currently I am trying to interface with a LM75A temperature sensor using the STM32F446RE nucleo board.From the datasheet of the LM75A, I gathered that the sensor, returns a temperature measurement without any configuration.So I tried to simply hook up the LM75A (with floating Address Pins) and connecting it to the I2C1 port on the STM32.Addressing the slave on the given default address of 0x48h The code below returns HAL_BUSY, and locks up. Since I do not have a Logic Analyzer at home, I cannot manually debug what is going on. #include "COM_Driver.h" #include "LM75A_Driver.h" #include <string.h> int main(){ LM75_Init(); COM_Init(); uint8_t data[2]; float temperature; char tes[8]; while (1) { HAL_StatusTypeDef status = LM75_ReadReg(LM75A_ADDRESS, LM75_TEMP_REG, data, 2); if (status != HAL_OK) { // Handle I2C communication error continue; // Skip to the next iteration of the loop } temperature = (float)((data[0] << 8) | data[1])
After 'fighting' with the speed (performance) of the HAL_UART drivers used in Interrupt mode (_IT) in a complex FW system (using RTOS and many other interrupts and peripherals), I have realized three issues with the default HAL UART drivers:They are not really optimized for high UART baud rates (transmission speed)They are 'tricky' to use in a 'mixed' system with RTOS threads and Interrupts - they have a 'race condition' and potentially UART Rx can be/remain disabled foreverIf you hit an 'Overrun' condition (driver too slow, INT handler postponed) - the Rx remains disabled forever (nobody tells you - just by understanding the source code of the drivers!)Even, you think the UART works fine (with USB ST-Link VCP, e.g. the new NUCLEO-H743ZI2 with ST-Link V3 seems to work up to 10,000, 000 baud) - in user interactive mode (!) - it fails when sending files from terminal (e.g. TaraTerm) or sending UART commands from a Python script in 'full speed'.You will have a speed (baud rate) on UART wh
Hi,The reference manual for the STM32H7 mentions that it supports network statistics via RMON coutners. However, by reading through the manual it wasn't clear how would it possible to accesss them and what counters are actually supported. It would be greatly appreciated if some guidance and/or examples can be provided to access the RMON counters.Kind regards,Chamira.
Hello all , I want to download STM32F746ZGT6 DATA SHEET which having detailed explanation of register's.. which register we have to axis for communication like UART , USART , SPI, I2C etc..
Hi all, My application needs to communicate with an external device (Bus Device). The STM32 was configured as a Host using STM32CubeMX.The device is connected. However, 'Appli_state == APPLICATION_START' is never reached. Appli_state remains in the state 'HOST_USER_CONNECTION (0x04U)' or unknown (0x06U).During debugging, I noticed that the function 'USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost)' returns the value '2' instead of '1' or 'default'. USBH_SpeedTypeDef USBH_LL_GetSpeed(USBH_HandleTypeDef *phost){USBH_SpeedTypeDef speed = USBH_SPEED_FULL;switch (HAL_HCD_GetCurrentSpeed(phost->pData)){case 0 :speed = USBH_SPEED_HIGH;break;case 1 :speed = USBH_SPEED_FULL;break;case 2 :speed = USBH_SPEED_LOW;break;default:speed = USBH_SPEED_FULL;break;}return speed;}The function 'HAL_HCD_GetCurrentSpeed >> uint32_t USB_GetHostSpeed(USB_DRD_TypeDef *USBx)' changes the initial configuration to 'USB_DRD_SPEED_LS.' I didn't understand when 'USBx->ISTR' was modif
Hello everyone, I'm asking for your advice. I use STM32F429I-DISCO1 board, I want to use I2S so that the reception and transmission occurred simultaneously, on different lines and only one frame on each <WS> signal, and I think in order to quickly implement it with DMA , how can I implement this.thanks in advance.
hi,I am using stm32h743zit6.I am having problems with DMA in my code. First i have a code that is not mine that takes data from a peripheral (a microphone) using SAI and then via DMA inserts this data into an array (a buffer). To do this memory is modified to do this.I am doing the same configuration in other code to try to do this, in the original one the data refreshes automatically and in my own code, it just takes the first read. ALIGN_32BYTES (int32_t __attribute__((section (".dmapart"))) dmaArray[data]); HAL_SAI_Receive_DMA(&hsai_BlockA3,(uint8_t)* dmaArray, (uint16_t) data); All the GPIO is ok because i just copied the same code. SCB_EnableIcache() is written in the main..., I don't know why is not updating the data in my array and is working well in the other code. Anyone have any idea why is not updating in my code?If any of you need more info about the code tell me please. Thank you so much, i am desperating.
I now have two copies of basically identical code running in both MCUs. It was found that the two MCUs took different times to execute memset() of the same length.Observe the running time by adding an IO flip before and after memset(). buffer is a global variable. HAL_GPIO_WritePin(TEST_GPIO_Port, TEST_Pin, GPIO_PIN_RESET); memset(buffer, 0, 256); HAL_GPIO_WritePin(TEST_GPIO_Port, TEST_Pin, GPIO_PIN_SET); lower is 6us, higher is 36us.(The loop runs with this value every time)I can confirm that the frequency or settings of the two MCUs are consistent. And there are no operations like interrupts during running memset(). Micro used is STM32F746VGK. The library is libc_nano.a.Any ideal? Is it related to memory alignment? thanks.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.