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 trying to access a NOR flash via OctoSPI1. CLK is connected to PF4, NCS is connected to PI5. While I can see clock cycles on PF4, PI5 stays high all the time.Does anyone have an idea, what could be wrong?Trust zone is disabled. The register settings are as follows:OCTOSPI1:CR: 0x10000000DCR1: 0x001F0008DCR2: 0x00000001DCR3: 0x00000000DCR4: 0x00000000SR: 0x00000000DLR: 0x00000002AR: 0x00000000DR: 0x00000000PSMK: 0x00000000PSMAR: 0x00000000PIR: 0x00000000CCR: 0x01000001TCR: 0x00000002IR: 0x00000090ABR: 0x00000000LPTR: 0x00000000WPCCR: 0x00000000WPTCR: 0x00000000WPIR: 0x00000000WPABR: 0x00000000WCCR: 0x00000000WTCR: 0x00000000WIR: 0x00000000WABR: 0x00000000HLCR: 0x00000000OCTOSPIM:CR: 0x00000000P1CR: 0x02000000P2CR: 0x06010121GPIOI:MODER: 0xFFF55BBFOTYPER: 0x00000000OSPEEDR: 0x00000cc0PUPDR: 0x00000000IDR: 0x00000020ODR: 0x00000000BSSR: 0x00000000LCKR: 0x00000000AFRL: 0x00506000AFRH: 0x00000000BRR: 0x00000000SECCFGR: 0x0000FFFF
Hello I'm using a STM32G0B1. I programm it with CubeIDE 1.13.2. I used the CubeMX to define the hardware and I also use the HAL together with FreeRTOS.I want to configure the MCU as a composite USB device. It should provide HID and VPC (Uart) for configuration and debugging.At the moment I'm a little bit lost. I don't have much experience with USB. The USB moddleware support either HID or VPC but not both at the same time. There seems to be a define USE_USBD_COMPOSITE but this is not really usable. At least usbd_composite_builder.h seems to be missing.I found TinyUSB but support for the G0 seems not to be included yet.I found a usbd_composite_builder.h in the web but I would assume that more is missing and it wouldn't fit together.Is there a chance that composite functions will be added?What would be the best start?Thank you very much,
The hope is to use the STM32G4 to run FreeRTOS. Doesn't seem like the current implementation will fit within 128KB, but I don't have enough pins available to use the FSMC. Is there any way to use something like the apmemory IoT RAM (can't post the link as new member, but if you search "IoT ram stm32" it's the result) chips to increase the SRAM?
Hello everyone,I'm working on a new project that needs USB communication between two controllers. My initial design was based on the STM32L552, but due to market availability, I had to switch back to the STM32F205Z. So, everything has changed including the USB section. I intend to connect the STM32F205Z (host) to another controller on the same board (peripheral). The USB3320 transceiver is used for ULPI link between the two controllers. I made some research and found a lot of contrasting info about this PHY. Some confirm it works for them on F4/F2 and some couldn't figure it out for some reason. My implementation has to look like the following somehow:USB signals will be shared between one connector (used to connect to ext. peripheral) and another controller on the same board in HS mode. One of them will be active at a time. The USB implementation is self-powered. Not sure yet if it's better to add FS_OTG for the external peripheral instead of sharing the USB bus signals as in the sche
I am very new to STM32 platform and this is our first project on STM32. We are facing issues with STM32LCVT6TR RTC.This RTC has Alarm A and Alarm B set at predefined times and go into the shutdown mode and they should wake up on predefined alarms A and B. Alarms A work perfectly but processor does not wake up on Alarm B.We are using Shutdown mode of the STM32 where processor goes into the shutdown mode. We have also found that when processor wakes up on Alarm A, the minute value of Alarm B is sets the wrong value even if we ensured in debug correct value is passing to the function.Here is my code:/* This function calls in main.c while initialise */void InitialiseApplication(void){uint8_t WakeupStatus;RTC_AlarmTypeDef RTC_AlarmTime_A;RTC_AlarmTypeDef RTC_AlarmTime_B;RTC_TimeTypeDef RTC_CurrentTime;HAL_RTC_GetAlarm(&hrtc, &RTC_AlarmTime_A, RTC_ALARM_A, RTC_FORMAT_BIN);HAL_RTC_GetAlarm(&hrtc, &RTC_AlarmTime_B, RTC_ALARM_B, RTC_FORMAT_BIN);HAL_RTC_GetTime(&hrtc, &RT
I am encountering an issue with UART receiving interrupt, where it intermittently stops receiving data after a series of AT commands have been sent to a GSM modem. The UART communication is configured to use DMA for data transfer, and we have assigned the appropriate DMA channels. Following is the code: On initialization:MX_USART1_UART_Init(); //UART InitializationHAL_UARTEx_ReceiveToIdle_DMA(&huart1, RX_Buffer1, 50); //Enable Interrupt The below is the code for transmitting AT commands:memset(RX_Buffer1,0,sizeof(RX_Buffer1)); //Clearing the receive buffermemset(ATcommand,0,sizeof(ATcommand)); // clearing the transmit buffersprintf(ATcommand,transmit_commands[AT_command_number]); //Get command from the command arrayHAL_UART_Transmit(&huart1,(uint8_t *)ATcommand,strlen(ATcommand),1000); // UART TransmitHAL_Delay(300); ///Delay 30
Brief:Want to use STM32L432 MCU and FUSB302B PD controller asking voltage higher then 5V.Question:Where am I set wrong of the PD controller?Is there anything else I need to consider when asking the PD source?Hi, I'm working on a project for digital auxliary power in card size.The puropse is using Type-C connector connect to any source, have four output voltage can be choose, they are 3.3V / 5V / 12V and 24V.I'm using power delivery (PD) for asking voltage higher then 5V for more output wattage.Althought I had completed the power stage for 5V input, now I want to write PD firmware to asking higher voltage.The MCU I used is STM32F432KC, PD controller I used is ONSemi FUSB302B.I got stuck when I want to receive power data object (PDO) from PD source, like the wall adapter.Here is register map of FUSB302B: And here is my register setup after FUSB302B_start_CC_communication(): The function is doing following things:FUSB302B_start_CC_communication:&
Hello everyone,I have a strange problem with the TCP server running on F429zi.In my program, I am using the TCP Server example from the Cube IDE. I just added a function that copies received frames to my buffer, which I then handle myself in another function. The TCP client sends me 84 byte frames. After receiving 1530 frames, communication breaks down. No connection to the Nucleo board, PING does not work. Wireschark shows that the board is sending back a TCP ZEROWINDOW message. The problem always occurs at the same time. The rest of the program works all the time. The problem is only with the ethernet.Can anyone advise where to look for the error in my code?
Hi everyone,I own a nucleoH743ZI2 board trying to implement a Modbus TCP/IP protocol over a LwIP package. It's crucial for my application not to add FreeRTOS or any other OSs. The software used for the FW development and configuration is CubeIDE 1.13.1 and CubeMX 6.9.1.There is a number of examples around the internet describing how to set correctly the project, some of them are not even coherent one to another. I'm aware I am missing some notions, some very low level ones about memory management and most likely those notions prevent me from solving my issue.I successfully implemented the LwIP stack on the nucleo board, ping is performing correctly. Now I'm trying to operate the modbus protocol as well, the nucleo operates as server and I use my laptop with a dedicated SW tool as client. The connection and data exchange starts for a few seconds, then it goes directly in "Write error" and "Read error". The nucleo board can't be pinged from that moment on.I believe it is a memory managem
Every time the HAL_ library read functions are called they automatically disable the PSSI peripheral itself. This is done in accordance with the Reference manuals callout that the CR cannot be changed while the device is enabled, to allow for the below block to change the CR every time the read is called. /* Configure BusWidth */ if (hpssi->hdmatx->Init.PeriphDataAlignment == DMA_PDATAALIGN_BYTE) { MODIFY_REG(hpssi->Instance->CR, PSSI_CR_DMAEN | PSSI_CR_OUTEN | PSSI_CR_CKPOL, PSSI_CR_DMA_ENABLE | ((hpssi->Init.ClockPolarity == HAL_PSSI_RISING_EDGE) ? PSSI_CR_CKPOL : 0U)); } else { MODIFY_REG(hpssi->Instance->CR, PSSI_CR_DMAEN | PSSI_CR_OUTEN | PSSI_CR_CKPOL, PSSI_CR_DMA_ENABLE | hpssi->Init.BusWidth | ((hpssi->Init.ClockPolarity == HAL_PSSI_RISING_EDGE) ? PSSI_CR_CKPOL : 0U)); }RM Quote: Bit 14 ENABLE: PSSI enable0: PSSI disabled1: PSSI enabled The contents of the FIFO are flushed when ENABLE is cleared to 0. Note: When ENABLE
Hi all,I'm working on STM32WLE5JC, I've develop very simple bootloader starting at flash memory at 0x08000000 for 20K. My booloader is simple just blink a user led and jump to the firmware.Right now I'd like to have the possibility to jump to the bootloader from my appplication, I've read this very usefull article I've understand what I have to do, instead of jump to 0x1FFF000 jump to 0x0800000 (my flash memory where my own bootloader is saved).But my question is, is it possible when I jump to the booloader from my application to set a variable somewhere and have access to it from my bootloader ? Maybe use RAM, because if I jump to booloader from application, my board will always power up so RAM content will be present, am I right ?
Hi everyone!I'm trying to transmit some data using SPI2 on a NUCLEO-H743ZI board (only TX). To do it fast I'm using DMA with HAL_SPI_Transmit_DMA(), but it returns with an error (from line 1465 in stm32h7xx_hal_spi.c):/* Packing mode management is enabled by the DMA settings */ if (((hspi->Init.DataSize > SPI_DATASIZE_16BIT) && (hspi->hdmarx->Init.MemDataAlignment != DMA_MDATAALIGN_WORD)) || \ ((hspi->Init.DataSize > SPI_DATASIZE_8BIT) && ((hspi->hdmarx->Init.MemDataAlignment != DMA_MDATAALIGN_HALFWORD) && \ (hspi->hdmarx->Init.MemDataAlignment != DMA_MDATAALIGN_WORD)))) { /* Restriction the DMA data received is not allowed in this mode */ errorcode = HAL_ERROR; __HAL_UNLOCK(hspi); return errorcode; }After replacing 'hdmarx' to 'hdmatx' (as I'm only trying to transmit some data and I'm not interested in receiving) it works as it supposed to.Is this a possible bug, or am I just lucky to make it work somehow (I'm new to HAL)?
Posted on June 22, 2018 at 15:58There seem to be some bugs in the H7 HAL library.Firstly HAL_I2S_Receive_IT() causes a HardFault because, as far as I can see:1) OVR flag is not cleared2) in `HAL_I2S_IRQHandler()` there is an attempt to call ` hi2s->TxISR(hi2s);` when TxISR is set to NULL.void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s){ uint32_t itsource = hi2s->Instance->IER; uint32_t i2ssr = hi2s->Instance->SR; /* I2S in mode Receiver ------------------------------------------------*/ if(((i2ssr & I2S_FLAG_OVR) != I2S_FLAG_OVR) && ((i2ssr & I2S_FLAG_RXNE) == I2S_FLAG_RXNE) && ((itsource & I2S_IT_RXNE) != RESET)) { hi2s->RxISR(hi2s); // not called because OVR not cleared return; } /* I2S in mode Transmitter ---------------------------------------------*/ if(((i2ssr & I2S_FLAG_TXE) == I2S_FLAG_TXE) && ((itsource & I2S_IT_RXNE) != RESET)) { hi2s->TxISR(hi2s); // HardFaults when TxISR == NULL return; }Secondly i
Hi,I am using Cubemax version 6.8.0 for driver generation after configuring QSPI i am not able see any QSPI related driver in stm32ide Version: 1.12.0Regards,Prakash R
Hello,We would like to program new STM32H7 chips (running the default bootloader) from another STM32H7 over UART. Looking at AN3156 and AN2606 this seems to be possible but is there any sample projects or drivers (by ST or open source) that implement this DFU protocol to get us started writing the program that will send the binary, modify option bytes and flash the new chips?Thanks in advance, Callum
Hi guys,I'm currently trying to figure out how to flash a new software update on a Discovery kit STM32 B-L4S5I-IOT01A (dual flash bank) via Azure IoT Device Update. I've followed Microsoft's example on Github (link) and it works. What I have trouble with, is to integrate this update logic into another of their base samples.I've copied the code responsible for handling the update into the second sample. The update is downloaded onto the board, but once it's installed, the board doesn't boot up and I just get "ERROR, ERROR, etc" in the screen output.Does anyone have an idea? I'm pretty new to all of this. I've double checked that it was written to the the address 0x0810 0000.
Hello,I made with cubemx an ethernet project for the stm32f439 (custom Board), but it doesn't works. When i just use the stm32f407 Discovery Board with the same project, it works without any change. The custom board has the same DP83848 Phy. I read the registers and both are the same. The stm32f439 don't send any package out.Thanks for any help
Hello,I am using STM32H7 dual core series. My STM32CubeIDE works fine when I am using HSI. But whenever I set the configuration to HSE, I am getting Break at address "0xa05f0000" with no debug information available, or outside of program code error. I tried different crystals, 8MHz & 25MHz, but this issue still persists.Could you please tell me where exactly I am doing things wrong? Is the crystal setting just a reason for the error but the actual error is something different?Please guide.- Regards,Hrishikesh
I want to share my related code and photo here. The program runs on an STM32F746 Nucleo Board. It uses timer 2 to trigger DMA1 stream 0 causing fixed-length transmission of data via SPI 1 to an external ADC without interrupts on the transmission side. Timer 2 confüguration is settled at 25600Hz this is used as a sample rate. Therefore data must be received with SPI3 every 25600Hz. I created a test pin to understand that the sampling process is finished. The sample size is 64. The complete time is 64 x 1/25600 = 400Hz. I can see this period with diligent oscilloscope but the received data is empty. Can you show me where I'm doing wrong?Code: SPI_HandleTypeDef hspi3;DMA_HandleTypeDef hdma_spi3_rx;TIM_HandleTypeDef htim2;DMA_HandleTypeDef hdma_tim2_up_ch4;#define fs (25600)#define RX_BUFFER_LENGTH (64)memset(rxBuffer, 0, sizeof(rxBuffer));txBuffer = 0xFFFF;// Start SPI RX DMAhspi3.hdmarx->XferCpltCallback = mySPI_DMAReceiveCplt;SET_BIT(hspi3.Instance->CR2,
Hi All,I'm facing a strange issue on UART, I generate the code by CubeMx for UART functionality, UART is working fine but when ever i remove the TTL (Serial to USB) and keep Rx pin float, UART interrupt occurred continuously and main application stopped.I want to know why interrupt occurred on floating UART pins
Hi all,I am trying to generate a PWM signal with both variable pulse width and period. I think the HAL_TIM_Base_Start_DMA function can only generate it with variable pulse width but not variable period. I have checked the timer cookbook and found the corresponding document at CH5 (p.44). (https://www.st.com/resource/en/application_note/an4776-generalpurpose-timer-cookbook-for-stm32-microcontrollers-stmicroelectronics.pdf) However, I still fail to realize it after copying the code provided on p.55. The pulse generated is a repeatable pulse with ARR and CRR as predefined value, the aSRC_buffer seems not able to load into the register. Can anyone tell me why, or provide me a same code which could work? Thanks a lot.
Bonjour, J'essaie de faire communiquer ma carte Nucleo-723ZG avec un périphérique LIN.Apriori, ma carte est adapter au protocole LIN et j'arrive à configurer mon périphérique USART1 en LIN. J'utilise avec ma carte un transceiver LIN. Quand j'envoi une data sous 8 bits, avec le code suivant: GPIO_PinState B1_State;uint8_t pData;uint16_t Size;uint32_t Timeout; /* USER CODE END 2 */ /* Infinite loop *//* USER CODE BEGIN WHILE */while (1){B1_State=HAL_GPIO_ReadPin(B1_GPIO_Port, B1_Pin);pData=0x01;Size=8;Timeout=100;/*Envoi d'une trame appui BP user*/if (B1_State==1){while (1){B1_State=HAL_GPIO_ReadPin(B1_GPIO_Port, B1_Pin);if (B1_State==0) {HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET);HAL_UART_Transmit(&huart1, pData, Size, Timeout);HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_RESET);HAL_GPIO_WritePin(LD3_GPIO_Port, LD3_Pin, GPIO_PIN_RESET);break;} J'observe ce
MCU is STM32L4R9 with 1MB. I'm having trouble getting the device to erase the upper half of the flash programmatically. Apparently the device ships with opt bytes set for dual bank.I connected the device to the STM32 programmer through USB and turned off the DBANK option byte, which changed programming somewhat and appears to program 0x2000 sized pages now. However it still doesn't appear to erase correctly, in this case it for sure won't erase page 127 or 0x080FE000.What puzzles me is that the programmer shows DBANK off, but the debugger still shows the OPTR DBANK bit set. Also, the note says on page 160 of datasheet rm0432-stm32l4..Note: For 1-Mbyte and 512-Kbyte Flash memory devices, do not care about DBANK.However this isn't really true, as this bit does apparently do something.
Hello,I am working on stm32u585 (B-U585I-IOT02A) board with BG95 M3 as cellular modem, I have intergrated x-cube-cellular package with freeRTOS for cellular modem.Now I am creating task that connect with Azure IoT hub for that I have integrated azure IoT middleware (GitHub - Azure/azure-iot-middleware-freertos: Azure IoT Middleware for FreeRTOS) in same working project.while connecting with azure IoT hub i got an error that AT command send error for QIOPEN command.I have attached app_freertos.c and azure_log.txt file.above added data in "plf_cellular_config.h", is there any missing steps while doing the azure connection?let me know, Thanks in advance !!
Hi,On a STM32 F7, I would like to lock access to the FLASH_CR by writing a wrong key to the FLASH_KEYR register. Writing a wrong key results in a bus fault (disabling the bus fault raises it to a hard fault).Could someone help me with a way to write a wrong key to FLASH_KEYR and mask the bus fault? I do not want to mask all bus faults (just this once when writing the wrong key).__set_FAULTMASK(1);FLASH->KEYR = 0;SCB->SHCSR &= ~SCB_SHCSR_BUSFAULTPENDED_Msk;__set_FAULTMASK(0);This only works when stepping through a debugger but not in the regular cases.Any suggestions would be greatly appreciated.Thank you.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.