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 First of all, merry christmas to all of you. As I got a little spare time between the years I'm thinking about a STM32 project again. I'm wondering if there's a best practice for one hex file supporting several hardware configurations. The configuration could be set by reading a config file or by checking IDs from each peripheral.To be clear: the STM32 MCU is the same for each configuration. I'm thinking about supporting different GNSS-, Display-, WiFi- Modules etc. Having one library for each component (e.g. display module) calling the correct method for each driver IC (e.g. ST7789V instead of a ILI9488).To make life's of consumers and me as a "sw provider" easier, it would be great to provide one hex only that supports every possible hardware composition. First approach coming to my mind is to check the config file at boot, setting a flag which then is used in the libraries to differ between display IC A or B respectively the methods.But I guess there's a better
Hello, I am trying to port an existing network application which runs on a Linux device to the B-U585I-IOT02A board. (MCU is STM32U585AIIxQ.) I need to use the on-board MXCHIP Wi-Fi and mbedTLS. I think I need to use LWIP and FreeRTOS as well. At the lowest levels, it's using sockets for the network connections. There does not seem to any examples for this board which use this combination of drivers and middlewares (i.e. Wi-Fi and sockets). I've managed to cobble together a project that includes the Wi-Fi (based on the "IOT_HTTP_WebServer example. The MXCHIP connects to the access point, gets an IP address, etc.), includes mbedTLS, and FreeRTOS, but I can't actually compile / link the socket code. The missing functions are mbedtls_net_connect(), mbedtls_net_recv(), mbedtls_net_send(), and mbedtls_net_free(). I've seen these functions implemented in net_sockets.c in STM32 examples for other boards, but they are platform-sp
I have a code for the stm32f334 where I have an interrupt routine and a DMA transfer triggered by the same timer. In the interrupt routine the DMA rolling buffer is updated. Because this update is time consuming, I want to optimize the time spent in the routine. What I found out is that when placing any variable used as array index in .ccmram (for example "HRTIM_Buffer[buffer_index+i ] = some data", with buffer_index being a global variable placed in .ccmram), the code result in IMPRECISERR Hard Fault. Is this expected behavior? Or am I doing something wrong?
Hi to everyone.I have created an new project and didnt change anything.i just debug the code but i am always getting an error like this C:/ST/STM32CubeIDE_1.14.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file C:\Users\Onur Yağcı\Desktop\STM32 PROJECTS CUBE\STM32F401CB3\STM32F401CBUX_FLASH.ld: No such file or directorycollect2.exe: error: ld returned 1 exit statusmake: *** [makefile:88: STM32F401CB3.elf] Error 1"make -j16 all" terminated with exit code 2. Build might be incomplete. 13:06:18 Build Failed. 2 errors, 0 warnings. (took 801ms) How we can solve? Thanks
Hi.I always get en error like this when ı always create a new project on stm32cube ide and debug the code How can i solve it?
I want to implement mqtt on stm32h7. For that I want to use lwip, when I was checking the lwip folder I can see there is mqtt related files in the app folder. Does any one have example code based on that?And which one is the better option to go with, paho mqtt or lwip mqtt ?
I'm new to this STM32 world and I'm actually trying to use the LCD on board STM32H747I-Discovery. I've search for the documentation and drivers but I didn't find any information how to use LCD. Also, I want to try wiring B-CAMS-OMV to display on LCD but I didn't find any further information about that on the drivers too. I'll appreciate if anyone else can help me with this problem.
Hi! If I have a running FreeRtos task that for example is sending data with SPI, will ILDE event (callback) from uart dma affect the SPI? If so how to prevent this and at the same time dont lose data from uart?
Hi everyone,I'm trying to open an image as a .csv or .bmp file in STM32CubeIDE. I've already tried different ways of reading the file but none of them would actually work. When I build the project the output gives no errors but when debugging, the file seems to be NULL. Should I add the .csv or .bmp file to the Src folder?How should I import a .csv format file?B.t.w, this is the code I wrote to open the file:Thank you all in advance.
Board: Custom board with STM32F105RCT6At first, I am able to Jump to internal bootloader while running the application code from SRAM and further able to connect STM programmer using UART interface. At this time the RDP flash protection was not enabled.void JumpToBootloader(void) {void (*SysMemBootJump)(void); volatile uint32_t addr = 0x1FFFB000; HAL_RCC_DeInit(); SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; __disable_irq();
File stm32f4xx_hal_nand.c has changed in version 1.27.0 of the STM32CubeF4 package, but nothing is mentioned in the release notes. Also, in version 1.26.2, there was a 2017 copyright in the file, while in 1.27.0, there is a 2016 copyright. Is there any regression on this file?
I'm trying to write some data to a address in the flash memory of the above mentioned chip. However the Erase doesn't seem to work. void writeToFlash(uint32_t address, uint64_t data, uint64_t data2){ // Unlock the Flash Program controller HAL_FLASH_Unlock(); // Setting Up the Erase FLASH_EraseInitTypeDef EraseInitStruct; EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES; EraseInitStruct.Banks = 2; EraseInitStruct.Page = 127; EraseInitStruct.NbPages = 1; // simple function only sending 8 Bytes at the time. uint32_t pageError; //Erasing specific part of memory HAL_FLASHEx_Erase(&EraseInitStruct, &pageError); //Programming the flash, last adress of the second Bank! HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, data); HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address + 0x08, data2); //Locking the flash back up HAL_FLASH_Lock(); } In the main I'm calling the following: writeToFlash(0x0807FFF0, 0x00FFFFFF9A6410AC, 0x00000000016410AC
Board :- Custom board with STM32F105RCT6Description :- I am trying to Jump to internal bootloader when Option Byte for Read Out Protection is set to 1 (RDP Level 1).When I am jumping to internal bootloader by Disabling the Read out protection I am able to Jump to SRAM and able to bootloader over UART and I can read the Device memory. When I am jumping to internal bootloader Enabling Read out protection then I am not able to Jump to SRAM and not able to bootloader over UART and it is asking for Disable the RDP and try again. After that again I am jumping to internal bootloader and Disabling the Read out protection by software (mention below) after that also I am not able to Jump to SRAM and not able to bootloader over UART and I cannot read the Device memory.void __attribute__((section(".RamFunc"))) JumpToBootloader(void) {
For hardware products, ST provides longevity commitments for several products( https://www.st.com/content/st_com/en/about/quality-and-reliability/product-longevity.html#7-year-longevity) Does ST publish any maintenance plans, commitments or End of Support timelines for HAL software libraries?
Hello Team, I am using DMA in ADC as FIFO mode in NUCLEO-H745ZI board. Tried to configure FIFO mode for DMA, unable to configure. Can you provide details for FIFO configuration. Regards,Gagan Gowda
HI,MCU :STM32L010R8TxPower Mode : Shutdown ModeWake Up Sources : RTC WakeUp, External WakeUp Pin 1 , External WakeUp Pin 2. Reading Boot reason by checking one by one using __HAL_RCC_GET_FLAG(Flag).And Able to detect Standby Wakeup. But How to know the source of wake Up whether it is caused by wakeup Pin or RTC ? _Nikhil v v
hi,I want to receive using DMA on STM32H563ZIThe packet size in not fixed. So i plan to receive first two bytes using HAL_UART_Receive_IT.Once i get the Length Information I can start reception using HAL_UART_Receive_DMA.If i need to receive 10, bytes then i supply the 20 in Receive DMA function so that i get HT callback, at this point i already have complete data and i can trigger again for Receive_IT till i get length information for next packet.Currently when i get the HAL_UART_RxHalfCpltCallback, i see that only the last byte of intended buffer is received.for example if i'm starting DMA for 10 bytes [ 44 49 07 04 00 00 08 5C 54 03], passing 20bytes in Receive_DMA callthen in the HAL_UART_RxHalfCpltCallback i get only the last byte 03.Also i want to implement Idle line interrupt so that i can use the call back HAL_UARTEx_RxEventCallback, but there is no code generated for HAL_UARTEx_ReceiveToIdle_DMA. How can i over come this situation.Is th
Hi, ı have a question about flash size difference between STM32F107RB nd STM32F107RC. Documentation says that stm32f107rb has 128kb flash memory and stm32f107rc has 256kb flash memory size. DOCUMENT NUMBER:PM0075 says that STM23F107 are connectivity line mcu and it has 128 page with 2kb memory on page number 9 of document. When ı calculate, it makes 256kb with 128 page with 2kb. I am using STM32F107RB and ı tried to write to last page which is page 127 starts from 0x0803F800. I have succesfully write and read something from this address without any problem. But how can it be possible? Stm32f107rb has 128kb memory there should be maximum 64page with 2kb page size. There should be something, could you please help me about this issue ? If stm32f107rb has 128kb flash memory, how can it be possible to write and read from 128.page which is 2kb flash memory ? there should not be any page after 64.page for stm32f107rb ?
I am casting a Byte array (results from ADC) to a long, but occasionally - about 1:100000, it get the sums wrong. I've got to the line in the code where it goes wrong, and it is when it is casting a byte array to a long (I use union Method). //Signed ADC Value - so 24-bit value can be shifted in union { uint8_t b[4]; int32_t l; }I32ADCValue; //Populate the Raw mV Array for(i=0;i<8;i++)//Loop for each channel { I32ADCValue.b[3]=ads1298rData.ADCMsg.Channel[i][0]; I32ADCValue.b[2]=ads1298rData.ADCMsg.Channel[i][1]; I32ADCValue.b[1]=ads1298rData.ADCMsg.Channel[i][2]; I32ADCValue.b[0]=0; //Channels are not in sequence - create temporary array here. mVx[i]=(I32ADCValue.l*Gain_mV); } When I run the debugger, it is having too bit a blue in I32ADCValue.l - in fact where I set .b[0] to 0, it is not after it has cast it.....any clues?
Hello,I created the STM32H735G-DK project with the board selector in STM32CubeIDE.The OSPI_HyperRAM_MemoryMapped project was created by the example selector. Its HyperRAM configuration register read codes were added to the STM32H735G-DK project as below. Writing data and reading data from the HyperRAM array work fine. However, both CR0 read and CR1 read returned INVALID_SEQUENCE error as below. Please help me to solve this problem.Thanks. S70KL1281_CR0_ADDRESS = 0x00001000HAL_OSPI_HyperbusCmd: ErrorCode HAL_OSPI_ERROR_INVALID_SEQUENCEError from HAL_OSPI_HyperbusCmdRead CR0 ERRORS70KL1281_CR1_ADDRESS = 0x00001002HAL_OSPI_HyperbusCmd: ErrorCode HAL_OSPI_ERROR_INVALID_SEQUENCEError from HAL_OSPI_HyperbusCmdRead CR1 ERROR if (S70KL1281_ReadCfgReg0(&hospi2, &reg) != S70KL1281_OK) { printf("\n\r"); printf("Read CR0 ERROR\n\r"); printf("\n\r"); } else { printf("Read CR0 = %08lx\n\r", reg); } if (S70KL1281_ReadCfgReg1(&hospi2, &reg) != S70KL1281_OK) { pr
I am using Netx secure for TLS implementation.here my requirement is to establish a TLS connection with mutual authentication (client and server).I am able to establish the proper handshake with Mutual authentication but the problem is when I try to authenticate the client with chain of certificates (one client certificate + 2 intermediate certificate) when I’m using only client certificate for the authentication the handshake is happening successfully. But when I’m using 2 certificate handshake is failing. Here I’m using nex_secure_tls_local _certificate _add In order to add client certificate and intermediate certificate. Here I’m concatenating client certificate and intermediate certificate and passing through the above mentioned Netx api. Please suggest proper implementation method to establish client authentication.
Hi,I'm trying to debug new thread ftd project. You can find my settings below: - HSEM - IPCC - RCC -> HSE/LSE - SYS -> Serial wire - RTC - LPUART1 & LPUART1 DMA - USART1 & USART1 DMA - RF - STM32_WPAN as a THREAD When I debug it, It gives me a lines of errors. You can find my errors below: 09:29:52 **** Incremental Build of configuration Debug for project Thread_FTD **** make -j12 all arm-none-eabi-gcc "../Core/Src/stm32wbxx_hal_msp.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32WB55xx '-DOPENTHREAD_CONFIG_FILE=<openthread_api_config_ftd.h>' -DTHREAD_WB -c -I../Core/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc -I../Drivers/STM32WBxx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32WBxx/Include -I../Drivers/CMSIS/Include -I../STM32_WPAN/App -I../Middlewares/ST/STM32_WPAN/thread/openthread/stack/third_party/mbedtls/repo/include -I../Utilities/lpm/tiny_lpm -I../Middlewares/ST/STM32_WPAN -I../Mid
Hi, I am trying to measure the Vref+ voltage using the ADC on the STM32G031K8. I looked at the latest datasheet saying that the VREF CAL value is the memory adress given below. So, when I run this code through the debugger,1.) It gives me a hard fault handler on the dereferencing of the VREF_CAL pointer. 2.) When I remove the dereferencing code, the program runs without the hard fault handler. Can anyone please explain this or assist with this problem ?. As the supply voltage in my application varies and an accurate ADC is of critical importance and safey. Thanks, Daniel
I am Interface the External FLASH memory with STM MCU.As per Data sheet All command Implemented on Software But what next i can do not understand.Can You please suggest me any example code of External FLASH Memory with STM MCU using SPI communication.(is either free rtos or barmetal ). RegardsYash
Good morning everyone,I'm at my first experience with STM and between guides and tutorials I'm learning many things.But I wanted to configure a 32bit TIM5 timer on my STM32F446 board, I would like my timer to calculate a sample every 0.000001s, only if I configure the timer I expect 1000000 samples to correspond to a second, but the timer output seems different .Additionally if I configure the timer to 0.00001 sample at 100000 samples it gives me the correct result per second.For the TIM5 calculations I ran Prescale 1 and Overflow at 41 with 84MHz sampling time, it doesn't work.Conversely, if I set OverFlow to 419 I can get the correct timer but with fewer samples.I need a sample every 0.000001s, where am I wrong?I hope I was clear enough, happy new year to all of you.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.