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
Hello,I am trying to use the RTC on a F401CCU6, but the values of the RTC don't change, and stay to what values I've set them in the IOC. I'm using the following function to get the time, and I read the values in the debugger. RTC_TimeTypeDef sTime;HAL_RTC_GetTime(&hrtc, &sTime, RTC_FORMAT_BCD);The subseconds increments, but seconds and minutes don't. When I add an alarm, the alarm works correctly, triggering every second. The alarm follow the code present here https://wiki.st.com/stm32mcu/wiki/Getting_started_with_RTC. Removing the alarm does not change anything. I've also tried with a Nucleo f303k8, but even the alarm did not work.Thank you for your time, I've added my configuration below. static void MX_RTC_Init(void){/* USER CODE BEGIN RTC_Init 0 *//* USER CODE END RTC_Init 0 */RTC_TimeTypeDef sTime = {0};RTC_DateTypeDef sDate = {0};RTC_AlarmTypeDef sAlarm = {0};/* USER CODE BEGIN RTC_Init 1 *//* USER CODE END RTC_Init 1 *//** Initialize RTC Only*/
Hello, I am trying to write a routine, that takes an array of structures as input and sets the timer 1 parameters. This function is called after each overflow of timer 1. I turn off the respective channels, then set the parameters, as seen in the following ISR: void TIM1_UP_TIM16_IRQHandler(void){htim1.Instance->CCER &= ~(TIM_CCER_CC1E | TIM_CCER_CC1NE | TIM_CCER_CC2E | TIM_CCER_CC2NE | TIM_CCER_CC3E | TIM_CCER_CC3NE);HAL_GPIO_WritePin(TIM1_UP_GPIO_Port, TIM1_UP_Pin, GPIO_PIN_SET);HAL_TIM_IRQHandler(&htim1);HAL_GPIO_WritePin(TIM1_UP_GPIO_Port, TIM1_UP_Pin, GPIO_PIN_RESET); if (currentPattern < NUM_PATTERNS) {setconfig(&durations[currentPattern]);currentPattern++;} The setconfig function looks as follows::void setconfig(TIM_SU const* const timersetup) {// Function that takes a pointer to a TIM_SU structure as an argumenthtim2.Instance->ARR = timersetup->tim2_period; // Period of timer 1, i.e. the duration of the second pulsehtim1.Instance->
Hi every one. I have made a HID + CDC USB composite device. Windows recognizes it and I can control the volume and I have a COM port. HID is interface 0 and the CDC is interface 2 if this is of any significance. I can open the COM port with Tera Term and all works wonderfully, but when I try to open the port using python it breaks. Python gives the following error:Cannot configure port, something went wrong. Original message: OSError(22, 'The parameter is incorrect.', None, 87)If I make only CDC device my python code works just fine. Since I am not that good with USB what would be the next step? What info can i get for you guys.Cheers!
Hi all,I'm trying to get to know the STM32 world, and I have a STM32F746G-DISCOVERY board here. I've successfully tested a couple of TouchGFX things, and it seems quite neat.Now I want to test the possibility to output audio signals on the TRS output connectors, so it could be played on a speaker or headphones.However, I cannot for the life of me figure out how to do this.What's strange is that there seems to be no real Documentation or Tutorial on how to do this. Best I could find were some forum posts and blog articles, which vary greatly in approach, effort and quality.Also the Demo projects available in CubeIDE are not helpful, as they don't seem to work either. I flashed the "audio plackback and record" project onto my board, but only see 2 lines of log output on the screen and nothing else happens.So my question is: What's the easiest way to produce audio output on the STM32F746? And is there any good documentation/tutorials on how to do it?Any help would be much appreciated.Rega
Hello,STM32G474RE is the processor model I use.I read ADC from pin PA3 and I read IO from pin PC5. So whether these pins are common pins in the processor hardware? How can I separate these two pins from each other?
Does SanDisk Secure 4GB Class 4 SDHC Memory Card will support with STM32F732IE if not could you please suggest SD card with all specifications?
Hi community,one of project requirement we need to implement TCP IP protocol on STM32H747I DISC0.For our application we must use CMSIS (Common Microcontroller Software Interface Standard (CMSIS)) approved library so 1)LWIP is CMSIS approved or not?if not which stack we can use, which is approved by CMSIS. CONTROLLER:STM32H747I DISCOINTERFACE :RMII@STM32H743_User @stm32h723User @ETheu.1
I added a TIM16 to the project with interrupts to handle the servoUnfortunately, after adding it, the program started to crashBelow are screenshots of where it started to crashDoes anyone know how to fix this?This is how I configured TIM16: this is an i2c configuration:
HiI have a problem with the right priority setting, although I am not sure.The genelranie timer worked for me and refreshed the LCD screen every 375ms, but when I added interrupts for the ADC (needs to handle a potentiometer) then suddenly the TIM6 stopped working. Debugging the code I noticed that after going through this instruction:HAL_TIM_Base_Start_IT(&htim6);terminates the program, it just doesn't continue. This can be seen in the posted screenshots.Do you have any ideas? I also tried using DMA and unfortunately the effect was the same :(
HiIm using Stm32f429 disc1 board internal adc im using the signal generator and giving constant input but the waveform after plotting gives variation for each trail.
I am using Keil and want to debug the code on STEVAL-SMARTAG1.I modified part of the code, but the following error occurred during the download, resulting in the download failure, but I used the FP-SNS-SMARTAG1 code can be downloaded, can the code be modified?Here is a picture of Keil's error:
Hi everyone,I'm using System Workbench for STM32 with STM32CubeMX because the project is a little bit old, and I can't migrate to STM32CubeIDE. I have a problem with Stack Overflow, so I decided to turn on an option in RTOS:- GENERATE_RUN_TIME_STATUS- USE_TRACE_FACILITY- USE_STATES_FORMATTING_FUNCTIONSWhen I turn on this option, I can check the status of my devices, task memory, and WaterMark. However, the devices only work for about 1 minute and then freeze. When I turn off this option, the devices work fine for a longer time.I found that the problem lies in allocating memory to new Mail between tasks.I have an overflow in this struct:typedef struct os_pool_cb {void *pool;uint8_t *markers;uint32_t pool_sz;uint32_t item_sz;uint32_t currentIndex;} os_pool_cb_t;Do you have any idea how to find the problem? I've increased the heap size and the stack size, but the problem still persists. Currently,I have 20KB of free available memory.I'm using CMISS-RTOS 1.02,
Hi Forum,I am using the stm32H743 and trying to keep the power consumption as low as possible by entering sleep or stop mode. I am then using a lptimer to wake the device. Eventually, I will also use the timer to determine how long the device is asleep for. I have been using stm32cubeIDE/MX to develop with. When I use LPTIM1 this all works fine and the device is woken from sleep or stop mode.However, I have tried to move across to LPTIM5 and the device will wake from sleep mode, but will not wake from stop mode.From what I can see in the RM all the LPTIMERS can wake the device from stop mode, but just want to check that I haven't missed something.A couple of snippets below.. HAL_LPTIM_Counter_Start_IT(&hlptim5, 300); //300 seconds timer// HAL_LPTIM_Counter_Start_IT(&hlptim1, 300); HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);//HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI); Many thanksAlan
I am using Stm32L431Rbt6 for page writing on EEPROM M2456.When using HAL_I2C_Mem_Write_DMA , I am getting interrupt HAL_MemTxCpltCallback , but data is not written on EEPROM when I do page read on EEPROM.I am using I2C1, dma channel 6. I have enabled I2c event and error interrupt. I2C clock freq = 100 Khz., EEPROM page size is 64 bytes.I am setting the I2C_CR2_STOP bit in HAL_MemTxCpltCallback for generating stop condition. Please guide if I am doing anything wrong or provide any reference code using HAL_I2C_Mem_Write_DMA .
hello i,m new in programming and iot i have big trouble please help mehow make modbus tcp/ip and iot and controll realys with stm32f407 please help me step by step i can only ping with lwip but not know what should i do next?
I am relativelly new to embed software and I am trying to do a software package on a dual core stm32 H743ZI2 including these two: A bootloader with a go to function in both of its cores cm4 and cm7 and a blinky app at both cm4 and cm7 at the specific locations (CM4 blinky app will be on 0x08140000 and CM7 blinky at 0x08040000) in memory. So the program basically will work as this --> System starts, both of the cores start working Cm7 makes the blinky app's CM7 program work with a goto function and CM4 makes the blinky CM4 work with go to function. Is this possible to do so? Are there any restrictions regarding writing a go-to application on cm4 that goes another cm4 app?
Good Morning, when I use the following short function for initialisation - no VCP is detected under Linux: void USART2_Init(void){ RCC->APB1ENR|=RCC_APB1ENR_USART2EN; RCC->AHB1ENR|=RCC_AHB1ENR_GPIOAEN; ... ?!?! GPIOA->AFR[0]=0x0700; GPIOA->MODER|=(1<<5); GPIOA->MODER&=~(1<<4); USART2->BRR = 0x0681; USART2->CR1 |=0x2008; } Is it a RCC reset register issue? Best regardsTIMBO
Currently having some issues getting a ThreadX stack (ThreadX/NetX/USBX) to play nice and go to sleep after a certain timeout period on a nucleo board. I'm hoping to get some guidance on what might be causing my issues. I'm able to get sleep to work w/o TX just fine but with it, simply doing:void App_ThreadX_LowPower_Enter(void){ HAL_SuspendTick();HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);}void App_ThreadX_LowPower_Exit(void){SystemClock_Config();HAL_ResumeTick();}Results in the system waking up on each SysTick. Disabling the SysTick interrupt solves this issue but once I do this, the system no longer switches between threads correctly, and tx_thread_sleep is borked as well. void App_ThreadX_LowPower_Enter(void){ HAL_SuspendTick();CLEAR_BIT(SysTick->CTRL, SysTick_CTRL_TICKINT_Msk);HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);}void App_ThreadX_LowPower_Exit(void){SystemClock_Config();SET_BIT(SysTick->CTRL, SysTick_CTRL_TI
I'd need to sample 4 ADC channels in sequence mode without DMA (polling) for my STM32G0C6 device.I'm not able to find any example to implement this. Anyone can give me a hint?thanks in advance,gaston
Hello, I am trying to implement X-Cube-ClassB Software Package in my project that is using an STM32F4 MCU. According to the information provided in the website, it looks like I need to use Version 2.2.0. However, I'm wondering if the latest versions are backward compatible or not. In other words, my question is if I use later versions like 2.3.0 or 3.0.0, are they appropriate for STM32F4? Secondly, in the Application Note AN4435, it mentions in Table 1 that for STM32F4, the suggested HAL driver version is 1.7.1 and CMSIS Driver Version is 2.6.1. I've analyzed the release notes of the firmware package and figured out that Firmware Package 1.16.0 has those HAL and CMSIS versions. However, I can't download such an older version of the firmware package. From the STM32CubeF4 website, I can download up to V1.23.0. I went into the GitHub page as well and couldn't find V1.16.0. Does this mean that I have to use the latest HAL and CMSIS versions? If so, do I have to make the changes mention in
Hi,I want to use CBOR for my stm32F7. Is there any recomendation by ST for it or any opensource library that can be integrated?
I am using stm32g070rbt6 controller for my project, with 16MHz clock.Peripherals included in my project,1.UART2.I2C3.TIMERS(tim14 & tim17)Issue is like when I'm in debug mode, I couldn't able to go step by step code but when I put the breakpoint after the peripheral initialization, it keep hitting the same breakpoint and it feels like strange behaviorPlease help me out in thisThank You
Hi I need help setting up an Infrared transmitter using an STM32F3.I know timers and have thinkered with stm32's quite a while now, but I have no clue how I'd do an Infrared transmitter. :D I'd like to control some sort of device (f.e. a projector or a TV), emulating a remote controller (doesn't have to be a replacement, more like a proof of concept)I have found the following documentation, but don't know how to set it up and how / what data to send so that a projector or TV could be controlled. (Yes I know there are different protocols, but maybe someone can help me with a known one?, even if it doesn't work with my beamer, I need to be able to send at least some data over infrared)implementation of tx & rxIRTIMMY current configuration in CubeMX:TIM16 &n
HiI have a battery powered project, where I want to turn it on with a falling edge. MCU: STM32G431RBTo save power my plan is to set the STM32 to shutdown mode.Now my Question is, how can I wake up the MCU from a falling edge?I have read the following in the datasheet:Shutdown mode: The Shutdown mode allows to achieve the lowest power consumption. The internal regulator is switched off to power down the VCORE domain. The PLL, as well as the HSI16 and LSI RC-oscillators and HSE crystal oscillator are also powered down. The RTC can remain active (Shutdown mode with RTC, Shutdown mode without RTC). The BOR is not available in Shutdown mode. No power voltage monitoring is possible in this mode. Therefore, switching to RTC domain is not supported. SRAM and register contents are lost except for registers in the RTC domain. The device exits Shutdown mode upon external reset event (NRST pin), IWDG reset event, wakeup event (WKUP pin, configurable rising or falling edge) or RTC event (
Hello, I am currently facing an issue while attempting to establish communication between an STM32 Nucleo F446ZE development board and an MPU-9250 sensor using I2C protocol. I am utilizing the HAL_I2C_IsDeviceReady function from the Hardware Abstraction Layer (HAL) library to check the readiness of the I2C device (MPU-9250) before initiating communication. Regardless of the absence of a physical connection between the STM32 Nucleo F446ZE board and the MPU-9250 sensor, the HAL_I2C_IsDeviceReady function consistently returns HAL_BUSY as the status.I have also tried to delete everything from the stm32 microcontroller memory using STM32 ST-LINK Utility, but it didn't help.I think MPU9250 sensor is not a problem because when I connect it with Raspberry Pi 3 Model B via I2C communication protocol it works fine, I can read all sensor data and command for Raspberry terminal to detect i2c devices ' i2cdetect -y 1' returns the address of i2c on this sensor. But when I connect 
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.