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 interface STM32(master) with raspberry PI 4B(slave)I am first referring the example and checking if there is any slave transmitter example in the STM32F4 code repo.In every STM32 SPI example i have seen there are three folders - SPI_FullDuplex_ComDMA- SPI_FullDuplex_ComIT- SPI_FullDuplex_ComPollingInside the reade me I see the connection diagram, there Is no CS connection. Only MISO, MOSI, SCK.Wich example I can use or my purpose.Is there any example for at least the Slave Side which can initiate the transfer ( may be asserting the IRQ line to master and then the master receiving the data from slave?In all the examples provided there is no such case ( no such IRQ which can inform the master and then the master lowers the CS and STM32 slave can send data to STM32(master) - maybe I will use it for my scenario if it is there) Please let me know or guide me.How can the master know how many bytes are being sent (dynamically) or is it that we to hardcode this numb
hello,I already have developed a custom uart bootloader program on STMcube IDE for STM32f446 (Nucleo board) and an host C# app to fully functionality of bootloader services and i functional well.The problem is that i need to add feature which make sure or verify the integrity of the user app code before run it (i.e. after it receive Go_to_User_App command from C# app/tool). the implementation i made is that is to append the 32-bits CRC code of the user app at the begining of the .bin file. so, the 1st word of app is now CRC code of app. and 2nd word is the MSP. and 3rd word is the REST handler. after doing that the user app is not running as expected!so, need more help for identify the issue up there please.below is screenshots illustrations.*this is the memory layout after flashing the user app code with appending its CRC at the 1st word at sector 2 (address of 0x08008000)* *this is the C function in bootloader code that perform the jump to user app without checking the CRC of ap
Using a Nucleo-G431KB developoment board, I played a bit with UART RX DMA.I started a DMA RX on a linear buffer, and would stop and then restart the DMA.I just observed that after receiving a couple of bytes, HAL_UART_DMAStop no longer stops the DMA on UART RX. The HAL_UART_DMAStop call does not return an error, but HAL_UART_Receive_DMA does, as the tranfer never stopped. I also observed characters would still be received into the DMA UART RX buffer, confirming the DMA didn't stop.It happens only after I received a couple of bytes in the buffer. A single byte caused no problems.I couldn't find the root cause.Anyway, starting HAL_UART_Receive_DMA only once on a circular buffer and checking __HAL_DMA_GET_COUNTER is a better approach for incoming UART data of random size.I'm just wondering if somebody noticed this too.Is it a bug in HAL?Unfortunately, I no longer have the code but it was just straight forward, like calling in a loop, something along these lines:uint8_t DataRX[256]; &
..
I am trying to transmit/receive data via Virtual COM port in the STM32L5xx using the USB CDC libraries. I understand that the entry to the CDC_Receive_FS() would give me an entire packet of data that I enter on the serial terminal. I would like to know if there is a way to just read a single character upon entry to the CDC_Receive_FS() and read the data in successive callbacks?Any leads on this would be really of help.Thanks,Janani
helloWe have some problems to run the "32L496GDISCOVERY\Nx_TCP_Echo_Client" from the "STM32CubeExpansion_CELLULAR_V7.0.0" package (with AZURE RTOS).What we did so far: we changed the entries in "plf_cellular_config.h" to meet the requirements of our SIM card provider (APN, username, password).Than we built and deployed this project (successfully) to our P_L496G-CELL02 board with Tera Term attached to the VCP of the eval board.What we see here is the folowing log:===== X-Cube-Cellular version : X-CUBE-CELLULAR-7.0.0 =====BG96 UART config: BaudRate=115200 / HW flow ctrl=1DNS Server address: 8.8.8.8SNTP Time Sync...0.pool.ntp.orgSysCtrl_BG96:Waiting 5500 millisec for modem running...SysCtrl_BG96:...doneModem Boot OK, sim slot nb 0SysCtrl_BG96:MODEM SIM SOCKET SELECTEDATCore ERROR:AT_sendcmd errorATCore ERROR:AT_sendcmd error: parse from rspLOG ERROR #1: channel=1 / errorId=11 / gravity=2LOG ERROR #2: channel=1 / errorId=14 / gravity=2LOG ERROR #3: channel=2 / errorId=1 / gravity=2Modem Bo
There is a bug in STCubeMX regarding LevelX. After changing the settings in the Code Configurator (even those not related to system settings, only e.g. UART) the "lx_stm32_nor_custom_driver.c" file is being damaged. Namely, the content of our custom code placed in the lx_nor_driver_write function is inserted into the lx_nor_driver_block_erase and lx_nor_driver_block_erased_verify function. See the before and after screen grabs - these are only single lines placed between /* USER CODE */ comments. We are currently working with v1.10.1, however, after upgrading to v1.11.0 the issue persists. We use a processor from the H7 family, namely ST32H723, FileX, LevelX with NOR driver (custom NOR driver). This error limits the use of the Code Configurator by our team. Can we expect the bug to be fixed soon?
Hi,I am using a STM32 for DFU and webUSB.Sorry if my question is redundant.I can't find any information regarding the right and limitation of using STMicroelectronics USB vendor ID 0x0483.Is there a prototype or generic product id?Thanks
Hello , I'm using Nucleo-G431RB board , and I am trying to flash the MCU via UART1 using PA9 and PA10 pins but I can't make it work .. I get an error like "Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... " I'm using STM32Cube Programmer , also I followed the instructions in AN2606 , the application note states that it should follow pattern 15 , as far as I can view the option bytes using the onboard ST-Link , nSWBOOT0 comes unchecked so software decides if it should run starting from bootloader address .. My settings for UART are 9600 Baudrate , Even parity . NBOOT0 and NBOOT1 comes checked so it seems it is not applicable for any pattern to jump bootloader mode , So I tried setting NSWBOOT0 so it matches the pattern stated "BOOT_LOCK(bit)=0, Boot0(pin) = 1, nBoot1(bit) = 1 and nBoot0_SW(bit) = 1" , I manually tied BOOT0 to 3.3V and when I reset the MCU I can verify that it starts
Hello. I'm trying to implement a laptop keyboard on a microcontroller. I can not find usb codes for some fn buttons. The usb protocol has descriptions for combinations of changing the display brightness, volume, media keys, but more is needed. Can someone tell me where to find usb codes for disable touchpad or enable airplane mode? Here is my HID descriptor for the keyboard. 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x06, // USAGE (Keyboard) 0xa1, 0x01, // COLLECTION (Application) 0x85, 0x01, // Report ID (1) 0x05, 0x07, // USAGE_PAGE (Keyboard) 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl) 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x08, // REPORT_COUNT (8) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x01, // REPORT_COUNT (1) 0x75, 0x08, // REPORT_SIZE (8) 0x81, 0x03, // INPUT (Cnst,Var,Abs) 0x9
Does ST manufacturer a chip that allows integration into a project which provides USB to SWD for the additional ST32 chips? I would like to remove the need for an external programmer and just be able to add a preconfigured USB to SWD SW-Link bridge into a custom program. I guess I am looking for something similar to what ESP32 is now doing. The new EPS32 system has fabric built into the chip which provides direct SWD through the USB interface therefore removing the need for a programming header and external programmer.
I just need a basic USB HELLO WORLD code example that works.I have tried a few step by step examples that were for other boards and one I found specifically for the F767zi, but my windows machine does not even see an Error connecting, it acts like nothing is connected. Here are the basic steps I have tried to follow:Start a new project:Select the board "Nucleo-F767zi"Connectivity - USB_OTG_FS- Mode=Device Only. Clock Config: Input 8 mhz. yielding USB 48mhz. (allowed auto Resolve to fix all conflicts)Middleware: USB_Device: class for HS IP (Disable), Class for FS IP (Communication device class (virtual Port Com)Build the config code.the user includes are:#include "main.h"#include "string.h"#include "usb_device.h"however, there are USBD_CDC.H and USBD_CDC.C in the project files that are not called. I am just guessing they are referenced in one of the other modules. no example I have found mention adding them to the includes.Without any additional code, the online examples say this shoul
I have tried unsuccessfully to jump from the application area to the Boot address.As much as I try I can not get into boot by software.What is wrong with my code ?. SystemInit(); HAL_RCC_DeInit(); SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; __set_PRIMASK(1); __disable_irq(); typedef void (*pFunction)(void); pFunction Jump_To_Bootloader; uint32_t JumpAddress; JumpAddress = *(__IO uint32_t*) (0x1FFFF6A6 + 4); Jump_To_Bootloader = (pFunction) JumpAddress; __set_MSP(*(__IO uint32_t*) 0x1FFFF6A6); Jump_To_Bootloader();I'm using stm32F042k6k6. And every time I try to go to the boot address happensHardFault_Handler
Hello,STM32L476.FreeRTOS 10.3This call:while(1){ vTaskDelay(pdMS_TO_TICKS(1000)); HAL_GPIO_Toggle...... }should wait 1 second, toggle a pin again and again. With a single task, it looks ok:On this graph the bottom pin toggles every second.The blue bar is in fact a toggle on a pin in the IdleHook function which means that the MCU does nothing nearly all the time.Now, if I add a second task that does some interesting job, with the same priority (1), here's the result:The delay function result is 1.6s instead of 1s. The 0.6 difference is equal to the sum ofthe duration of all the moments the mcu is not idle.My understanding is that:as systick is the lowest priority, it is always counted, whatever what's going on other interrupts.When the requested delay is elapsed, the os should switch to the delayed task at least when it is idle.On this case, the MCU is idle most of the time but the delayed task is not executed after 1 second.Why?ThanksJulien
Hello,I am using STM32L4q52gt6P controller. for application development, I am using freeRTOS.When no task running in RTOS at that time I put the controller in sleep mode from the idea task of RTOS.I have used 12Mhz of HSE, 16Mhz-SYSCLK with PLLCK, AHB Prescaler -1, HCLK 16Mhz, and most of the GPIO are used.Also, I am using external SMPS for VDD1V2. My MCU current Consumption is around 3.24mA in run mode and 1.2mA in Sleep mode.I have added a snap of the datasheet STM32_RUN_MODE I want MCU current consumption as per mentioned for fHCLK 16Mhz in the datasheet.Anyone, please suggest to me what thing I need to set to achieve 0.88 mA current of CPU?What are the steps I need to take care to achieve this or where I need to debug or which additional HAL API needs to config 0.88 mA current of CPU?Your response will be highly appreciable to me
Cube MX generates a call with a value of NVIC_PRIORITYGROUP_4 which is defined as#define NVIC_PRIORITYGROUP_4 0x00000003U /*!< 4 bits for pre-emption priority 0 bits for subpriority */but if you follow the function NVIC_SetPriorityGrouping() it limits the value to 3 bits anyway, and the effect of both is identical, so why does Cube default toNVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4)I have tested both in my target and they both work apparently the same, but if there is some very subtle difference, I might never know.There is a hint herehttps://freertos.org/RTOS-Cortex-M3-M4.htmlwhich saysMost systems default to the wanted configuration, with the noticeable exception of the STM32 driver library. If you are using an STM32 with the STM32 driver library then ensure all the priority bits are
Greetings !I am using STM32F743 Evaluation Board for my Project . I am currently working on Firmware Upgrade over the Ethernet . Can you kindly provide any sample application / procedure for the same .Thanks in Advance
Hi,I'm stuck at a problem when using a custom bootloader.What works:All ISRs get triggered when not using the bootloaderAlmost (sic!) all ISRs get triggered when using bootloader together with my applicationWhat doesn't work:BMDA_Channel1_IRQHandler does not get triggered when using bootloader.What I already analyzed (using JLink/GDB disassembly on the target):BMDA_Channel1_IRQHandler lies at address 0x804feac, NVIC jump offset for this ISR is 0x248 according to datasheetSCB->VTOR is 0x8040200Address 0x8040448 contains 0x804fead (so everythings set up to jump to 0x804feac)Address 0x804feac never gets triggeredDefault_Handler lies at address 0x080745d4 (this is where my application gets stuck)When stuck, APSR is 0, EPSR is 0 except Thumb bit, IPSR is 0x92 (that's BDMA_CH1...), SCB->ICSR->VECTACTIVE is 0x92, SCB->CFSR is 0, SCB->HFSR is 0As far as I can see, the processor should jump to 0x804feac and execute my IRQHandler.Any idea what's going wrong?Thank you in advance!
Greetings !I am very new to Controllers , I need to enable and ping the Ethernet on STM32F769 . Can anyone kindly suggest me with the steps/procedure to enable Ethernet in STM CubeIDE so that I can ping from my Local Machine.Thanks
Hello Everyone,First of all I have run the project with STM32H745I + USB_OTG_FS + FATFS + MSHC for the pendrive application and it runs without any error, I am able to create a file, directrory & write into the file.But when I add FreeRTOS in the same combination of existing project I can only mount the USB after that I stuck in HardFault handler. I don't know what the exact setting I have to do with FreeRTOS.If anyone have idea please help me out.Thanks!
Hello, I am using uVision to code a project, and I picked up this project after another engeneer left the company. We have a DFU bootloader implementation that flashes the program at 0x8005000, and the bootloader at 0x8000000. But when I try to flash the code at 0x8000000 for development porpouses the debugger loses control. I use a STLink
When my STM32G0B1KET receives an Discover SVIDs message, it responds GOODCRC, then the core library function PE_StateMachine_VDM() calls the reset handler. After reset the system hardfaults. System responds to discover identity properly. The USBPD_VDM_DiscoverSVIDs callback is properly initialized and not reached. A little stuck on this working with just the disassembly. Any suggestions for a fix would be appreciated.
I am porting code from STM32L4R5 (STM32L4R5VIT6) to STM32H743 (STM32H743VIT6). All the porting has gone well except for the last part being Bootloader. We use Boot0 pin Grounded and request to go to bootloader within the application. I should also mention that we are using SPI (SPI4 in case of STM32H743, and SPI2 in case of STM32L4R5) for bootloader communication with the primary micro.Details: In our system, the primary micro is iMX7 and the secondary micro is the STM32. They communicate via SPI. On the "main" loop of STM32, among its many tasks, it continuously monitors for request to go into bootloader. Once, it detects the bootloader request, it calls the Bootloader routine (attached below for both STM32L4R5 and STM32H743). In the meantime, the iMX7 is listening for the STM32 to go into bootloader. Once it detects STM32 is in bootloader, it sends the new firmware to it.In our previous design that uses STM32L, Bootloader works just fine. However, in our latest design using the
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.