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 setting up I2C communication between a master board (STM32H753I-EVAL2) and a slave board (NUCLEO-H753ZI). At the master board side, I use "HAL_I2C_Master_Seq_Transmit_IT(&hi2c1, 96<<1, (uint8_t*)gTxBuffer, 4, I2C_FIRST_AND_LAST_FRAME)" to start the transmit, and set up "HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *I2cHandle)" to handle transmit complete interrupt. At the slave board side, I use "HAL_I2C_Slave_Seq_Transmit_IT(&hi2c2, (uint8_t*) gTxBuffer, 4, I2C_FIRST_AND_LAST_FRAME)" to set up the receive interrupt as soon as "HAL_I2C_AddrCallback" ISR handle is called. The problem is "HAL_I2C_SlaveRxCpltCallback" is not called. At the master board side, "HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *I2cHandle)" is called once the 4 bytes transmit completes. But the "HAL_I2C_SlaveRxCpltCallback" never gets called at the slave board. I step into the HAL code, found out that when "I2C_ITSlaveCplt" is called, I2C state is still HAL_I2C_STATE_BUS
Hello,I am trying to implement 2 separate UART channels on the single port. I have initialized the two UART channels and have connected the TXs and RXs of the two channels with each other. (Image attached)When I run them separately, they work just fine. But when the TXs are connected they won't work. Is this the correct way to operate the two channels on same port?Please assist.-Regards
STM32F411. Line 2693: srcclk = __HAL_RCC_GET_I2S_SOURCE();That macro calls "READ_BIT" on the I2SSRC register bit.It does NOT shift it right 23U.The function then compares this to 0 or 1.FAIL.Result. I2S cannot be configured to use an external clock source in HAL.While you are in there there is a bug with the library always initing that register to PLL clocks, regardless of config.Did someone do a merge fart?
Hi all,I am using FileX with my Nucleo-U575ZI-Q, and I want to be able to open multiple files at the same time.Now every time I try to do this, the first file opens fine no problems but when I try to open another file (without closing the first) I get the error - FX_NOT_FOUND.When I use FATFS there is an option in the IOC to increase the number of files allowed open (FS_LOCK). But with FileX I cannot seem to find anything in the IOC or in the headers files.Also Google is not useful at all for any FileX related information, its very sparse!Thanks!
Hi All: I am having trouble figuring out why exactly this behavior happens randomly and how to fix it on NUCLEO-H743ZI2. Any help would be appreciate it. I went through some debugging. I think the issue could be the following. I attached my main.c , and tcpServerRAW.c and ethernetif.c. It's using the standard LWIP, and no OS, using the direct LWIP API. In the main loop, it calls "low_level_input" , it's checking if "RxAllocStatus" is "ok", it was good initially that's why it can successfully call "HAL_ETH_ReadData". However during the running of the tcpServerRAW, it's modified and cause the variable "RxAllocStatus" inside of low_level_input resulted in "RX_ALLOC_ERROR", because sometime beforehand, in "HAL_ETH_RxAllocateCallback" , it couldn't get a pbuf_custom from "LWIP_MEMPOOL_ALLOC(RX_POOL)" I am not able to figure out why it behaves like that. Have you guys encountered this issue before?? Or anybody could narrow it down to some ar
After two days of trying, I decided to ask.I have this STM32H747I-DISCO and B-LCDAD-HDMI1. The examples that are from the site given below the board and consist of programming a single hex file work (STM32H747I-DISCO compiled demo binary), without the general example (STM32Cube_Demo-STM32H747I-DISCO-V1.0.0_FULL.hex), on the built-in display.I.e. the board itself with its display works.I tried to program some examples from the ready ones, none of them start. All examples that appear when typing the word HDMI or DSI, for this board. First I tried them with the built-in display, then with HDMI(B-LCDAD-HDMI1), nothing. On the examples that use flash as the source, the screen lights up (on the built-in display only), and there are lots of tiny white and black dots on it. There is no video signal on the HDMI monitor. Cable and monitor are OK, checked.I saved an image.jpg file with a resolution of 800x480 / 640x480 ( NO progressive) on the root of the card.When debugging, it can be seen that
I have an ADC input that is read continuously and put in a buffer by the help of DMA. This is my buffer:uint16_t adc_buf[ADC_BUF_LEN]; //ADC_BUF_LEN = 1The value in the buffer is replaced continuously by the NEW sampled value from the ADC.I want to use this value in the buffer, so how can I get out the value. I was thinking something like this:int value = add_buf[0]; and then I can use the variable "value" for stuff, like printing it to the terminal on my computer or do calculations. But how do I do this? I am not able to print the value to the serial terminal on my computer...
Hello,I have been trying to establish the UART communication using DMA. To implement that I referred to https://community.st.com/t5/stm32-mcus-products/stm32h7-uart-dma-receive-unknown-length-of-data/m-p/86869#M11292 post. I am trying to implement DMA using ReceivetoIdle method.The problem I am facing is that for first communication the DMA buffer is correctly reading the data, but for the consecutive communications the DMA data read are incorrect. It seems that the data is not getting flushed. I will explain this with the below example.1. Let's say my first transaction is "HelloWorld". The buffer correctly reads this data.2. Now if I send "HelloWhirpool", the buffer read is "HelloWhrld". And this issue continues.I tried resetting the DMA buffer but it won't help. I even checked the MPU configuration and address. When I checked the DMA read buffer size in the callback function void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size), the size is read correctl
I am trying to change the PWM duty cycle of timer3, channel 1 from the period elapsed ISR of timer 6. This seems to cause the chip to crash. I can confirm that:- timer6 is properly configured and interrupt fires appropriately.- timer3 is properly configured and is outputting PWM (duty cycle can be changed normally from main loop) Using stm32f103vct6 Any ideas? void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){ if (htim->Instance == TIM6) { __HAL_TIM_SET_COMPARE(&htim3, TIM_CHANNEL_1, 1800); } }
Hi,I want to split the .BIN file because it is too big... Here is the size of the files :.BIN size : 2.13 Go.HEX size : 30.5 Mo.ELF size : 11.4 MoHere is the memory used :I am using an USB flash drive to update my system program. I know I need to split .BIN file into multiple files which can describe multiple regions. I can use FromELF to do this but I don't know how to use it...Could you help me ?
I am loading and running example "ADC_DMA_Transfer" on NUCLEO-U575ZI-Q board but failed go through on function callMX_ADC4_Init();Step into this function, the software trapped in the ADC calibration process.if (HAL_ADCEx_Calibration_Start(&hadc4, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED) != HAL_OK){Error_Handler();} The software failed to start calibration and then tangled in Error_Handler() permanently.I searched through the early post but didn't find right solution. Any thought on this issue? Thanks.
Hi STM32 Community,I'm using a SoM with the STM32H750, made by Emcraft. My goal is to set up Ethernet using the standard HAL library alongside lwIP. However, I've hit a snag with the MDIO communication to the PHY(a Waveshare LAN8720 board).Based on the oscilloscope outputs (attached), the MAC isn't producing the expected signals for the MDC and MDIO pins during an MDIO read, but the busy bit(MB) is still cleared..To diagnose the issue, I've:Checked the PHY's reference clock.Reviewed all GPIO settings.Confirmed the MDIO clock configuration.Checked my code thoroughly.I have a few questions:Has anyone faced a similar issue?Is there a configuration step I might have missed?Could my soldering work on the board jumpers have caused damage?Any advice or suggestions would be appreciated. Thanks!Regards, Thomas Schöller
Hi,I have a requirement to transmit and receive CRC-16 hardware computed checksum via SPI in stm32L151 microcontroller.As per the datasheet, i configured polynomial 0x1021 and enabled CRC.the problem is, CRC register TXCRCR is updating for all instruction execution, i am expecting it has to update only when Data is written to data register SPI->DR.please let me know, if my implementation is wrong and what is proper method of implementation.Thank youRegards,Bharath R
I'm working on a project involving the integration of USB functionality for data transfer and data logging on an STM32F407VG microcontroller. The project's objectives include logging data files on an SD card and allowing users to download these files via USB from the SD card. Additionally, users should be able to copy files from their PC to the SD card via USB, all achieved through the STM32F407VG using the SDIO communication protocol.Specific Questions: <<USB_OTG_FS Configuration:How do I configure USB_OTG_FS as a USB Device in STM32CubeMX or other development tools for the STM32F407VG microcontroller?Are there specific settings or configurations to consider when setting up USB_OTG_FS for this project?>> Integration with FatFS for SD Card: <<What are the essential initialization and setup steps for using USB_OTG_FS as a USB Device alongside the FatFS library for SD card communication on the STM32F407VG?Can you provide guidance on potential conflicts or issues that ma
am currently working on a project that involves integrating USB functionality for data transfer and data logging on an STM32F407VG micro-controller. Specifically, I want to log data files on an SD card and enable the user to download these logged files from the SD card via USB. Additionally, I'd like to allow users to copy files from their PC to the SD card via USB, all through the STM32F407VG using the SDIO communication protocol.I'm facing a challenge in making the USB_OTG_FS (On-The-Go Full Speed USB) and the SD card (using FatFS) work together seamlessly. I would greatly appreciate your guidance and any insights you might have on how to achieve this integration.Here are some specific questions I have:How do I configure USB_OTG_FS as a USB Device in STM32CubeMX or other development tools?What are the essential initialization and setup steps for using the USB_OTG_FS as a USB Device alongside the FatFS library for SD card communication?Are there any sample code snippets or project exa
I am currently working on a project that involves integrating USB functionality for data transfer and data logging on an STM32F407VG micro-controller. Specifically, I want to log data files on an SD card and enable the user to download these logged files from the SD card via USB. Additionally, I'd like to allow users to copy files from their PC to the SD card via USB, all through the STM32F407VG using the SDIO communication protocol.I'm facing a challenge in making the USB_OTG_FS (On-The-Go Full Speed USB) and the SD card (using FatFS) work together seamlessly. I would greatly appreciate your guidance and any insights you might have on how to achieve this integration.Here are some specific questions I have:How do I configure USB_OTG_FS as a USB Device in STM32CubeMX or other development tools?What are the essential initialization and setup steps for using the USB_OTG_FS as a USB Device alongside the FatFS library for SD card communication?Are there any sample code snippets or pro
Hello STM Community,I hope everyone is doing well.We are currently using the STM32 USB in our commercial products, focusing on the CDC class. Through our exploration of the documentation, we haven't found a conclusive answer to our specific question.Is it permissible to change the PRODUCT_STRING value in the USB descriptor for commercial products using the STM32 USB CDC, while still retaining the original VID and PID provided by STMicroelectronics?Thank you for your time and assistance.Best regards,Jannik
Hello,I was just porting a F767 design to an H723-Nucleo, and found out that this H7 Nucleo is using its ST-Link's HSI as a clock source to the H723 at 8 MHz. With the usual terrible HSI quality, which showed itself in low quality SPDIF TX and PTP sync.So I switched the ST-Link's clock to HSE output, which changed the frequency to 8.333 MHz, which again led me to using the FRACN registers for the first time to get some even clock numbers.I also found that the FRACN values can be changed on the fly, which might let me save an external VCO (which until now I controlled with the 12bit DAC).So, has anybody ever used the internal PLL's FRACN for syncing and sourcing audio stuff?If yes, how was the quality (jitter while changing FRACN)?
Hello, I'm working on a STM32F407 LwIP acting as a TCP server with a bare winsock based client on Windows 10.The project is derived from CubeMX V1.27.1 with the tcp_echoserver.c module creating and communicating to the client.After a few transfer of bytes, I debug hit the RxAllocStatus = RX_ALLOC_ERROR; located in HAL_ETH_RxAllocateCallback from ethernetif.c and the transfer receive exchange stalls. Wireshark indicates that TCP ZeroWindow packet pointing that the rx buffer is full.Are there any solutions to this particular scenario. Pbuf Free and other mechanisms do not help.@Tesla DeLorean or any members, please advise.
If this is not the right section of the forum to ask this question, I kindly ask you to move it to the correct one. Thank you!I need an ADC with differential input but I only have STM32F407 (which doesn't have it). I was thinking of sending the differential signal (2 wires) to 2 inputs of the ADC... and then doing the subtraction via software. In this way I should have "created" the differential ADC I need. But I don't think the 2 ADC ports work exactly at the same time! So maybe I could have problems with this "coarse" solution of mine and therefore produce an untrue result from the ADC. What do you think? Does this make sense? The differential input signal is a sinusoid (not perfect!) of a few Hz whose frequency can vary from 0.5Hz to 4Hz
Hello,sometimes the initialization of the SD card fails in function SD_FindSCR.There seems to be a timing problem between SDMMC_ConfigData and SDMMC_CmdSendSCR because send data starts before SDMMC is ready.With an additional wait function for status bits it works for me (see code below).I can't find an exact timing specification between SDMMC process steps (waiting for status bits or time) in hardware documentation (STM32F777).But it seems that there are some actions required to improve the reliabilty of the SDMMC HAL driver functions in STM32F7xx_HAL_SD.Cstatic uint32_t SD_FindSCR(SD_HandleTypeDef *hsd, uint32_t *pSCR) { SDMMC_DataInitTypeDef config; uint32_t errorstate; uint32_t tickstart = HAL_GetTick(); uint32_t index = 0U; uint32_t tempscr[2U] = {0U, 0U}; uint32_t *scr = pSCR; /* Set Block Size To 8 Bytes */ errorstate = SDMMC_CmdBlockLength(hsd->Instance, 8U); if(errorstate != HAL_SD_ERROR_NONE) { return errorstate; } /* Send CMD55 APP_CMD with argu
Hi,I have an STM32F427ZGT6 and I am using both CAN peripherals to communicate on separate CAN networks.When other devices exist on the CAN1 and CAN2 networks (acknowledging messages on the bus, and sending messages), everything works nicely (CAN1 and CAN2 send and receive the messages I expect them to). Another device on the CAN1 network is sending data which is correctly received by the firmware and `HAL_CAN_RxFifo0MsgPendingCallback` is called.If there are errors on the CAN2 network (for instance by the board being disconnected from the bus) then after a few failed send attempts on CAN2 peripheral, I reset the peripheral:HAL_CAN_DeInit(&CAN2)MX_CAN2_InitHAL_CAN_ConfigFilter (FilterFIFOAssignment = CAN_FILTER_FIFO1)HAL_CAN_Start(&CAN2)HAL_CAN_ActivateNotification(CAN_IT_RX_FIFO1_MSG_PENDING | CAN_IT_RX_FIFO0_MSG_PENDING)(This is the same process I go through once at the very beginning to start the peripheral, by the way). However, once I do that reset of CAN2: C
Hello,I am trying to find the most elegant way to prevent SRAM2 (and any other memory) from being wiped when moving to LSE as a clock source by calling HAL_RCCEx_PeriphCLKConfig due to its call to __HAL_RCC_BACKUPRESET_FORCE.I am using an u5* Series MCU and I looked through the manuals but could not find a definite way of simply preventing this wiping of data. Best regards,Kai S
Hello everyone I am using two channels of ADC in the stm32f429 board and collecting some chunks of data for further processing. I want to collect data once the zero crossing is detected currently I'm using zero crossing detection c code is there any other method? Thank you.
Dear All, I have NUCLEO-H563ZI Board and willing to incorporate OTA functionality in this board so that we can update the software remotely. I have internet facility over Ethernet and working on netxduo and threadX stack. Any example or resource to do OTA would be really helpful to start in that direction.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.