Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi, I am running firmware for USBX MSC device. The example project "Ux_Device_MSC" on demo board STM32U575I-EV. MSC device is enumerated on computer and FATS file system is used. It can transfer file from computer to storage on STM32U575I-EV. I am trying to figure out the following parameters. 1. how many times the following function in source file "ux_device_msc.c" is called when transfer a large file UINT USBD_STORAGE_Write(VOID *storage_instance, ULONG lun, UCHAR *data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status) { UINT status = UX_SUCCESS; /* USER CODE BEGIN USBD_STORAGE_Write */ UX_PARAMETER_NOT_USED(storage_instance); UX_PARAMETER_NOT_USED(lun); UX_PARAMETER_NOT_USED(media_status); ULONG WriteFlags = 0U; /* Check if the SD card is present */ if (HAL_GPIO_ReadPin(GPIOI, GPIO_PIN_0) == GPIO_PIN_SET) { /* Check id SD card is ready */ if(check_sd_status() != HAL_OK) { Error_Handler(); } /* Start the Dma write */ status = HAL_SD_WriteB
Nucleo-H753ZI board. ADC1 configurations: INPUT: SINGLE-ENDSample clock rate = 5MhzSample rate = 10Khz,Sample Time = 16.5 cycles,Resolution = 12-bitScan 256 timesConnect the defined two ADC input channels to GND.The 256 readings FOR EACH INPUT are varied between (-15 - +15), more or less, while they should be read as zeros.Question: Can it be fixed How to fix it?Could you do the same test to confirm it?Thanks, Rong
Hello, I am quite new to this. I am generating a PWM signal(100Hz with 40% duty cycle) using Tim1 on my stm32f103c8t6(Bluepill). I want to take ADC readings(both ADC1 and ADC2 in simultaneous mode) during the high part of the PWM signal at a frequency of 1KHz. I want to understand how many timers would be required for this. Currently I am trying to use Tim2 set at 1KHz and trying to trigger it using the TRGO of Tim1. Then I am using TRGO of Tim2 as external trigger conversion source for the ADCs. However as far as I know for Tim1 PWM signal I can only get an interrupt for either when the signal start(Update Event) or when it goes from high to low(Output Compare). How can I get both interrupts so that I can start and stop Tim2.Any help would be appreciated.TIA
I have developed code (on the NUCLEO-L433RC-P) that uses shutdown and wake.The code works when I debug or run, but it stops working after a cold restart (power removed then reconnected).After a cold restart, the software runs correctly until the first shutdown is called. Once shutdown is called, it seems to crash and I have to perform a reset.From power up, the MCU should run as follows...Run for 10 secondsShutdown for 5 secondsRun for 10 secondsShutdown for 5 secondsAnd so on.....This cycle should continue until 60 seconds is reached, when it should shutdown and stay shutdown.It should not wake again until the WKUP pin is pressedWhy does it seem to crash after the first shutdown (step 2 above) ?I am aware that RTC backup registers are lost when power is removed, but I cannot see this causing the problem.I have attached a flowchart diagram (wake_shutdown.png) to show how my code works.The relevant code is also belowmainMX_RTC_InitwakeConfigResetwakeConfigUpdatemcuSleepm
Greetings, I am trying to do a POC of LVGL migration to the STM32N6DK, https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/STM32N6570-DK/Examples/BSP For the POC i tried porting the LVGL into FSBL example above, but I ran into memory overflow issues. So for the next step, I cloned and tried to port the drivers and dependent files into this repo's application project: https://github.com/stm32-hotspot/STM32N6_FSBL_Modes/tree/main In this I was able to display just the initial screen util clear screen function and then it crashes in the dma2d buffer transfer section, most likely the DMA2D CE bits were not being set and the timeout is not triggered because the hal tick fails and it is stuck in the while loop. Either way, I am unsure of the best approach, my goal is simple, to get a barebones LCD and touch working in the application region and link it with LVGL library to do the UI for my POC. Could anyone please guide me to get the fastest approach to getting th
Hello,I'm currently preparing the firmware for a USB NFC reader (CCID). I'm working with the STM32F103 MCU and the ST25R3916 NFC reader.The STM32F103 MCU is programmed on a CCID USB device using the CCID USBD driver provided by STM32. The MCU acts as the mediator between the computer and the ST25R3916 NFC reader. It takes the APDU command sent by the computer and transfers it to the NFC reader, and takes the NFC reader's response and transfers it to the computer using the SC_Itf_XferBlock() function.The STM32F103 MCU supports usb full-speed, this means that the maximum amount of data to be transferred to the computer is 64 bytes. If you want to transfer data larger than 64 bytes, you transfer it using chunk-by-chunk methods.To transfer 253-byte data, the splitting is as follows:5 chunks: chunk 1 (54 bytes of data with 10 bytes of header), chunk 2 (64 bytes of data), chunk 3 (64 bytes of data), chunk 4 (64 bytes of data), and chunk 5 (7 bytes).The issue is that when I try to transfer 25
Subject: Request for Feedback on STM32F405RGT6 Minimalistic Development Board SchematicHi everyone,I'm currently working on building a minimalistic development board based on the STM32F405RGT6 chip. Since I couldn't get access to a Discovery or Nucleo board for this particular MCU, I decided to design my own.I'm still quite new to PCB design and only have a basic understanding so far. With limited knowledge and some reference from other designs, I managed to put together a schematic for the board. My primary goal is to upload firmware using DFU (Device Firmware Upgrade) mode.Before I proceed further, I’d really appreciate it if someone could review my schematic, point out any mistakes, and suggest improvements. I want to make sure everything is correct before moving to the PCB layout stage.Thank you in advance for your support!
Hi allI am facing some issue related to measurement of VREFINT and VBAT which is IN17 and IN18 respectively,My ADC1 configuration is 12 bit resolution, 3cycles sample, one shot and software conversion.I ran few tests as follows1.vref which is 2.95 (VDD) and vin is selected as channel IN17 and I am getting 414 in my DR register. (vrefint bit is clear in CCR)2.vref which is 1.21 (VrefINT) and vin is selected as channel IN17 and I am getting 1702 in my DR register. (vrefint bit is Set in CCR)3.vref which is 2.95 (VDD) and vin is selected as channel IN18(VBAT) and I am getting 420 in my DR register. (vrefint bit is clear in CCR).4.vref which is 1.21 (VrefINT) and vin is selected as channel IN18 and I am getting 1679 in my DR register. (vrefint bit is Set in CCR).help me where I am wrong.B.R
Hi,I have SBSFU working with my HW, which has a STM32U585, with some (minor) modifications to the B-U585I-IOT02A example. I also have an application that I need to run with the secure bootloader (as the nonsecure app), developed by a wider team (lets call this our "user" app). This was developed to date without trustzone being enabled. I can get the user app to begin to boot with the secure bootloader (so signing, addressing, startup, etc. are all OK). However, the user app runs out of RAM before doing anything useful, so I need to assign more RAM to the nonsecure app. As far as I can see the U5 SBSFU example configures/assigns SRAM1 (192KB) to the nonsecure app, and SRAM2 (64KB) and part of SRAM3 (first 32KB) to the secure app. This leaves the remainder of SRAM3 (480KB) and SRAM4 (16KB) unassigned/unused. A couple of questions:Our secure app doesn't require much RAM (does very little other than configuring the trustzone controller and MPU and booting the nonsecure
Hello all,I'm evaluating the STM32H743VIT6 on a third-party development board. I tested it with the system clock configured at 480 MHz (double checked everything, and all looks absolutely fine in terms of configuration). I did enable the "overdrive" setting as is done in the LL example (PWR_VOS0_480MHZ).Thing is, it gets very hot while running at 480 MHz (haven't measure exact temperature, but one can't leave a finger on it for more than a couple seconds, so I'd say close to 70°C).Maybe that's fully normal and this chip in this package (LQFP-100) can't be run at 480 MHz. I'm not sure. I configured the clock for 400 MHz instead (and no overdrive), and the temperature drops a lot. It's a bit warm, but that's it. So fully normal.Any tips to run it at 480 MHz, or is it a lost cause? Going for a larger package (LQFP-208?) for my application is not an option. Would a small heatsink be an option? Or is running this at 480 MHz just not recommended at all? Is the overdrive mode needed
Hi all! I'm using the Nucleo-H755ZI-Q board and trying to write a simple program where the LED should turn on (and stay on) only when I press the USER button (the blue one on the board). I’ve shared a screenshot of my code below. The code builds and debugs without any errors, but when I run it, the LED just starts blinking on its own... even when I haven’t pressed the button. What’s more interesting is that when I stop the program in the IDE, the LED keeps blinking, and it only stops if I enter debug mode again. I expected the LED to stay off by default and turn on steadily only when the button is pressed. Also, after flashing and starting debug, I only see a "Resume" button instead of "Run"... Not sure if that means something’s wrong or if it’s normal. Any help figuring this out would be great!my program
Dear all, I'm calibrating the STM32G0B0RE RTC clocked by an external 32.768 oscillator using the following guide:https://community.st.com/t5/stm32-mcus/how-to-calibrate-the-stm32-s-real-time-clock-rtc/ta-p/744958Below is my debug code:int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_RTC_Init(); MX_USART1_UART_Init(); MX_I2C1_Init(); /* USER CODE BEGIN 2 */ char msg[256]; strcpy(msg, "********************************************* RTC trimming *********************************************\r\n\r\n"); HAL_UART_Transmit(&huart1, (uint8_t *)msg,
Why I do not find the receiver frequency setting in the LPAWUR_WakeupRadio_Rx code?While I can find the transmitter frequency setting in MRSUBG_WakeupRadio_Txas MRSUBG_RadioInitStruct.lFrequencyBase = 868000000;
What settings can be changed in LPAWUR_WakeupRadio_Rx code to increase the wakeup radio distance?From data sheet , The STM32WL33xx RF output power can be programmed to deliver up to +20 dBm, in TX+TXHP mode, and in MRSUBG_WakeupRadio_Tx code,MRSUBG_RadioInitStruct.outputPower = 20;MRSUBG_RadioInitStruct.PADrvMode = PPA_DRV_TX_TX_HP;The above changing is for TX side, what about RX side?
Hi,I am using STM32Cube_FW_H5_V1.5.0. I initialize a MPU region with the following code, using only LL-calls:LL_MPU_ConfigRegion(LL_MPU_REGION_NUMBER6, LL_MPU_REGION_PRIV_RW|LL_MPU_INSTRUCTION_ACCESS_DISABLE|LL_MPU_ACCESS_NOT_SHAREABLE, LL_MPU_ATTRIBUTES_NUMBER2, 0x90000000U, 0x9FFFFFFFU);The corresponding MPU register MPU_RLAR_Ax gets set to 0x9FFFFFE3, wich is obviously wrong because I wanted to select attribute#2 and instead the attribute field gets set to 0x1.For verification I did the same initialization using HAL-calls:MPU_Region_InitTypeDef region; region.Enable = MPU_REGION_ENABLE; region.Number = MPU_REGION_NUMBER6; region.AttributesIndex = MPU_ATTRIBUTES_NUMBER2; region.BaseAddress = 0x90000000U; region.LimitAddress = 0x9FFFFFFFU; region.AccessPermission = MPU_REGION_PRIV_RW; region.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; region.IsShareable = MPU_ACCESS_NOT_SHAREABLE; HAL_MPU_ConfigRegion(&region);Now the MPU register MPU_RLAR_Ax gets set to the correct va
Hello Folks, I started playing with STM32WB09 after some difficulties related to entering in bootloader mode (thanks again to the community) and i wanted to try setting the maximum SCAN_INTERVAL + maximum CONNECTION_INTERVAL to see the best low power footprint i can obtain.All the setting i'm playing with are in app.conf.h and are basically those:#define PAWR_NUM_SUBEVENTS 4 #define PAWR_SUBEVENT_INTERVAL_MS 30 #define PAWR_RESPONSE_SLOT_DELAY_MS 2.5 #define PAWR_RESPONSE_SLOT_SPACING_US 500 #define PAWR_NUM_RESPONSE_SLOTS 8 #define PAWR_INTERVAL_MS (PAWR_SUBEVENT_INTERVAL_MS * PAWR_NUM_SUBEVENTS + 200) #define SCAN_INTERVAL_MS 2000 #define SCAN_WINDOW_MS 100 #define CONNECTION_INTERVAL_MS 200 #define SUPERVISION_TIMEOUT_MS 500 Strating from the Broadcaster example, i'm able to set the maximum "SCAN_INTERVAL_MS" up to 32000ms (32s).I can see that from the power consumption footprint the system wake up every 32s scanning for observers.However i'm getting a strange beha
In developing a bootloader and application for an STM32H5 project using STM32CubeIDE v1.19.0, and STM32H5xx HAL Driver v1.5.0.RC1; when I place the ISR at 0x08008200, I can start the debug process but the application appears to be stuck in void SVC_Handler(void) once an interrupt occurs. What's interesting is that if I adjust the ISR location to 0x08008000, or 0x08008400, and define VECT_TAB_OFFSET in system_stm32h5xx.c [along with changing definition of .isr_vector to 0x08008000/0x08008400 in LinkerScript.ld] everything behaves as expected; it's only when setting to 0x08008200 that things break. I previously had a build environment with STM32CubeIDE v1.15.1 using v1.4.0 STM32Cube MCU package and everything worked fine then. Any guidance on where to look to zero-in on what might be the culprit?
Trying to get a basic sample DAC1 with DMA, triggered by TIM2 working. This should be trivial, works fine on SMT32F3. I'm using a Nucleo-32 SMT32G431.Using Cube IDE. The only non IDE-generated code in main is: /* USER CODE BEGIN 2 */ static uint16_t x[4]; x[0]= 100; x[1]= 1000; x[2]= 2000; x[3]= 3000; HAL_TIM_Base_Start_IT(&htim2); HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, (uint32_t*)x, 4, DAC_ALIGN_12B_R); /* USER CODE END 2 */IOC configuration:DAC with output buffer (verified, works fine in non-DMA mode)circular DMA buffer, 1/2 wordtrigger: TIM2 updateTIM2: set to count up to 500, internal clock (works, verified by reading the clock)Compared to some DAC/DMA examples - everything seems fine (and works on a Nucleo-32 SMT32F3. Please help - this is extremely frustrating and has held up a a project for 3 days.test1.ioc and main.c files attached.Thank you!Paul
Hello, I have recently started getting familiarized with the P-NUCLEO-WB55 kit, and I have run to my first big mess up. I was attempting to perform a wireless stack FUS routine over the STLink interface, and I might have set a wrong start address for the FUS_fw.bin file (which I have updated to v 2.00). Hence, it seems that I can no longer do a firmware update over the stlink. The other main issue that I am also facing is that I cannot seem to get the board to boot up to DFU mode. I have tried the dongle, and it boots to DFU mode normally after toggling the switch. However, and correct me if I am wrong, If I follow the procedure outlined here: https://visualgdb.com/tools/STM32WBUpdater/connecting/ , I should be able to boot into DFU mode in the development board. Yet, it does not work. If this is salvageable, I would greatly appreciate any help/support you can provide. Thanks
Hello and good day.When using my custom board, I am facing "The following has evaluated to null or missing" errors during code generation. I have tried a few variation of custom boards but I can't seem to solve the issue. FYI, this doesn't happen when generating code using ST evaluation boards.Is this an issue from my side?I am using the latest MCSDK v6.41 and STM32CubeMX 6.15.I have attached my project file for reference.Edit: I am using STMC Board Designer Version: 1.2.1 and I just uploaded the board design.
Hi,I'm having a problem with the LSE/RTC and I'm not exactly sure where to start, but I'll try to explain it.I'm using the STM32WB55 and the RTC is used for FreeRTOS tick timing. It works perfectly during normal operation with a 1 ms tick, and it also works when entering STOP2 mode and waking up after a longer time, for example 2 seconds. The RTC is clocked by LSE.However, the problem occurs if the ST-Link is connected to the SWD header. In that case, the RTC no longer wakes up the MCU from STOP2 mode — the MCU just stays stuck in sleep mode, like the RTC didn’t generate the interrupt or didn’t wake it up.It also seems to be related to power cycling. If I disconnect the power supply from the MCU and wait long enough (more than 5 seconds, to fully discharge the board), then reconnect power, this issue always happens. But if I just reset the MCU without cutting the power, everything works fine again.I also found that the problem does not occur when using LSI instead of LSE.
i am using Riverdi RVT50HQSNWC01-B - STM32 EMBEDDED 5.0" DISPLAY in the display have inbuild Micro Controller Unit STM32U5G9NJH6Q.I tested the internal loopback and external loopback in this and it works fine but the normal mode is not working.Can you tell me what I need to do to make CAN FD normal mode work?and i have RVT121HVSNWC00-B - STM32 EMBEDDED 12.1" DISPLAY in the display have inbuild Micro Controller Unit STM32H757XIH6. so i need to CAN FD communicate STM32H757XIH6 to STM32U5G9NJH6Q controller.and we have two Riverdi RVT50HQSNWC01-B - STM32 EMBEDDED 5.0" DISPLAY in the display have inbuild Micro Controller Unit STM32U5G9NJH6Q. so first i try this two. that project file i attached so please the how to fix it.
Greetings. I am a beginner and an electronic student and I am currently getting my hands on STM32H523. I have created a mcu board in Altium Designer just to control LEDs by GPIO, hopefully to understand more about STM32. I have the PCB fabricated, and the connection for ST Link v2 is SWDIO---SWDIO, SWCLK---SWCLK, GND---GND. I have also connected a wire at the VCC and GND to the 3.3v power supply to power up the MCU. For Boot0, I set it to HIGH since I see people saying that to program the MCU, I need to set it to HIGH. I have soldered everything and connect the board to st link, and I cannot debug. I was hoping if anyone can give me some guide, and here I will attach my schematic so you may spot out any design errors... Thank you very much, understanding the STM32 means a lot to me as I intend to use them in my future advanced projects.
STLINK V3 stopped working after upgrade. Red light is flashing. Device manager - Unknown USB Device. NUCLO and DISCOVERY with ST-Link2 are still working! Installing dpinst_amd64.exe not help.
Hi, Im having issues programming with the STLINK-V3SET on the STM32G474E-EVAL1 board with the tag connector(CN15) I get the following output when using the STM32CubeProgrammer13:09:01 : UR connection mode is defined with the HWrst reset mode13:09:01 : UR connection mode is defined with the HWrst reset mode13:09:01 : ST-LINK SN : 0039002B323451083630353213:09:01 : ST-LINK FW : V3J16M8B5S113:09:01 : Board : STLINK-V3SET13:09:01 : Voltage : 0.64V13:09:01 : Error: Unable to get core ID13:09:01 : Error: No STM32 target found! If your product embeds Debug Authentication, please perform a discovery using Debug AuthenticationAnd with programming with the IDE I get the following output Starting server with the following options:Persistent Mode : DisabledLogFile Name : C:\Users\aiglesias\Documents\test\Debug\st-link_gdbserver_log.txtLogging Level : 31Listen Port Number : 61234Status Refresh Delay : 15sVerbose Mode : EnabledSWD Debug : EnabledInitWhile : EnabledError in initializing ST-
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.