Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
I'm trying to read ADC1 on channel 12 using ADC with DMA in a Zephyr OS environment, but I'm getting a BUS FAULT error when using the adc_read_async() API. This is my prj.conf file CONFIG_LOG=y CONFIG_MAIN_STACK_SIZE=4096 CONFIG_ADC=y CONFIG_ADC_ASYNC=y CONFIG_DMA=y CONFIG_ADC_STM32_DMA=y CONFIG_DMA_STM32=y CONFIG_DMA_STM32U5=n CONFIG_ARM_MPU=n CONFIG_DCACHE=n CONFIG_NO_OPTIMIZATIONS=y CONFIG_CACHE_MANAGEMENT=y CONFIG_NOCACHE_MEMORY=y CONFIG_FAULT_DUMP=2 CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_ISR_STACK_SIZE=2048 CONFIG_ADC_LOG_LEVEL_DBG=y CONFIG_DMA_LOG_LEVEL_DBG=y Overlay / { zephyr,user { io-channels = <&adc1 0>; }; aliases { adc1 = &adc1; }; }; &dma1 { status = "okay"; }; &dma2 { status = "okay"; }; &dmamux1 { status = "okay"; }; &adc1 { status = "okay"; compatible = "st,stm32-adc"; st,adc-clock-source = "SYNC"; st,adc-prescaler = <4>; // pinctrl-0 = <&adc1_in12_pc0>; // pinctrl-names = "default";
It is well-known that when configuring and starting a timer using HAL_TIM_Base_Init and HAL_TIM_Base_Start_IT, the interrupt and callback are triggered immediately. This is because configuring the reload-register & prescaler requires generating an update event (using EGR_UG) which then sets the interrupt flag.The function TIM_Base_SetConfig even contains an attempt to solve this by manually clearing the UIF flag./* Generate an update event to reload the Prescaler and the repetition counter (only for advanced timer) value immediately */ TIMx->EGR = TIM_EGR_UG; /* Check if the update flag is set after the Update Generation, if so clear the UIF flag */ if (HAL_IS_BIT_SET(TIMx->SR, TIM_FLAG_UPDATE)) { /* Clear the update flag */ CLEAR_BIT(TIMx->SR, TIM_FLAG_UPDATE); }However, this does not usually work, probably because the timer runs a little slower than the CPU, and the APB bus also needs a few cycles to transfer the access to EGR. Compiling without optimizatio
Hi all,I'm trying to create a project to read a temperature sound like a DS18B20. The problem is that I need a precise and stable delay time. Using Systick isn't possible because there's a conflict when using BLE. I tried using an MFT, but I can't create a function to vary the delay. I based my approach on a timer in MFT_Mode1 and a prescaler 80-1 on the 16MHz oscillator.static inline void delay_us(uint32_t us) { uint32_t ticks = us / 10; // 1 tick ≈ 10 µs if (ticks == 0) ticks = 1; uint16_t start = MFT_GetCounter2(MFT1); while ((uint16_t)(MFT_GetCounter2(MFT1) - start) < ticks) { } } static void MFT1_Reset(void) { MFT_SetCounter2(MFT1,0); } static uint16_t MFT1_Get(void) { return MFT_GetCounter2(MFT1);Even if I vary my e.g. delay_us(2500) , I still get pulses at 10µs. For test in loop/* Start MFT timers */ MFT_Cmd(MFT1, ENABLE); while (1) { GPIO_SetBits(GPIO_Pin_6); delay_us(250000); // 250 ms GPIO_ResetBits(GPIO_Pin_6); delay_us(250000); } Thank for help
In STM32Cube_FW_H7RS_V1.3.0, file Projects\STM32H7S78-DK\Applications\ROT\OEMiROT_Boot\Inc\stm32_extmem_conf.h:The configuration for the external RAM (presumably for an APS256XXN-OBR-BG, since that's what on the DK) is incorrect. In particular, it doesn't set the latency values to be able to run at 200 MHz.(I think that the dummy cycle values may also be wrong - but I suspect they're ignored anyway.)Here's my code (I also changed the drive strength, but that may not be necessary). Without these changes, the RAM could be read, but not written: .PsramObject = { .psram_public = { .MemorySize = HAL_XSPI_SIZE_256MB, /* memory size is 256Mbit */ .FreqMax = 200000000u, /* 200Mhz */ .NumberOfConfig = 3, /* Config */ { #define EXTRAM_MR0_READ_LATENCY_MASK (0x7 << 2) #define EXTRAM_MR0_DRIVE_STRENGTH_HALF (0x1 << 0) #define EXTRAM_MR0_READ_LATENCY_200_MHz (0x4 << 2) #define EXTRAM_MR0_DRIVE_STRENGTH_MASK (0x3 << 0) #define EXTRAM_MR4_WRITE_LATENCY_MASK (0
Split from this post. Thank you for your help, I didn't know this mode and it works well. I did a measure every 5s. I use Timer1 for injected mode and timer3 for DMA mode. I've just a little difference of measure. With the ADC, I have the following value : 944, that's to say (with ratio = 4), ((944 * 3.3) / 4096) = 0.7605 * 4 = 3.04V. My sampling is 480cycles.(if I put only 3 cyles, the measure is lower (2.88V)). Or with my multimeter, I have 3.20V.
Hi,I’m currently working with the Nucleo L476RG board and the ST25R501 NFC reader, and I am using a provided .bin file (STEVAL_STM32L4x6-ST25R500_v1_0_4.bin) that runs on the board together with the GUI application.I would like to ask if it’s possible to obtain the source code corresponding to this .bin file. Having access to the source would help me better understand the implementation and allow me to adapt or extend it for my project.Any guidance on how I could get access to the source code would be greatly appreciated.Thank you!
Recently, I bought a clone of ST-Link V2.I am trying to program a RAK5205 board with an STM32L151CB MCU on it, with a basic program for blinking LEDs.If I use the STM32 ST-Link Utility v 4.5.0.0, open the file RAK5205_Blink.hex and program the MCU, it ends correctly and the program runs without problems on the board. If I want to completely erase the Flash memory, it does it correctly with this indication:Device ID: 0x429Device flash Size: 128KBytesDevice family: STM32L100x8xxA / L15xx8xxAFlash memory erased.Now, if I open the STM32CubeProgrammer v2.1.0, open the same file RAK5205_Blink.hex, the ST-Link v2 is recognized and connected correctly, read the memory of the MCU without problems, but when I want to program it in the same way than before, it shows the error, "Flash loader can not be loaded".What is the difference between the ST-Link Utility and the STM32CubeProgrammer regarding device detection and programming? What exactly does the error"Flash loader can not be
Hello everyone, I am working with the STM32H743BIT6 using the LTDC peripheral to drive an RGB display. The display I am using does not have HSYNC and VSYNC signals and operates only in DE (Data Enable) mode. I have attached the display datasheet for reference. Based on the datasheet timing specifications, I configured the LTDC parameters accordingly. Since the display does not use HSYNC and VSYNC, I configured them as constant high signals (logic 1) and set the rest of the LTDC timing parameters as specified. However, the display is not showing any image. The backlight turns on, but the screen remains black. Below are the key points of my configuration: LTDC peripheral configured according to the display timing parameters from the datasheet HSYNC and VSYNC set to constant logic high since the panel works only in DE mode Pixel clock configured as per the display requirements Data Enable (DE) signal connected and active RGB data lines connected correctly Framebuffer configured in SDRAM
Hello, Based on my understanding, in this code /* Run inference by executing epoch blocks until done */ LL_ATON_RT_RetValues_t result; uint32_t total_run_ticks = 0u; uint32_t total_wfe_ticks = 0u; do { uint32_t run_start = tim2_get_count(); result = LL_ATON_RT_RunEpochBlock(&NN_Instance_audio_network); uint32_t run_end = tim2_get_count(); total_run_ticks += (uint32_t)(run_end - run_start); if (result == LL_ATON_RT_WFE) { uint32_t wfe_start = tim2_get_count(); LL_ATON_OSAL_WFE(); uint32_t wfe_end = tim2_get_count(); total_wfe_ticks += (uint32_t)(wfe_end - wfe_start); } } while (result != LL_ATON_RT_DONE); uint32_t npu_end = tim2_get_count(); uint32_t total_us = tim2_ticks_to_us((uint32_t)(npu_end - npu_start)); uint32_t run_us = tim2_ticks_to_us(total_run_ticks); uint32_t wfe_us = tim2_ticks_to_us(total_wfe_ticks); LOGI_I32("NPU inference (us): ", (unsigned long)total_us); LOGI("NPU epoch time (us): run=%u wfe=%u", run_us, wfe_us); calling LL_ATON_OSAL_WFE
Hi!I have a STM32MP257F processor. The clock for SDMMC1 is constant at 3.3V. Therefore the U-boot cannot read the SD-card.My question is: What clock need to be active/chosed in the device tree so it u-boot can read the SD-card sdmmc1? Hit any key to stop autoboot: 0 Boot over mmc0! Saving Environment to MMC... stm32_sdmmc2 mmc@48220000: stm32_sdmmc2_getcd called stm32_sdmmc2 mmc@48220000: bus_with = 1, clock = 0 stm32mp25_reset clock-controller@44200000: reset id=69 offset=0x830 bit=0 status=1 stm32mp25_reset clock-controller@44200000: reset id=69 offset=0x830 bit=0 status=0 D/TC:? 0 tee_ta_init_session_with_context:562 Re-open trusted service a8cfe406-d4f5-4a2e-9f8d-a25dc754c099 F/TC:? 0 pta_scmi_invoke_command:404 SCMI command 0x3 ptypes 0x3 F/TC:? 0 pta_scmi_invoke_command:404 SCMI command 0x4 ptypes 0x651 F/TC:? 0 regulator_disable:142 v3v3 D/TC:? 0 tee_ta_close_session:465 csess 0x8212f890 id 1 D/TC:? 0 tee_ta_close_session:484 Destroy session D/TC:? 0 tee_ta_init_session_wi
Hi everyoneI've got a few questions about the views that show FreeRTOS Semaphores and Queues:1. My application creates a lot of Mutex and Queues, and only the first 63 (or 64 -- I may have lost count) of each type are visible. Is this a feature or a bug? And if I want to see the remainder... any thoughts on how to go about that?2. Here's a screenshot of the Semaphore view:2A: MutexSPI2 is created by CubeMX as a dynamically allocated Mutex using the CMSIS OS wrapper.2B: PS-Global Lock is created with mutex_init(&lock,"PS-Global Lock");whereint mutex_init(mutex_t *_m, const char* mutex_name) { SemaphoreHandle_t *m = (SemaphoreHandle_t *) _m; *m = xSemaphoreCreateMutex(); vQueueAddToRegistry((QueueHandle_t) m,mutex_name); return 0; }I'm guessing that since the 'mutex' is being defined as a Semaphore is why it's not showing up on the list as a MUTEX, but I don't understand why the "Size" and "Free" values are.2C: The remainder of the Semapho
Dear community,I'm developing the STSPIN32G4. My setup is as follows:12V for the V_MExternal 3.3V for VDD / VDDA / VREF+ / VBAT / VREGINPB8 (BOOT0) with 10K pull-downnRESET with RC-delay circuit: 10K pull-up to 3.3V + 10uF capacitorPower sequence: 12V is applied first to the STSPIN32G4 and L6982N33DR, then L6982N33DR supplies 3.3V to VDDThe problem I'm facing right now is:The MCU starts working (sending UART and running the peripheral devices), but the gate control parts (GHSx & GLSx) remain idle and don’t drive current.I have to manually pull nRESET low again to start the gate control.How can I solve this? I want the chip to automatically start the gate driver at power-up.I also noticed that the EVSPIN32G4 evaluation board shows the same behavior.
Hello, I am currently working with the STM32G030C8TX microcontroller and I have encountered an issue while reading analog values through the ADC. When I attempt to read ADC values from the PB11 and PB12 pins, the measured values are incorrect or unstable. However, when I use other ADC-capable pins on the same microcontroller, the readings appear to be correct and stable. Because of this behavior, I am unsure whether: PB11 and PB12 pins support ADC functionality on this device/package There is a configuration issue on my side Or there might be a silicon/production-related issue with the chip I would appreciate it if you could clarify whether these pins are valid ADC inputs on the STM32G030C8TX and if there are any known limitations or special configurations required.
I am not able to find the built in drivers, which comes by default, when you download the software. This is not allowing me to get the whole main.c file to perform the projects. Can anyone help
Hi I am using NUCLEO-N657X0-Q board, for the STM32N657 part, with the release STEdgeAI 2.0.We are using STM32Cube ecosystem (IDE, CubeMX, Programmer) for the development. I have been using NPU Validation example without any issues. The example there for the DK board, "\Projects\STM32N6570-DK\Applications\SNS\", which does not run for NUCLEO after a bit of changes for Nucleo. Gets stuck after the SystemIsolation_Config() in AppliNonSecure, with a Hard Fault. SECURE_RegisterCallback(IAC_ERROR_CB_ID, (void *)SecureError_Callback); (which is IACCVIOL = 1) ==> Though I have MPU is already enabled in the FSBL. Same time, after a bit of struggle with the CubeMX, Generated the code for Nucleo with X-Cube-AI 10.0 package. But this ended up with 1000's of errors in the build. Another way, by trying from working SNS Application sample (of course with FSBL) from Nucleo Templates and then adding the AI related Middleware, Apps to NS App side, it goes as far as /* End
Hello,I tried to understand what does A35-TD does better than M33-TD flavor and vice versa. But I don't find enough information. The information that confuses me is it says A35-TD Flavor has Hard real time on Arm Cortex-M33. What does it mean operation wise- what capabilities does it have extra compared to M33-TD Flavor? Could someone please help me understand this? Thanking.with regardsAmit
Hi team, We have our own customized USBPD board (STM32L562CET6) which support both SPR(100W) and EPR(140W). SPR is working great, now we want to work on 140W using EPR mode. So that initially we have tried to enter EPR mode by following method #define USBPD_EPRMDO_ACTION_ENTER (uint32_t)(0x01 << 24)#define USBPD_EPRMDO_DATA_ENTER (uint32_t)(0x8C << 16)eprmdo[0] = 1; //Header - no.of data objectseprmdo[1] = USBPD_EPRMDO_ACTION_ENTER | USBPD_EPRMDO_DATA_ENTER;//EPRMDOstatus = USBPD_PE_Request_DataMessage(0, USBPD_DATAMSG_EPR_MODE, eprmdo); But it returns "USBPD_FAIL". Please clarify me that "Is it possible to enter EPR mode by using above mentioned method? If yes, please correct me why i am getting USBPD_FAIL status."
[PN]: STSPIN32G4[VERSION]: v6.4.1[TOOL]: MC Workbench / Motor Pilot[DETAILS]:I am working with a custom PCB design which was largely follows the EVSPIN32G4 schematic. I defined a custom board in MC Workbench and generated firmware, and can upload the firmware to the STSPIN without issue. Motor Pilot detects the board, and I can command START/STOP and read values/status.When I press START for either Torque or Speed control, the board enters some ALIGNMENT stage (only the first time) followed by RUN. No behavior is observed with the motor. No faults are ever reported by Motor Pilot. I can STOP and START motor control again and still see no change in behavior.With a scope, after START I see a single pulse on the U phase's gate for around 22 microseconds, then it falls to 0V and remains there. I did briefly run the firmware under GDB, and I see that MOE is set during RUN.Using a 48V frameless motor, running from a Li-Ion pack (bus voltage currently 56V), SIR680LDP-T1-RE3 FETs. VCC mea
I have an application that uses the OCTOSPI1 interface to read from and write to an external NOR flash memory into an SRAM1 buffer. The read and write operations are performed in the NS section of the application. If I perform a transfer without using DMA, it works. However, if I try to use GPDMA1, I get a buffer with all data set to 0, with no error.Additional information: the application works very well with GPDMA1 if I disable the MCU’s TrustZone mode.I conclude that GPDMA is not fully initialized to work with TrustZone enabled, but I can’t figure out what’s missing despite my searches on this forum.Any help would be greatly appreciated.
I created a motion_fx for stm32h562 from CubeMx. The auto generated motion_fx.h file does call (line 135)size_t MotionFX_GetStateSize(void);But the code does miss the include #include <stddef.h>Which results in the following error:unknown type name 'size_t' motion_fx.h ./Middlewares/ST/STM32_MotionFX_Library/Inc line 135 C/C++ Problem
I'm confused by ST's seeming definition of what they think a QUAD word is....according to most of the planet a WORD is 16-bits, so a QUAD word is 64-Bits. However according to ST a quad word is 128 bits on the STM32U535.I enclose a section of my code - essentially I want to write 11520 values which are U32's and then read them again when I power it back up, bit its getting confused because I can't get my head around whether there's 64, or 128 bits in a QUAD WORD! xnLookup[][][] is the Parameter I want to write, and the read back which is a U32This is the WRITE: i=0;//Channel 0..3 j=0;//Temperature 0..180 (-50 to +130DegC) k=0;//Term X0, X1, X2, X3 etc n=1;//Counter for every 4th flash word MemCount=0;//Total memory locations //was 11520 for -50 to +130DegC. change to for(m=0;m<11520;m++)//Total number of parameters to write - //12160 { //Copy the polynomial term into the flash array flashdata32[n-1].l=xnlookup[k][i][j].l;//Put the polynomial term onto the fla
I am using an STM32 Nucleo-F767ZI with RMII Ethernet + LAN8742A PHY and an example project based on lwIP/TCP-IP. I noticed a strange behavior: if I comment out MX_USB_OTG_FS_PCD_Init(), Ethernet communication stops working. If I keep it enabled, Ethernet works correctly. The peripheral initialization order is: MX_GPIO_Init(); MX_USART3_UART_Init(); MX_LWIP_Init(); MX_TIM3_Init(); MX_SPI4_Init(); MX_CAN1_Init(); MX_UART5_Init(); MX_USB_OTG_FS_PCD_Init(); Additional observations: SystemClock_Config() does not change Replacing MX_USB_OTG_FS_PCD_Init() with HAL_Delay() does not fix it So it does not look like a timing issue It seems that HAL_PCD_Init() / HAL_PCD_MspInit() for USB is enabling or configuring something indirectly that Ethernet depends on My question is: What could USB FS initialization be configuring that would make Ethernet work, even though they should be unrelated? I am thinking about possibilities such as: GPIO clocks being enabled indirectly MSP/NVIC config
Hi,In STM32CubeIDE/MX versions 1.19 and 6.15, I configured HRTIM, and it worked fine without any errors in CubeMX. I have updated STM32CubeIDE/MX to versions 2.1.1 and 6.16.1, and I have noticed the error messages shown in the pictures below.The dead time is not used, but when set Output 2 state MX displays the message "Set Sources: nothing to set as Dead Time is enabled, Output2 signal is defined based on Output1 Configuration Set Sources". The project operates like before the update, but it is not possible to add new Set Sources (I can only change the number of Set Sources to zero). How to understand this behaviour?Krzysztof
Is there a detailed user manual available for the NUCLEO-U3C5ZI-Q?The product page links to a generic getting started document and a generic document on Nucleo 144 boards, but I can't see anything that lists the I/O or that documents the links.
Hello,i tried to generate for STM32f429i disco a project with graphic = touchgfx.1) i generate cubemx (for STM32f429i disco) project for SW4STM32 toolchain2) i generate a simple touchgfx project for SW4STM32 toolchainBut compilation under eclipse gives the following errors :HALSDL2.hpp:22:10: fatal error: SDL2/SDL_video.h: No such file or directoryHALSDL2.hpp:22:10: fatal error:SDL2/SDL_render.h: No such file or directorymain.cpp:30:10: fatal error: shellapi.h: No such file or directoryI can i solve these compilation errors ?thanksbest regards
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.