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 would like to use NUCLEO-G071RB and X-NUCLEO-DRP1M1 to Source,UFP my USB devicesWhen the USB device side is set as Source, the role of data is DFP.I used the DR SWAP command to change from DFP to UFP.But there was no sample code in x-cube-tcpp_v4.0.0.I thought the following APIs would be applicable-- USBPD_StatusTypeDef USBPD_DPM_EvaluateDataRoleSwap(uint8_t PortNum)How should I use it?Best Regards
Hello everyone. I use STM32F4 to transmit CANBUS messages. When i connect Can High and Can Low lines to CAN-USB transformer i see messages coming to computer but after a short while the communication between MCU and computer stops. If i reset the MCU, message flows restarts but the same problem occurs again. Has anyone encountered and solved such a problem?Thanks
My idea is that:I want to put a resistor and a capacitor on BOOT0 pin. When normal code is running and i will go to update the firmware, i will send a command to USB. When MCU will receive this command, MCU will set BOOT0 pin to high state and charge the capacitor. After that MCU will runs an autoreset command.Could be it works?How much time BOOT0 pin must be stay high for entering in boot mode?Thank you for all.
No mention of HAL_UARTEx_RxEventCallback in UM1905 (Description of STM32F7 HAL and low-layer drivers, rev 4, 2020). Some commentary would be welcomed. Suggest your documentation be updated. It looks like the same function is missing in the F4 HAL UM, and possibly others. Thank you for your attention to this.
..
the Dead Battery Signals have been selected in stm32cubeMX, but when it run to "MODIFY_REG(SYSCFG->CFGR1, (SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE), ConfigDeadBattery);",SYSCFG->CFGR1 keeps default value.the clock is enabled.
I am getting FR_NOT_ENABLED error when i am trying to do File read write operation on SD card i need to know why am getting this error as my sd card is completely empty and RF_NOT_ENABLED is saying nothing but there is not enough space on logical drive.Hello , I need to now why i am getting FR_NOT_ENABLED Error , I am getting FR_NOT_ENABLED error when i am trying to do File read write operation on SD card i need to know why am getting this error as my sd card is completely empty and RF_NOT_ENABLED is saying nothing but there is not enough space on logical drive. I am just creating a file in write append mode and reading it but it keeps giving me this FR_NOT_ENABLED Error.How can i get rid off this error?
Cannot find LL_FLASH_ErasePage or LL_FLASH_WriteHalfWord ! Where I can find this ?Adam
I am trying to enable both DHCP and UDP in my Azure RTOS NetXDuo application, but when I enable DHCP the UDP selection is hidden, and vice versa. Why is this happening? Thx,MikeH
Hello,I am designing a device and one of the requirements is that two interfaces can be managed with the same ethernet port. One interface must be fully configurable (IP, mask and gateway) and the other can only be accessed locally (fixed IP and mask). I am using a NUCLEO-H723ZG that has a LAN8742A Ic and I would like to know if it is possible to do it.
I found a link as followinghttps://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Applications/LwIPI use tcp_echo_client to test on my stmh743eval 2 board, flashing and running is ok, but it doesnt include ioc file , i hardly to use it to migrate to my own app with new project. could you share all ioc files of the project example, that would be very useful. thanks
When i init UCPD ,the function USBPD_CAD_Init returns NO OK,then i try to find what is CAD,could you tell me?thanks
I generated my code by stm32cubemx,version6.1.2, and use ucpd2 as sink&dead battery,. But got USBPD_ERROR in USBPD_DPM_InitCore after execute " CHECK_PE_FUNCTION_CALL(USBPD_PE_Init(USBPD_PORT_0, (USBPD_SettingsTypeDef *)&DPM_Settings[USBPD_PORT_0], &DPM_Params[USBPD_PORT_0], &dpmCallbacks));"Changing stack size is useless;any other solution?thanks.
Hi, adding an RTOS seems not something that can work with the importer.Has anyone managed to get it working?Follow my output
hello, my project uses USB CDC HS to communicate with PC.Sometimes USB CDC HS work, sometime didnt (it depends on other variables of my project. and these variables doesnt relate to USB CDC HS, just any variable is added/removed).MCU send data to CDC 30 message 42 byte per secondPC send 100 bytes to MCU when connect 1st time.Picture 1: when USB CDC work normally.Picture 2: when hardware fault happens with hardware fault signal tracePicture 3: when hardware fault happens I just add any variable into OTG_HS_IRQHandler() and it works again.I use:both CubeMX6.3 and 6.8 (generate USB CDC HS, USB CHID FS), CubeIDE Version: 1.11.0 and 1.12.0. they have same problem.Bare metalincrease heap 500, stack 1000 alreadyAny idea to debug this case?
I have a STM32G071B-Disco and straight out of the box it has been able to work for me as a Spy/Sniffer. Also, with the blue switch closed, it works as a Sink that can attach to my Source I'm developing and I can see the traces.My Source supports sending and receiving custom VDMs and I'd like to use the Disco to send the VDMs to test this out. However, I have not been able to find a setting I can click in Port Configuration that will get rid of this pink message shown in the screenshot when I attempt to Enter VDM mode. "Message Rejected for this Port Configuration".I would appreciate any help to show examples of the Disco using VDM mode. Or if it's determined that I need to flash some different code on the Disco, please let me know as well. Thanks,Arthur
Dear community,I'm using an STM32L4 with SDIO 4 bit, FATFS, STM32L4 HAL and CMSIS V2 FreeRTOS. Data is written from sensors from interrupt routines and queued into one of the two buffers. When the current buffer has insufficient space to accommodate the incoming data, the remaining part of the data is stored in the next buffer. Then, the two buffers are swapped so that the next buffer becomes the current buffer.When reading the data that has been written to the SD card successfully, I notice, that every 4096 bytes, the value at that address is 0x00. Do you see obvious mistakes made in this code that is the cause of this problem? I can't seem to find what is wrong.Thank you so much for having a look into this.Kind regards.#include "stm32l4xx.h" #include "stm32l4xx_hal.h" #include "cmsis_os.h" #include "fatfs.h" #include <stdint.h> #include <stdbool.h> #define IO_SD_BUF_SIZE 2048 #define IO_SYNC_SIZE (1 << 20) // 1 MB file size per sync (max) #defin
We are not sure it really jumps to the bootloaderPlease see code attached, especially note if required to add code for memory remapping:void jump_to_bootloader(void) { void (*SysMemBootJump)(void); /** * Step: Set system memory address. * * For STM32U575xx, system memory is at 0x0BF90000 * For other families, check AN2606 document */ volatile uint32_t addr = 0x0BF90000; // STM32U575xx /** * Step: Disable RCC, set it to default (after reset) settings * Internal clock, no PLL, etc. */ HAL_RCC_DeInit(); /** * Step: Disable systick timer and reset it to default values */ SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; /** * Step: Disable all interrupts */ __disable_irq(); // /** // * Step: Remap system memory to address 0x0000 0000 in address space // * For each family registers may be different. // * Check reference manual for each family. // * // * For STM32F4xx, MEMRMP register in SYSCFG is used
I'm writing a book about using FreeRTOS on an ST MCU.I'd like to use excerpts from the MCU reference-manual in the book, including figures.Surprisingly, the MCU reference-manual does not have an ST copyright.Are there any limitations or restrictions on using excerpts from the reference manual?Three chapters have a notice, "Portions Copyright (c) Synopsys...", but I'm not interested in using them.The MCU reference manual is:"Reference manual : STM32F76xxx and STM32F77xxx advanced Arm®-based 32-bit MCUs" (RM0410)pdf download:https://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/96/8b/0d/ec/16/22/43/71/DM00224583/files/DM00224583.pdf/jcr:content/translations/en.DM00224583.pdf
I have read quite a few threads about ethernet on the H7, along with several internet posts. Part of me wonders if I should even try... But I am.I've followed this guide:https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working?t=1679361727348As well as this guide:https://github.com/AnielShri/STM32H745_Ethernet/blob/master/Documentation/lwip_nortos.mdThey are similar, with some slight differences with the MPU cache settings.For me, the first post results in a hard fault. But with the second, I am able to boot.While I would eventually like to get to RTOS, at the moment I'm just trying to implement this using LWIP.My first test is just basic ICMP - which doesn't work. That is, until I comment out this line:SCB_EnableDCache();So, of course, that implies something with the data cache, and memory locations.So, my settings looks like these:LWIP settings: I've added the following to the linker script: /* Modification start */ .lwip_sec (NO
Hi all.Now i am using STM32h747 for get time from NTP serverIt working well with DHCP config, But when I config Static IP and can't access NTP servercan anyone help me with this. Thanks
Hello,We have random HardFaults on an STM32H750, maybe after several hours of uptime.It seems caused by an access to a wrong RAM location, whose address is fetched from the stack and stored in r2.But the stack seems OK.This happens in a function frequently interrupted by a higher priority HAL DMA callback.Inspecting it AFAIK registers r0-r3 are not preserved by GCC optimized at -O2.It could be that sometimes this interrupt takes place between loading of r2 and its use, overwriting it with a wrong value.Inside my callback function there are calls to other functions. Is this OK? I read somewhere that GCC saves only the registers it uses in the main function of the ISR and doesn't take care of register's use in called function. Don't know if it makes sense.Adding __attribute__((interrupt)) does not seem to make any difference.For now I added push and pop of the scratch registers in the callback and it seems to work, but I'm not completely sure because a slight timing difference could be e
hi,I make bootloader to switch the code between two bank starting at address 0x08000000.and two application starting at 0x08020000 and 0x08100000 respectively, when I individual run the code it work fine, but when I hard reset the code, it goes to bootloader and then it jump to the application , execute the line before task, And then dont know what happening in the code , the define task wont run. after kernel it wont jump to the task Flash_Read_Data(0x081E0000 , Rx_Data, 4); if(Rx_Data[0] == 0x01 && Rx_Data[1] == 0x02 && Rx_Data[2] == 0x03 && Rx_Data[3] == 0x04) { __disable_irq(); goto_application_0x08100000(); } if(Rx_Data[0] == 0x04 && Rx_Data[1] == 0x05 && Rx_Data[2] == 0x06 && Rx_Data[3] == 0x07) { __disable_irq(); goto_application_0x08020000(); } if(Rx_Data[0] == 0xFFFFFFFF && Rx_Data[1] == 0xFFFFFFFF && Rx_Data[2] == 0xFFFFFFFF && Rx_Data[3] == 0xFFFFFFFF)
Hi, I'm trying to setup a stm32g070kb (32pin) MCU as I2C slave by using CubeIDE.I would like to create a code which will work same as I2C Eeprom, but when I ask the stm32 (with another MCU) to return me a register or registers value, the returned registers are shifted by 1 register.On this picture I recorded the communication between I2C Eprom and STM32G070 slave.The gap in the STM32 communication makes the request shift by 1 byte for the master MCU, the eeprom doesn't have the gap. here is the code:// emulated I2C RAM static uint8_t my_i2c_ram[128]; static uint8_t my_i2c_offset; // index of current RAM cell static uint8_t first=1; // first byte --> new my_i2c_offset void HAL_I2C_ListenCpltCallback(I2C_HandleTypeDef *hi2c) { first = 1; HAL_I2C_EnableListen_IT(hi2c); // slave is ready again } void HAL_I2C_AddrCallback(I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode) { if( TransferDirection==I2C_DIREC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.