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 set all GPIOB ports as outputs and have an adjustable resistor on port PA1 which I’ve set as an analogue input to do an adc conversion to display a voltage output to three seven segment displays with each segment being connected from PB0 to PB6 however it seems my port B pins are not outputting a voltage of 3V when set to high. All ports are set as pull downs internally. What could be the reason for this?
I need to implement formatting of various media like SD cards or USB disks.With FATFS it was brain dead easy, it just worked without asking for the my shoe size and ultimate answer about universe and everything. With FILEX I need to provide just all binary data for the formatted media that I just don't know and don't even know how to get it.Let's say that sectors per clusters are typical values for various FAT systems, but the total number of sectors? Just how should I get it?I'd guess it should be obtainable by the driver, but how? I mean, total number of bytes would be fine, but how do I get it for media like SD cards and USB disks?Number of heads? What? I'd guess 1 for all types of solid state devices.I'm implementing a format function like this:`virtual Status format(Media& media, const char* volumeName, MediaFormat fs = MediaFormat::ExFAT) = 0;`Where fs can be FAT12, FAT16, FAT32 and ExFAT.How to use `fx_media_format()` and `fx_media_exFAT_format()` to just format USB disk and
I need to make a change to the library file usbd_hid.c under the Middlewares/ST/STM32_USB_Device_Library/Class/HID/Src directory. I can do this and it changes the local copy, but regenerating the code overwrites the changes I make to it. I don't want to change the original library file, but I would like to be able to substitute the modified file without the trouble of resaving a modified copy to the above directory every time I regenerate code. Is there a simple way to do this?
HelloUsing internal adc for sampling the Analog signal of voltage 300mV.The output of ADC on plotting has noise. On increasing the voltage the the waveform gets clearer. What could be the reason and how to overcome it?
Hiwith STM32H563ZI, (nucleo-h563) I work on freertos + tcp, when I try to make flash operation like erasing software goes NMI handler, but if not making erase just make flash_program it doesnt fail, because of I couldnt erase the sectorsi I cant program flashthis happens if I work in a rtos task, if I make without rtos it works fine,Why this goes NMI handler in working task??
Hello :)For my university project, I need to build a drone. I've never done anything like this before and could use a bit of a jumpstart.I have a Mateksys F405-TE flight controller that I'm supposed to use to control the drone.To test it, I created a project in CubeIDE and tried to control the LEDs on the board. During debugging, I encountered the error message "Could not connect to J-Link" or "No ST-Link detected..."I had worked with an original STM F4 board and an extension board before, and it just worked.What would be easier and more preferable for me in this project is if I could model the controller in Simulink and then generate the code.I know there are support packages for STM32 in Matlab. Therefore, I also created a model to control the LEDs. The build was successful, but it did not find a "Target Device" or something similar.Now I am completely clueless about how to approach this. Does anyone have any ideas?
Hi,I try to write and read from flash on stm32wb10cc but when i try to write by HAL_FLASH_Program function i received 3 errors in FLASH Status register:1. Programming alignment error2. size error3. Programming sequence error my code is: on the main:uint64_t data2[] = {0x44444444,0x55555555}; uint64_t Rx_Data[30] = {0}; Flash_Write_Data((FLASH_END_ADDR - (FLASH_PAGE_SIZE * 150)) - 1 , (uint64_t *)data2, 2); the Flash_Write_Data function is:uint32_t Flash_Write_Data (uint32_t StartPageAddress, uint64_t *Data, uint16_t numberofwords){ static FLASH_EraseInitTypeDef EraseInitStruct;uint32_t PAGEError;int sofar=0; /* Unlock the Flash to enable the flash control register access *************/HAL_FLASH_Unlock(); /* Erase the user Flash area*/ uint32_t StartPage = GetPageIndex(StartPageAddress); /* Fill EraseInit structure*/EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;EraseInitStruct.Page = StartPage;EraseIni
Hello I'm developing a TCP client for STM32F4 MCU.I'm using the LWIP sockets api and freeRTOS to do so.This client will both send and receive data when triggered by RTC (every hour or so) and based on an ADC reading.My understanding is both sockets and netconn api's are based on state machine so they need to run in a different thread than MX_LWIP_Init() so after this function is called I am creating a thread that communicates to my server application.I initialise the thread with xTaskCreate(TcpThread, "TCP", 128 * 4, NULL, osPriorityNormal, &tcp_thread_id);In this thread I am creating, connecting writing and closing the socket and checking for errors for each with UART as one should do.After this I delete the thread with vTaskDelete(NULL).I then create the thread again 5s afterwards by calling osDelay(5000).The application seems to run fine but crashes anywhere from 24 to 1100 connections without showing errors over UART.Is there something wrong with my implemen
Hello everyone, Here i'm trying to implement USB CDC FS on STM32F107VCT6 using Standard Library(without HAL Library), but when i am trying to initialize clock for USB (RCC_APB1ENR_USBEN) its showing error that this register is not available for Connectivity line devices. can anyone guide me how can i implement it. Thanks in Advance,
Hi,I use a STM32F767 Nucleo-144 board with a STM32F767ZIT6 processor.With CubeIDE I configure SPI1 as I2S1 input and pump the data via DMA2/Stream0 in a short 8x16Bit circular buffer. The clock of the SPI1 is at ~ 3MHz .I set up the HAL_I2S_RxHalfCpltCallback() and HAL_I2S_RxCpltCallback() routines. In both routines i toggle a GPIO and get a ~23.8kHz square wave. This all works as exspected. But: The square wave suffers from a big jitter. First, there is a constant jitter in the range of 100ns. Second, sometimes the duty cycle (not the frequency) of the signal changes by ~330ns for some parts of a second. 330ns ist the reciprocal of my 3MHz clock.How can I get rid of the jitter? I tried to slim down HAL_DMA_IRQHandler() to the necessary parts for my use case. That did not affect the jitter. I also changed the NVIC priorities with no effect.How can I get rid of the jitter?THXCheersDetlef
Hello I am trying to work with Microseconds delay in my codeso follow this very help full post on web POSTand I configure TIMER 3 ( I have also check with all available timer )But unfortunately, it doesn't work for my STM32GO3O MCU /* USER CODE BEGIN 0 */void delay(uint16_t delay){__HAL_TIM_SET_COUNTER (&htim3,0);while (__HAL_TIM_GET_COUNTER(&htim3)<delay);}/* USER CODE END 0 */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_6); delay(50); } I don't have any external crystal oscillator attached ..I used pin PA6 to debug the pulse output on the oscilloscope. but PA6 not changing the state. please help how can I able to work with microseconds delay in STM32G030
Hello!I'm using the DISCO-L072CZ-LRWAN1 board and have some trouble using the low power modes.It seems whenever i enter the low power mode, it immediately wakes up again, I've tried following a few of the guides and can't see what I'm doing wrong. The board steadily draws 45-55 mA from my power supply, and i would expect it to be a lot lower.I generated a project for the board from MxCube and using CubeIDE, the project is empty except for the init functions and the code below.Am i missing something here??This is my code: RCC->APB1ENR |= RCC_APB1ENR_PWREN; // Configure MCU low-power mode for CPU deep sleep mode PWR->CR |= PWR_CR_CWUF; // Clear wakeup flags PWR->CR |= PWR_CR_PDDS; // 0 = Stop mode, 1 = Standby mode PWR->CR |= PWR_CR_ULP; // V_{REFINT} is off in low-power mode (void)PWR->CR; // Ensure that the previous PWR register operations have been completed// // Configure CPU
Hello, I have created a project about eth http as a server as well. stm32h750b-dkI have created a web page. Then I wanted to develop the ability to connect to the phpmyadmin database. I tried writing code with html and javascript (the reason I used javascript was because I couldn't use php), but I couldn't succeed. I can't attach the file because it contains a code to log into the company's database. But if you want to see another part of the code, I'm happy to send it to you.Another way is to let the microcontroller use the database connection library itself. I'm not sure if I should use this method. Because there is no clear example.The main goal is to create something similar to Blynk that allows data to be sent and received. The main server for controlling outside the LAN. But I can't find any information that fits the purpose.There is an interface page for controlling and turning into a web service.With great respect
Hello everyone, I recently came across a subject at the university in which we programmed a discovery board. Normally what we did was configure the peripherals with the CubeMx, then we added some libraries for sensors to the project, and we programmed what we wanted it to do. The thing is that we always copied things already done in other example projects and modified it.I what to learn to program the STM32 from scratch and not depend on files already written by other people. I have knowledge of digital electronics, I know how microcontrollers work in general terms. I know how to program in C and I'm looking at some programming books on ARM CortexM microcontrollers.What books, courses, websites, etc... do you recommend I look at? I would like to not depend on the STM32CubeIDE to be able to program the microcontrollers. I aslo wouldn't like to depend on existing files. I want to programe it from scratch.Thank you very much in advance!
Hello,I am trying to debug the dual core STM32H747IGT6. Debugging of the CM7 core is always successful but the debugging of the CM4 core has the below errors. Some of the times the first error appears and some other, the second error appears:First Error:Failed to read ROM table via AP 3Error in initializing ST-LINK device. Second Error:non-ADIv5 ! (should not occur with STM32 devices)Error in initializing ST-LINK device.Reason: ST-LINK: Could not verify ST device! Abort connection. I couldn't find a solution for either of the problems. Any help will be appreciated.
Hey, Im trying to use interrupts from UART DMA and SubGhz with STM32WLE5CCU. I noticed that I don’t get interrupts from both when I don’t define delay time between the configurations. The current code:MX_GPIO_Init();HAL_Delay(25); // because of bugMX_SUBGHZ_Init();MX_DMA_Init();HAL_Delay(25); // because of bugMX_USART2_UART_Init();…. without that HAL_Delay command I won’t get interrupts from UART and SubGhz?I already tried to reduce the delay time to 10ms and it doesn’t work. does anyone familiar with this bug and knows how to solve it? THANKS!
Hi,I have a problem with the SRAM. I use a stm32f303CCT and Keil. I write a value in the SRAM memory. (0x20000000 - 0x20000008) However, after a soft reset, the SRAM value will be deleted. How can this be prevented so that the data is preserved?The data is stored as shown in the image below.After soft reset the SRAM is deleted.What do I need to change in the Patter File or the startup File so that the data is not lost?Thank you for help
Hi,I have a ready-made hardware and the hardware has dp83848 chip on it.I made ethernet communication with udp on stm32h7 .I can not choose a chip out of lan8742 on cubemx.is there anyone who can guide on this?
Hi Community, I'm in a process to combine the SBSFU and Application file into single intel hex using srec_cat.exe doesn't work.srec_cat Application.sfb -binary -offset 0x08010000 -o APP_Offset.hex -intelsrec_cat STM32G0B0RE_SBSFU.hex -intel Application.hex -intel -o Combined_App.hex -intel Combined_App.hex always executing in bootloader and not jumping to application after several power cycles. Is it because of encryption/signing?Can anyone suggest better approach to deal with this?
Hello, I am trying to record MEMS microphone data using STM32F4-DISC board. I used BSP and CMSIS-DSP libraries to gather data and calculate FFT of recorded signal. I save my recordings in static q15_t TempBuffer[2048]; and I want to cinvert this buffer to float32_t type to pass it to arm_rfft_fast_f32() func. I was trying to use this function arm_q15_to_float(TempBuffer, TempBuffer_f32, 2048); but the results are way off. TempBuffer values are going from 3276 to -3276 but after converting it to float, I get very large values (around 100000 larger), and after calculating FFT I get very large FFT amplitude values. I try to record Sin wave of a 1Khz. In TempBuffer I can see fluctating values, but FFT doesn't show any peaks. Any ideas how to correctly should I convert data? I will add code where all the conversion is taking place:#define TEMP_BUFFER_SIZE 2048 //Signal buffer for one channel #define PCM_OUT_SIZE 16000/1000 #define INTERNAL_B
I am using STM32H747i-DISCO board, I am trying to configure external SDRAM and board is having IS42S32800G-6BLI external SDRAM. But it will show hard fault error. Below shown code will be my configuration.void MX_FMC_Init(void){/* USER CODE BEGIN FMC_Init 0 *//* USER CODE END FMC_Init 0 */FMC_SDRAM_TimingTypeDef SdramTiming = {0};/* USER CODE BEGIN FMC_Init 1 *//* USER CODE END FMC_Init 1 *//** Perform the SDRAM1 memory initialization sequence*/hsdram1.Instance = FMC_SDRAM_DEVICE;/* hsdram1.Init */hsdram1.Init.SDBank = FMC_SDRAM_BANK2;hsdram1.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;hsdram1.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_13;hsdram1.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_32;hsdram1.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;hsdram1.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_1;hsdram1.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;hsdram1.Init.SDClockPeriod = FMC_SDRAM_CLOCK_DISABLE;hsdram1.Init.ReadBurst = FMC_SDRAM_RBURST_DISABLE;hsdr
Hi dear friendsI am controlling a current source DC-DC converter using a stm32g474 microcontroller. I am using all 6 HRTIMs to generate 12 PWM signals for my 12 switches. My converter has different operation modes and in each one, these 12 timers have their compare value register (CMP) values and different phase shifts relative to each other. The problem is that when transitioning from one mode to the next mode, these compare values and phase shifts must change and among this mode change, the HRTIM outputs give arbitrary signals for 3-4 switching cycles. This means that the switches do not receive correct modulation signals and transistors burn. How I can control the HRTIM outputs exactly cycle by cycle when a flag for mode transition becomes high and gives the order for mode change? I must mention that the converter is a current source converter and I cannot switch off the timers for some cycles to reconfigure them and turn them on. It will burn all the transistors. I need to cha
Hi STM team, We are using the stm32L476ZET6 microcontroller and developed our custom-embedded device, which operates on the backup battery (4.4V) as well as on an external constant DC (12V) supply. So far, we got good results for our business use case with this stm32L476ZET6 microcontroller. Recently we observed one of the blocker issues in the long run and it is affecting our field deployment, hence this issue is a very critical issue for us and we need your quick support for the same. Background : As per our business use case, if the user removes the external supply then our device runs on a backup battery (4.4 V) for a few defined minutes and then goes into deep sleep mode. So we have defined a few wake-up events to wake the device and report the data to the cloud. This way our device runs in the long run on a backup battery. Problem Statement : Recently,
hello everyoneUsing the internal ADC(polling method) of the stm32f429 board the samples that im getting are too many for one cycle of analog inputhow to reduce the samples without giving a delay, like if I want 128 samples for one cycle.Vin is 300mVAPB2 is 90MHzClock Prescaler is PCLK divided by 4Resolution 12 bitSampling time 3 cycle
Hello, I want to convert the ADC value into voltage. Using internal ADC1 in stm32f429-disc1 boardThe input voltage applied to channel 1 is 300mVAPB2 is 90MHZClock Prescaler is PCLK2 divided by 4Resolution is 12bit(15 clock cycle)Sampling time 3 cycleWhat will be the Vref and how to get to know the voltage? Thank you.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.