Developer support experience survey - We value your feedback
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 am implementing a secure boot process on the STM32H723. My application has three firmware components with the following memory layout:1. BOOT: Located in internal Flash.2. OS: Located in internal Flash.3. USER: Located in external SDRAM.The required boot and runtime behavior is:1. Upon power-on, the BOOT code must read and perform a full verification (e.g., checksum, hash) of the entire OS image from internal Flash.2. After verification, the BOOT jumps to the OS.3. The OS provides a runtime environment for the USER application. The OS and USER application need to interact bidirectionally (e.g., call each other's functions).Core Security Requirement:The USER application (running in SDRAM) must be prevented from reading the code of both the BOOT and the OS from internal Flash. The OS code should be executable but not readable.Question / Request for Clarification:The PCROP (Proprietary Code Read Protection) feature seems designed for "execute-only" protection. However, a conflict exists
I'm using a STM32F407VG (actually a disc-1 board). I've set I2S2 in full-duplex master mode and generating the MCLK out on PC6 for an external slave codec. So far so good.Now i want to set SDIO interface in full-duplex 4-bits mode but CubeMX throws a warning about a partial conflict with I2S master clock out. Frankly i have no clue about it, can i safely ignore the warning?
An issue has been encountered with the STM32G474: when the blanking source is selected for the comparator module output, the events of the HRTIM Hi,The complete code files are in the attachment. As shown in the picture above, for the HRTIM module of the G474, Event 4 uses COMP1 as the input source. When the output of the comparator flips due to blanking, the outputs of TA1 or TA2 of the HRTIM event do not change due to the flip of the comparator output.Thanks.
Hello, I want to test my FOC algorithm on my hardware, so I designed my own PCB based on the evaluation board of STSPIN32G4, and create an empty project in STM32CubeIDE. I use a voltage regulator to output 12V to my PCB. And I When I was testing the internal driver of STSPIN32G4, I found a problem that whatever I do the voltage of GHS was 5.8v and the voltage of GLS is 0v. I have already tried to let PE8 high level or gnd or a PWM, but the voltage of GHS1 never change. And even I do nothing, just downlowd an empty program to STSPIN32G4, the voltage of three GHS are 5.8v. If I run the empty program, the nFAULT will be high, and if I use the combined output with timer 1 turned on, the nFAULT will be low.I think the waveform of GHS should be consistent with INH, the waveform of GLS should be consistent with INL. So the voltage of GHS and GLS won't be a fixed value. Is my idea correct? How do I know if the internal driver of STSPIN32G4 is working properly
Hello Folks, sorry, I am quite desperate. I try to get my I3C code working, but the read consistently fails and returns a buffer with just 255s and a temperature of 350 degrees centigrade. The weird thing is that the checks I put in work, so it looks like the assignment of the address worked. If I run the code without the sensor shield connected, the checks halt program execution. This is the code I put together from two I3C examples - for the H503 Nucleo, there is no example for the IKS4A1 and the code at https://wiki.st.com/stm32mcu/wiki/Getting_started_with_I3C and in the AN is incomplete:
Hello, I am encountering a specific issue with the system bootloader (I2C interface) regarding the Get CRC command. When sending the Get CRC command sequence via the system bootloader, the STM32U575 ACKs all bytes (Command, Address+XOR, Length+XOR), but the returned CRC value is consistently 0x0000 regardless of the binary file loaded in it. When running HAL_Calculate_CRC() within the user application on the same STM32U575 units, we receive valid, non-zero CRC data. I have tested and confirmed this issue across 2x STM32U575 units using both the stm32flash open source tool and manual scripting via an Aardvark I2C host. To isolate the issue, we tested the exact same scripts and stm32flash commands on STM32G0 and STM32G4 targets and they worked perfectly, returning valid non-zero CRCs when both in application and bootloader mode. Any insight into why the U5 is returning zeros while its predecessors work fine would be greatly appreciated. stm32flash output in the G0: ./stm32
Herkese merhaba, içeriğinde bulunan popüler ESP32 SOM modüllerine benzer şekilde, STM32 serisi için bir Sistem-on-Module (SOM) geliştirmeyi düşünüyorum. Toplu talepte bulunmak istedim: Sanırım bu makul/mantıklı bir proje mi, yoksa piyasa zaten doymuş durumda mı? Biz küçük bir donanım geliştirme şirketi/startup'ız. Şu anda portföyümüzde birkaç ürünümüz var ve ürün yelpazemize yeni, daha yüksek değerli ürünler seçmek istiyoruz. Bu STM32 SOM voltajını ciddi olarak değerlendiriyoruz. Aşağıdaki özelliklerinizi görüşlerinizi gerçekten çok takdir ederim:İyi tasarlanmış bir STM32 tabanlı SOM modülüne gerçek bir pazar talebi var mı?Ne gibi teknik zorluklarla karşılaşmayı beklemeliyiz?Maliyet, sertifikasyonlar, tedarik zinciri, stok yönetimi vb. genel kritik noktalar var mı?Burada benzer bir ürün yok veya güncel süren var mı? Bu süreçten edinilen dersler neler?Bu bağlantının en iyi şekilde çalışmadığı, küçük bir donanım ekibi için daha uygun alternatif ürün ömrü var mı?Tüm görüş ve önerileriniz
Hi everybody,I'm working on a STM32F446. I'm using the UART.I've a function with switch/cases which instead of a function number fill a buffer.ex :switch(function) {case 0x00 : Txbuffer[idx_trame++] = 0x00;break;case 0x01 : Txbuffer[idx_trame++] = 0x00;break;case 0x02 : Txbuffer[idx_trame++] = 0x00;break;etc...At the end of the function, I've the follwing function : HAL_UART_Transmit_DMA(...)In parallel, I'm using the timer7 (triggered every 1ms).It works well.But, yesterday, I've added some cases, and when my software run into them, I see the tim7 stops (I've put a GPIO in the interrupt and a probe on it).So, I see that before entering in the HAL_UART_Transmit_DMA function, it works and after it stops.When I take a look on tim7 registers, everything seems to be OK, except UIF that keeps at 1 (so the interrupt is never resetted).If you have some ideas, I'll be very happy.
Hello, I wanna use the development board STM32N6570-DK for taking a picture with MB1854B. i am quite new for DCMI and DCMIPP. i just want to read the image through the pipe1 of dcmipp but i dont know how to config the MCU in .ioc file. Can anyone explain or give me an example for that?
Hello, I've been trying to setup bi-directional communication with USB-HID on a custom board with STM32WB55CEU. I can send data to the PC from the STM just fine. My usb stack runs, enumerates and reports correctly. However, when trying to send Data from the PC back to the STM, I always receive garbage packages. Here's my device descriptor for the Outreport: 0x09, 0x03, // USAGE (Vendor Usage 3) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x04, // REPORT_COUNT (4) 0x91, 0x02, // OUTPUT (Data,Var,Abs)So 4 Bytes. I also tried this with and without adding a Report ID, which did not change the results whatsoever.I have also tried running the code with defining USB_CUSTOMHID_REPORT_BUFFER_EVENT_ENABLED; both in main.h and in usbd_customhid.c and usbd_customhid.h to no changes.I also tried changing CUSTOM_HID_EPOUT_SIZE to 0x04 and 0x05, same with USBD_CUSTOMHID_OUTREPORT_BUF_SIZE. Including all of the combinations with and without report ID and with and without enabling the buffer define.
Hi all,I am designing a custom PCB using the STM32N657Z0 and am looking for some advice on how to treat some of the specialized pins that I don't plan on using. Specifically I have not been able to find any recommendations on how to treat any of the CSI pins if they are not in use. The closest I've found was https://community.st.com/t5/stm32-mcus-products/stm32n6-minimal-hardware-design/td-p/794094 which did inform me on what to do with my unused USB OTG pins for the most part. Would it be acceptable to ground all these pins with a shared external pull-down? This is what AN5967 would lead me to believe but I wasn't sure if these pins were grouped in with what was described in section 12.7. Appreciate any help, thanks!
To sum up my project, i get temperature value from NTC. I made ADC reading. There is no problem about getting values. I define temperature value as floating point variable. When observing it on debug screen, because it was floating, numbers after . is too much like seven digit. As you see in picture, is there any way to reduce the number of digits on debug window? temperatureDisplay
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.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.