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 tried to get LWIP and MBEDTLS working in RAW mode without an RTOS but have failed miserably...I think I have overlooked something - any suggestions?The failure is at -ssl_tls.c - line 2629if( ! mbedtls_pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) ){ MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) ); mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE ); return( MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH );}My server shows -Starting server.Ipdaemon1_OnSSLStatusUsing platform security API.Ipdaemon1_OnSSLStatusEnabling TLS versions: TLS1.2 TLS1.1 TLS1.0 Ipdaemon1_OnSSLStatusReceiving 106 byt
Hi,i'm using the NUCLEO U575ZI-Q board I want to compress some data I collect from analog sensors via png encoding in order to take advantage of compression, how can I do it? Are there special libraries for that?I don't need to have the .png file but just encode the data with png encoding.Thanks You.
HI. I would like to use the battery voltage monitoring feature.I am reading the ADC by connecting a DC source and adjusting the value from 2.6V to 3.6V. We tested 10 boards and they all had different ADC values.The biggest difference was over 100.PCLK is set to 64Mhz.The ADC setting values were as follows./* ADC code */static void MX_ADC1_Init(void){ /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc1.Init.LowPower
I am running LED matrix display from F0 Series MCU. At present whatever I want to display on board, I am putting "Hex code of LED matrix" in the main loop code. But Now I want to have USB stick containing Hex code of LED matrix. Basically user will upload the Hex code on USB stick from laptop.And controller circuit will have female USB connection, where on inserting the USB stick, "Hex code of LED matrix" will automatically uploaded on external flash such as AT25SF641B, and MCU reads from that external flash to display on LED matrix display.Please let know any tips to implement this.. I am totally lost.
I implemented the solution found in the online workshop for the NetX Duo Webserver. The demo worked as expected. I then attempted to rebuild my own solution from scratch using STM32CubeMX to create the project, and add all the cheat sheet items in STD32CubeIDE. The firmware builds, but the Azure RTOS never gets the IP address from DHCP. I tried a static IP address, and I am not able to even ping the board. It is as if the network stack is not working at all. The demo uses older version of Netx Duo and threadx than the latest I am using in STM32Cube repository. Does any one have an idea what I missed? I have attached the project. The code fails on getting the semaphore just before retrieving the IP address.
Hello,I am working on a project based on FreeRTOS, LwIP + MQTT and MBEDTLS. My current setup is a follows:Hardware: STM32H743XIH6Tools: STM32CubeMX v6.9.1 / STM32H7_HAL v1.11.1Environment:VS Code, Ext (C/C++ Extension Pack, Cortex Debug, Makefile)OpenOCDMakeArm GCC Toolchain v12.3Windows 11Until now, only LwIP works with FreeRTOS enabled (Ping test OK). However, MBEDTLS have several issues during code generation, compilation. I was unable to find any proper documentation to follow how it should be done. Even inside the HAL example there is nothing related to MBEDTLS.There are several things I'd like to report and I have several questions related to code generation via CubeMX. First I'll report few things related to code generation for the project. Please do keep in mind that each point shows code generation in stages i.e. (base code with freertos, lwip, mbedtls).REPORT: CubeMX Code Generation (makefile)1- It declares a 'static void MPU_Initialize(void)' function but never defines it.2-
Hi everyone, I'm running into issues with setting up my STM32F746g-discovery board to pass 4 values from its ADC to the DMA. I've debugged this for hours and have been unable to find a solution. All of the pins I'm using (and their corresponding ADC ports) work fine on their own without scan mode and DMA enabled, but as soon as I enable scan mode, no values are printed to my adcValues[4] array. I've attached my main.c file for anyone who would be kind enough to have a look and tell me what (likely obvious) mistake I have made. I've got some other stuff in there, but I'm assuming it's simply an initialization error (although after debugging for so long, I'm not so sure). Clock is at 200Mhz. GPIO pins are configured for analog read and correspond to PA0, PF10, PF9 and PF8.If downloading the main.c is too much, here are some snippets of my main loop to give an idea: #include "main.h"ADC_HandleTypeDef hadc3;DMA_HandleTypeDef hdma_adc3;CRC_HandleTypeDef hcrc;DMA2D_HandleTypeDef hd
Hello,I have a STM32F407G-disc1 and am trying to run the FatFs_USBDisk application. If I select debug, the program loads into the board and I can step through the application. If I resume running or instead of selecting debug, select run the program terminates and ends up in the Reset_Handler as shown below.Any thoughts on why this is happening?Do I have a jumper not properly set? /* stack used for SystemInit_ExtMemCtl; always internal RAM used */ /** * @brief This is the code that gets called when the processor first * starts execution following a reset event. Only the absolutely * necessary set is performed, after which the application * supplied main() routine is called. * @PAram None * @retval : None */ .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* set stack pointer */ Any help would be appreciated.Thanks,Brent
Hi team, 1. Class B Test Library test With Trustzone Threadx .2. Class b Thread allocate to Secure mode. _tx_thread_secure_stack_allocate 3.After secure stack allocation PSPLIM_S=0x30000688 Value Stack overflow.Virtual stack start address: 0x30000070STL lib start address: 0x300000b0When performing the “push r3” content on “current PSP 0x300000b0” the device generates a hard fault and the reason is Stack overflow. Question:1. how to clear Stack PSPLIM_S overflow in Azure RTOS secure allocation?I have attached Snapchat documents also.Regards,Thank you
I'm experiencing a weird race condition / hangup with an application that I've built for my STM32F407VGTx. Basically I connect to the device via a USB cable and open a terminal to type commands on the device like a CLI. Everything works fine until I paste a large buffer into the console - at which point it locks up and seems to get frozen in some FreeRTOS related calls.in my CDC callback i have this: void CDCSystem::halalCDCReceiveFSCallback(uint8_t* data, uint32_t* length) { if (this->protocol == nullptr) { return; } this->protocol->handleIncoming(data, *length); } The `handleIncoming` method parses the incoming data and will likely print return characters to the console. I'm using a FreeRTOS stream buffer for the outgoing data, here's the write method: void CDCSystem::write(uint8_t* data, std::size_t length) { std::size_t consumed = 0; while (consumed < length) { BaseType_t pxHigherPriorityTaskWoken; bool isr = halal_IS_ISR(); auto crit = hal
Hello,Trying to learn more about PDM audio capture with the STM32U5 family. Read AN5795 and was wondering if the source code for this application note is available somewhere.Read these already:1) en.STM32U5-Peripheral-Multi-Digital-Filter-Audio-Digital-Filter.pdf (Are there source code showing the example on Sound Activity detection on page 52?) Would be great to be able to replicate the example and graph out the PCM data like in the example.2) AN50273) I am aware of the two ADF projects in the STM32Cube_FW_U5_V1.3.0Thanks!
I'm a bit confused on how to receive data with multiple bytes and store it to some buffer on the stm32 microcontroller?Currently I have a python script that will send the data over uart serial "serial.Serial.write(b'4215'))"Then I have a UART interrupt in my main loop that will capture only the first number but I have not been able to see the 215 when in debugging mode.Just going to write the relevant code below since everything seems to be working right it's just I can't get more than one byte.Any feedback is much appreciated! Let me know if I need to provide more information! uint8_t Rx_buffer[100]; uint8_t msg_r_data[7]; uint8_t rx_indx = 0; uint8_t msg_r_buffer[100]; .... while (1) { HAL_UART_Receive_IT(&hlpuart1, Rx_buffer, 4); ... ... void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { if (huart -> Instance == LPUART1) { msg_r_data[rx_indx++] = Rx_buffer[0]; } }
Hello,we have currently some issues where the I2C bus got stuck (SCL stuck and Ground) until the configured timeout (in the STM32L4) is reached. I was able to reproduce the issue quite often in a stress test setup. Stress Test Setup description:The STM32L4 uses two I2C Channels (Ch2 and Ch4), both as I2C Master in DMA mode on the same bus. In addition, there is an external I2C Master also on the same bus. As an stress test all I2C masters tries to send messages as fast as possible. From time to time, to bus got stuck (SCL stays at Ground) until the configured timeout (in the STM32L4 I2C) e.g. 5ms is reached. After the timeout is reached, everything works again.ObservationThe issue only occurs when both I2C channels of STM32 are active in parallel. For example, when using a software mutex, to make sure only one channel at the time is active, we dont see any issues.In addition, when using a different I2C speed for the two STM32 I2C Channels (e.g. Ch2 in Fast Mode, Ch4 in FastPl
I use the PWM output example code of STM32CubeIDE,how do I modify the duty cycle of the PWM, I can't find a way to modify it
Hi all I tried to implement a tcp echo client application in evaluation board,here I can able to send and receive the data through the tcp socket.am running a tcp echo server from Linux . Whenever am sending data greater than 1460(MSS) am receiving more than 1 packet in client side. suppose am sending 3000 bytes from server side it send the data in 3 packets and need to poll nx_tcp_receive function 3 times to read the data from the queue. Need to receive the entire 3000 data at once is there any method available in Netx to implement this.am taken the tcp echo client example code from st. (Do I need to enable ip fragmentation feature in order to avail this requirement if yes kindly help )with regards
I use stm32h747 mcu and ı want to working usart dma coninious communication. I configurated MPU and I tested basic shape, but when ı connect any devices like vn100 that time UART Over-Run interrupt occurred. my code is below. Please help me. I start this like thatMODIFY_REG(USART6->RTOR, USART_RTOR_RTO, 1);// Set CR2.RTOEN (enable Receiver Timeout):SET_BIT(USART6->CR2, USART_CR2_RTOEN); // <- this was missingSET_BIT(USART6->CR3, USART_CR3_EIE); // <- this was missing// Reset RTOF flag:WRITE_REG(USART6->ICR, USART_ICR_RTOCF);// Set RTOIE (enable RTO interrupt):SET_BIT(USART6->CR1, USART_CR1_RTOIE);if (HAL_UART_Receive_DMA(this->uart_handle, p_rx_data[static_cast<uint8_t>(this->uart_module)], 10) != HAL_OK){return false;} p_rx_data[static_cast<uint8_t>(this->uart_module)] is my buffer.what can I do for this issue
Hello,I am using model STM32H723ZGT6.There is a problem with sampling rate setting in ADC.When testing ADC3, I used the function generator to increase the speed by 1 hz, 10 hz, 100 hz, 1 khz and 10 times each, but it did not work above 100 hz.According to the data sheet, the maximum clock of ADC3 is 75 MHz. The maximum sampling rate of ADC3 is 5 MHz.ADC_Settings1. Clock Prescaler : asynchronous clock mode divided by 12. Resolution : ADC 12-bit resolution3. Continuous Conversion mode : Enabled4. Sampling time : 2.5 CyclesWhat I want is to set the sampling rate of ADC3 to maximum.I would appreciate it if you could suggest a solution.
TCP echo client application running on my STM board and server is run on Linux PC , so here how can I enable the IP fragmentation and reassembly feature in order to transmit/recieve larger chunk of data from my application program to tcp_send/receive functions.in the example code given from ST i didn't see the fragmentation and reassembly part.(tcp_echo_client for stm32 U585)or do i need to do manual reassembly in the case of large amount of data(larger than the specified MTU size).
Please give a reason on the following issue.1. While reading the NAND memory ID, the status of the NAND memory is coming as READY. Even without NAND memory also the same is coming. What would be the reason?2. "hnand-> state " how this state is fixing by the NAND memory controller.Thanks in AdvanceABIN
Hello,I am working on a custom PCB with STM32H753 microcontroller and an External NOR flash memory to which I am accessing via FMC interface @ 0x60000000.I have a secure boot (SBSFU) running on the internal flash of the uC and my application executes on the External NOR flash to which I am jumping to from the secure boot. My architecture is to use a section of the External NOR flash (Top 4MB) for execution of my application (Active slot) and another section of the same NOR flash (next 4MB) as a storage space for some raw binary data (Download slot).If I use a programmer like ST-Link V2 and write to the Download slot through a tool such as STM32CubeProgrammer, the Secure boot detects it and swaps it to the active slot, thereby executing it subsequently.My problem is this:I am trying to use my running application in the active slot to receive binary from outside (via Ethernet) and write to the Download slot by using HAL NOR program function. Here, I am facing some random behaviour where
..
I am planning to do a Over the air update for a tool.And I'm planning to use a stm32l431cc ultra low power MCU with one flash bank.So here we have an application which is some 100kb.I'm confused with lot of terms.OpenBootloaderIn application programmingCustom Bootloader.Default bootloader by stm32 in System memory.etc.Can you clarify these word's.I want some idea where in i can flash my new software to some flash sections,take backup of old software.Then move the new software to old software's location.is this possible?
I am porting ILI9341 code from Keil to Cube MX.The original code contains: void LCD_WR_REG(vu16 regval) { regval=regval; //ʹÓÃ-O2ÓÅ»¯µÄʱºò,±ØÐë²åÈëµÄÑÓʱ LCD->LCD_REG=regval;//дÈëҪдµÄ¼Ä´æÆ÷ÐòºÅ } vu16 seems to be __IO uint16_t i.e. volatile uint16_tmy question: regval=regval; seems obsolete code, but as the driver code seems to be written by somebody that knows what he or she is doing, I wonder what the reason behind this statement would be?
I see these in the linker scripts, but I do not see them in the output for a C application.I know eh_frame is for C++ exceptions, and it is not strange it is not in the output of the C application. I also read it is used for some C functionality as well. Can these functionality be used in embedded platforms (without an OS) ? Can I ever see eh_frame in a C build output ?I thought init and fini is only for processes and shared objects. Neither is in a C project, are these used for anything else ?
Hello! I am trying to build a simple project on STM32G431KBTx featuring USB PD.I am using STM32CubeMX (latest version), all libraries, etc. are also of latest revisions. I've setup USB PD parameters via GUI, and generated code for Makefile.When I call Make, I get these errors: /lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: build/main.o: in function `main': ~/other/Core/Src/main.c:149: undefined reference to `USBPD_DPM_Run' /lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: build/stm32g4xx_it.o: in function `SysTick_Handler': ~/workspace/other/Core/Src/stm32g4xx_it.c:192: undefined reference to `USBPD_DPM_TimerCounter' /lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: build/usbpd.o: in function `MX_USBPD_Init': ~/other/USBPD/App/usbpd.c:44: undefined reference to `USBPD_DPM_InitCore' /lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: ~/workspace/other/USBPD/App/usbpd.c:58: undefined reference to `USBPD_DPM_InitOS'
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.