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 am using STM32F103C8T6 and developed on STM32CubeIDE. This equipment has six similar I2C boards (same ICs, same function) connected to the master which are addressed accordingly. Each of these boards have 8 digital Inputs amounting to 8 bit value as data from each board. A few of this equipment were made and working fine for over 3 years period.off recent, the new machine made, has a peculiar problem. When no digital inputs to any of these 6 boards, three boards (Boards 4, 5 & 6) give out an 8 bit integer value (eg: 182, 212, 247). Doubting the boards I switch places. Boards previous at 4,5 & 6 are now placed at 1, 2 & 3. Despite switching places, boards 4, 5 & 6 give out same 182, 212 & 247. This means the problem is not board related. Then where are these values creeping in from.Help needed to solve this problem, have been struggling for last few daysThanking in advance. I2C IC PCA9554D used, data latched by 74HC
Hi,I am trying to use the ROM bootloader on the STM32G071 to change the contents of specific flash sections. I was able to enter the bootloader just fine, at least I think so because I can see in the debugger how different points in the address space above 1fff0000 are accessed.I am using this library on another STM32 as a master:https://github.com/glegrain/STM32-SPI-Bootloader-hostSince it's written by an STM employee and the commands are exactly like in AN2606 I am confident this is correct. However I can't even get past the first synchronization sequence. The bootloader only responds with seemingly random data.The baud rate is below 8MHz as necessary. Is there some additional timing I have to adhere to, or anything else that I am missing?
Hii, I have a query regarding internal op amp , i.e. how we use internal op amp as a inverting amp. , what are the process to initialize the internal op amp in cubemx (HAL driver) and the output is shared to the adc pin.
Hello,I want to develop a firmware to synchronize an Ocxo on a 1PPS GPS reference signal. I have a Nucleo card with a stm32f429 to do the first tests. The configuration: 1 1PPS input (1 second), 1 10Mhz input reference of the OCXO, 1 DAC output, the measurement method is: between the 2 rising edges of the 1PPS, I count the number of timer overflows, taking the decimal value of the result x 2exp16 my result is 57600 for 10Mhz exactly, in theory everything is fine but how to code all this on a stm32! can you tell me the main things to implement to start my code ?Best regards.Sébastien (France)
Hi,Currently working on a STM32U575, I was happy to see that the RTC now have a binary mode option.I've done some experimenting using the HAL (generated through CubeMX 1.15.1), and I'm intrigued about its init behavior, is it expected, buggy or lacking?What I have seen is, when using the RTC in BCD Mode, the HAL_RTC_INIT function checks if the RTC calendar was previously initialized to avoid a new re-initializing, and thus avoiding losing the date and time. The check is done using: if (__HAL_RTC_IS_CALENDAR_INITIALIZED(hrtc) == 0U) which is a macro that checks if the RTC_ICSR_INITS flag is set.But this check inevitably fails when using the RTC in Binary Mode only. Indeed the RTC_ICSR_INITS flag cannot be true, as it depends on the year field, which stays at its Backup domain reset default value (0x00). And thus, the RTC SSR register used in Binary Mode is always restored to 0xFFFFFFFF on a MCU reset, even though the RTC didn't lose power.I may find an alternative doing this i
I'm using cube-cryptolib-4.3.0 in my STM32CubeIDE project, and I'm running into linker errors stating that the following functions are missing:cmox_sha256_constructcmox_hash_appendcmox_hash_computeEven though the header files are present and included in my project, the linker complains about undefined references to these functions. Here’s a snippet of the error messages I receive:undefined reference to `cmox_sha256_construct'undefined reference to `cmox_hash_append'undefined reference to `cmox_hash_compute'I've already tried the following troubleshooting steps: Include Paths: My include paths point to the correct version of cube-cryptolib.Clean Build: I've performed a full clean and rebuild of the project.Despite these efforts, the linker errors persist. It seems that the actual definitions for these functions are missing from the compiled sources or are conditionally excluded. Questions:Is there a specific configuration or additional macro I need to define to enable the lega
Hello everyone. I would like to use the STM32H747I-DISCO and B-CAMS-OMV (OV5640) module to view HD resolution images on my PC. I found a good example in the link below that uses the hardware I have. USB_WebCam However, when I add the code to set the HD (1280*720 ) resolution to the example code and run it, the camera is not recognized by the PC. Is it possible to stream high resolution images or send captured images with the H747i-DISCO board and B-CAMS-OMV module? I just want to confirm that it is possible or impossible.
Hi Team,Currently I am doing bare-metal programming in STM32F411 using Nucleo-F411RE board; pins PC6/PC7.For USART6, I am trying to transmit string and bytes, in this string is working fine, but for single byte transmission it is not working? void rcc_config(void) { RCC->CR |= 1 << 0; // HSI on while(!(RCC->CR & (1 << 1))); // wait until HSI on RCC->AHB1ENR |= (1 << 2) | (1 << 0); // Enable GPIO A & CFGR RCC->APB1ENR |= (1 << 28); // Power Interface clock enable RCC->APB2ENR |= (1 << 5) | (1 << 8); // Enable ADC and USART6 } void uart_init(void) { USART6->CR1 &= ~(1 << 12); // 1:8N1 USART6->CR1 |= 1 << 9; // Parity Selection USART6->CR1 |= 1 << 7; // TXE interrupt enable USART6->CR1 |= 1 << 6; // TCIE enable USART6->CR1 |= 1 << 5; // RXNE interrupt enable USART6->CR1 |= 1 << 3; // TE enable USART6->CR1 |= 1 << 2; // RE ena
Hi, friends.I am making X-CUBE-CELLULAR working on STM32H750 MCU.my hardware with follow function:USART1 for print DEBUGUSART2 for LTE CELLUAR (with lwip)ETH RMII enabled (with freertos_plus_tcp)QSPI enabledI am building amazon FreeRTOS worked on my board,when using RMII ETH everything work fine,but when change to LTE CELLUAR, something BAD.Andy body can help me.
Hi,I am currently working on a project with the B-L462E-CELL1 Cellular IoT Discovery kit using the X-CUBE-AZRTOS-L4 Azure RTOS software expansion in the XCube IDE and would like to add the X-CUBE-CELLULAR expansion package to my project to support the cellular connectivity feature of the chip.However, when I copy the files used in the example project (STM32CubeExpansion_CELLULAR_V7.0\Projects\B-L462E-CELL1\Demonstrations\Nx_TCP_Echo_Client)^into mine, I get some unresolved includes. However, I have the same includes in my projec under Parameters>C/C++ General>Paths and symbols>Includes as what is present in the example project mentioned earlier. I see that the How to>How to implement your own application section of the documentation says "Coming soon", so I can't read more doc on how to do it.So I wanted to know what files to include in my project and how to set up my project correctly to include the X-CUBE-CELLULAR expansion package
Hi i have a question about tx_event_flags_get function i was using the function like this: tx_event_flags_get(&Flags, 0x01, TX_OR ,NULL, TX_WAIT_FOREVER); with a NULL -> ((void *)0) for the actual_flags_ptr parameter and worked fine , i 'm using NULL beacuse i don't need the actual value of the flags after that i'have tried to use like this: if(tx_event_flags_get(&Flags,0x08, TX_OR_CLEAR ,NULL, TX_NO_WAIT) == TX_SUCCESS) but it seems the combination of NULL and TX_NO_WAIT option is not working, never triggered then if i use an actual variable pointer like this: if(tx_event_flags_get(&Flags, MACHINEPARAMSRESET, TX_OR_CLEAR ,&actualFlag, TX_NO_WAIT) == TX_SUCCESS) work perfect. why i cannot use NULL if i'm using TX_NO_WAIT ? there is a problem with the NULL pointer? i'm also using the qwueue info get like this:
I'm trying to make own dfu application on STM32F746G-DISCO board.I've already tested dfu function by using ST's DFU_Standalone demo example which is worked under USB device mode.Demo example is also provided upgradable sample application which is named as STM32746G_DISCOVERY_SysTick_0x08008000.dfu.I can upgrade this application by using DfuSeDemo.exe on windows 10 PC and It works well.But if i made a simple led toggle dfu application, It cannot run.In this case, i have used the same DFU bootloader. Just changed application.Below is what i modified for dfu application--------------------------------------------------------------------------------1. Changed app's flash location to 0x08008000 in STM32F746NGHX_FLASH.ld2. Changed VECT_TAB_OFFSET to 0x8000 in system_stm32f7xx.c.the board is always running in DFU mode even if there is no error by using DfuFileMgr.exe and DfuSeDemo.exeSo i checked flash's USBD_DFU_APP_DEFAULT_ADD(0x08008000) location by using STM32CubeProgrammer.It shows 0x200
Hello ST,I'm developing a USB CDC communication project on an STM32L452RE microcontroller using STM32CubeIDE.I can successfully receive data from a PC using the Hercules SETUP utility by HW-group.com.I'm facing a challenge with transmitting data back to the PC using the CDC_Transmit_FS function.Environment:MCU: STM32L452REIDE: STM32CubeIDECUBEMX: STM32CubeL4 Firmware Package V1.18.1USB Configuration: Configured as a CDC Virtual COM PortOS: Windows 11USB Interface: Hercules 3.2.8Issue Description: Data reception from the PC works flawlessly. However, when attempting to transmit data back using CDC_Transmit_FS, the function seems to never complete. The code gets indefinitely stuck waiting for hcdc->TxState to reset to 0, which, based on my understanding, should happen via an interrupt once the transmission completes.Troubleshooting Done:Create a new ST board project using this video USB tutorial:https://www.youtube.com/watch?v=92A98iEFmaA&t=212sConfir
Hi!I'm creating an i2c-slave using a stm32g0-series. There are two types of messages that need to be supported, a write-then-read, and a write-only.The write-then-read starts with a write-message of a register address of the slave device (1 byte). This is followed by a repeated start condition where the master writes the data to the register address. The write-only starts in the same manner, but in addition to the register-address, a number of bytes (depending on the register) are also written to the slave. IFAIK these are fairly common ways to do reads and writes. The write-then-read messages work fine with the use of HAL_I2C_Slave_Seq_Receive_IT (receive one byte) and HAL_I2C_Slave_Seq_Transmit_IT (transmit n bytes). My problem arises when the first message (write) can either be one byte (write-then-read) or multiple bytes (write-only). The way I see it, I either have to detect if the repeated start condition has happened (one byte has
Hi.I'm working on a project using I2C on the U545, and I've noticed that all the HAL_I2C_Slave_* functions include the following:/* Enable Address Acknowledge */hi2c->Instance->CR2 &= ~I2C_CR2_NACK;However, the STM32U5 Reference manual states that writing 0 to this bit has no effect. Many of these functions also set this bit before exiting with the comment "Disable Address Acknowledge", however the RM also states that an Address match will cause the bit to be cleared by hardware. What is going on?
Hi I am using STM32F407 and I want to interface SX1262 XXXM LoRaWAN/GNSS HAT into the host MCU.I was porting LoRaMAC stack into stm32f407 using stm32cube ide referring Lora-net/LoRaMac-node: Reference implementation and documentation of a LoRa network node., but flash interfacing for eeprom emulation is based on STM32L4 series and I dont know how to make the same compatible or modify it for stm32f4 series.It will be much helpful if anyone could guide me through the steps.
I am new to FreeRTOS ( RTOS in general, although I am very familiar with baremetal) and am following along with this video:https://www.youtube.com/watch?v=CdpgqpuPSyQ&t=4s I am using a STM32F3DISCOVERY board so I had to make some minor tweaks to follow along, seemingly just pin numbering. I am using the default pin configurations and clock configuration. I am using TIM6 as Timebase source. I cannot seem to figure out why my LEDs are not blinking. I created a baremetal project to confirm the config of the pins is good and there I can get them toggling. I see the TIM6 CNT incrementing and wrapping so that is working. I tried to use breakpoints to see if I ever get back to my task and aside from the first hit during initialization, I never get back.Not sure what I did wrong, but it appears my tasks only occur once and then terminate but I cannot figure out why. Any tips on how to debug this? Thank you
Hello everyone,I am struggling with a problem that has not been solved before. Perhaps someone could be found who would be able to solve it. The issue is with the operation of the interrupt for receiving a character via USART. The interrupt is not responding, and I am unable to resolve this problem on my own. The USART transmits and receives the data frame correctly, but when I enable the interrupt for USART reception, it stops receiving. I am trying to control an SG90 servo motor. Its nuclef303RE, MCU stm32f3. #include "stm32f303xe.h" #include "stdint.h" #include "stm32f3xx.h" #include <stdio.h> #include <string.h> #define LD4_ON GPIOA -> BSRR |= GPIO_BSRR_BS_5; #define LD4_OFF GPIOA -> BSRR |= GPIO_BSRR_BR_5; volatile int currentindex=0; volatile int position = 1000; volatile char message; void clock_config(void) { RCC->CR |= RCC_CR_HSION; while (!(RCC->CR & RCC_CR_HSIRDY)); RCC->APB1ENR |= RCC_APB1ENR_PWREN; RCC->CFGR |= RCC_CFGR_HPRE_
I do have this demo program in which main.c is disabled so it would start from main_pinpong.c which is the only file withint main( void ){included in target build startup_stm32l476xx.s is supposed to be the startup file but I do not see any reference tomain.c or main_pinpong.c I see that main.c is not included in target build but main_pinpong.c is includedso they question is what points the compiler to execute int main( void ) from main_pinpong.c
Hello, I'm new to STM world, so I'll post what may seem a trivial question to many, but which is not totally clear to me: I'd like to understand better the behavior of the micro controller in a situation like:/* Configure ISR on UART RX */ /* Enter Critial Section */ uint32_t primask_bit = __get_PRIMASK( ); __disable_irq( ); /* Do stuff */ /* !!! ISR occurring on UART RX !!! */ /* Do other stuff */ /* Exit Critial Section */ __set_PRIMASK( primask_bit ) Is the ISR totally ignored by the micro controller or the IRQ associated to the ISR is executed right after line 12?I understand that __disable_irq() works on the I-bit of the CPSR register, which disables IRQ interrupts globally, so my guess is that the NVIC may take trace of the ISR occurrence until the core has re-enabled the I-bit of CPSR register (line 12).Is this a correct interpretation or is it misleading?Also in case the IRQ of UART ISR is responsible of re-configuring the interrupt enable bit in UART registers, is
Hi!!I am using ThreadX to develop a project.As far as I know, when using FreeRTOS, it is highly recommended to switch from SysTick to another timer.Is it the same for ThreadX?Therefore, I am using TIM7, which is a simple timer. I was wondering where I can find the TIM7 base function that is called every tick. I want to include a function there, but I cannot find it. Thanks!
My USB is a virtual COM port. I am trying to implement the BCD feature in order to detect what type of port is present when USB a cable is attached. We have charging capability and will use the type of the connected port to determine whether to enable charging, and also to restart the USB comms stack.My code runs a non-blocking timer-driven state machine equivalent to HAL_PCDEx_BCD_VBUSDetect().The first time I connect a cable, I can see the device appear in Windows Device Manager. I can open a Putty window and send/receive data. Success! When I disconnect the cable, Putty loses the connection as expected.The second and subsequent times I connect the cable, I can again see the device appear in Windows Device Manager. I can again open a Putty window. But this time, no data is sent or received. It just seems to be dead.What could explain this? It appears from other comments online that toggling between BCD and USB mode only works properly the first time. What is the fix for this? My code
I am using LWIP 2.1.2 in stm32f769I discovery board.I can ping IPv4 from my PC.But i can't ping IPv6.I have enabled the Autoconfig(Stateless).As per my understanding the IP address will be created based on the MAC.My MAC is 00:80:e1:00:00:00Link local address is fe80::280:e1ff:fe00:0000I tried to ping this address from my PC.But host is unreachable.IPv4 is working but IPv6 is not working.I have attached my code below.Please tell me how to solve this issue.Thanks in advance.///////////////////////////////////////////////////////////////////////////////////////////////void MX_LWIP_Init(void){ /* IP addresses initialization */ IP_ADDRESS[0] = 192; IP_ADDRESS[1] = 168; IP_ADDRESS[2] = 0; IP_ADDRESS[3] = 102; NETMASK_ADDRESS[0] = 255; NETMASK_ADDRESS[1] = 255; NETMASK_ADDRESS[2] = 255; NETMASK_ADDRESS[3] = 0; GATEWAY_ADDRESS[0] = 0; GATEWAY_ADDRESS[1] = 0; GATEWAY_ADDRESS[2] = 0; GATEWAY_ADDRESS[3] = 0; &
I'm writing software that involves reading a single ADC value from my STM32H7R3V8H6, however it is getting stuck in HAL_ADC_PollForConversion(&hadc1, HAL_MAX_DELAY);.If i switch the delay to a smaller value it runs through but it still returns a timeout.while (1) { HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1, 100); adc1Data = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1); //readT(&engine, 0); //readP(&engine, 0); /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } static void MX_ADC1_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_MultiModeTypeDef multimode = {0}; ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Common config */ hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.ScanConvM
I have implemented a dual CDC-ACM USBX device, and would like to incorporate a mechanism to programmatically differentiate the two ACM's at the Host. One mechanism would be to have each ACM carry with it it's own Serial Number, but I am at a loss as to how to do this. The best way (I think) would be to incorporate a unique String Descriptor Table for each device. Please give me a hint as to how to do this!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.