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
In functionuint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)string /* Get the current I2S source */ srcclk = __HAL_RCC_GET_I2S_SOURCE();must be /* Get the current I2S source */ srcclk = __HAL_RCC_GET_I2S_SOURCE() ? RCC_I2SCLKSOURCE_EXT : RCC_I2SCLKSOURCE_PLLI2S;because __HAL_RCC_GET_I2S_SOURCE() return RCC_CFGR_I2SSRC_Msk if bit RCC_CFGR_I2SSRC is set. But need RCC_I2SCLKSOURCE_EXT or RCC_I2SCLKSOURCE_PLLI2S in next switch (srcclk) { /* Check if I2S clock selection is External clock mapped on the I2S_CKIN pin used as I2S clock */ case RCC_I2SCLKSOURCE_EXT:... case RCC_I2SCLKSOURCE_PLLI2S:...
Tried a lot of stuff, including STM32CubeExpansion_MEMSMIC1_V5.7.0, STM32CubeExpansion_USBAudioStreaming_V1.0.0, STM32CubeFunctionPack_SMARTMIC1_V2.3.0, porting existing apps to STM32G4 with no success.The USB device gets appeared in Windows OS in ~5s after the connection, and gets corrupted (driver error) in the next ~8s. I have not found any example project like "USB audio streaming", "USB microphone' etc. Is it possible? I have found out that the USB peripherals in STM32G4 and F4 are quite different, at least their PCD HAL drivers are.
..
Hello everyone,Our custom board use STM32H750 + USB3320 as USB MSC Device.Code reference MSC example and use st library except board specific part.Some pcs of the custom board have USB packet timeout problem when copy lots of files.I have no idea what's wrong, because the other pcs work fine.Does anyone have any suggest for debug such issue ?BTW, all pcs are produced by factory.Thanks
SWAP_BANK for the STM32L552 is a bit in the eeprom, but we want to swap the flash banks in an own bootloader dynamically and do not want to expire the eeprom's lifetime,Any option to swap the memory without eeprom settings?
I am using a custom board which includes a uSD that is interfaced to a STM32F765 through the SDMMC1 pins. The clock rate is set to 48 MHz. I am using the stm32f7xx_hal_sd driver to read and write to an uSD card. I initialize the driver with a call to the HAL_SD_Init routine. I am able to read the card information from the uSD card using the HAL_SD_GetCardInfo routine. It returns the information shown in the attached screen shot.When I attempt to read a single block from sector #0 of the uSD card with a call to the HAL_SD_ReadBlocks routine, the read operation terminates with a SDMMC_FLAG_RXOVERR (RX FIFO overrun error) after it reads 64 bytes from the FIFO (which I guess is the size of the FIFO). The suspect portion of the driver code is shown below:/* Poll on SDMMC flags */ while(!__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXOVERR | SDMMC_FLAG_DCRCFAIL | SDMMC_FLAG_DTIMEOUT | SDMMC_FLAG_DATAEND)) { if(__HAL_SD_GET_FLAG(hsd, SDMMC_FLAG_RXFIFOHF)) &nb
Hi,In a matter of days, I'll have to port a user bootloader from STM32F303 to a STM32G473 mcu.The question is about the Dual Bank feature of G473: since Dual Bank is active by default (DBANK=1), I'd prefer to NOT switch to Single Bank (as it is necessary to use specific Segger Flash Loaders).So, keeping dual bank active, in my scenario:the bootloader takes the first 16 kBytes of Bank1the user application takes the last 112 kBytes of Bank1 and the whole Bank2I studied a bit the Flash_WriteProtection demo and the EraseInitStruct can be initialized to perform erase on bank1 or bank2.EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES; EraseInitStruct.Banks = FLASH_BANK_1; // or FLASH_BANK_2 EraseInitStruct.Page = StartPage; EraseInitStruct.NbPages = EndPage - StartPage + 1; if (HAL_FLASHEx_Erase(&EraseInitStruct, &PageError) != HAL_OK)The write API implementation seems to not care about which bank to write as it takes in only the destination address.My doubt is about the
I want to use hardware I2C (which is only available on pins PA9, PA10 on the STM32F030F4P6 in TSSOP20 case). That overlaps with the standard pins used in the bootloader code for USART1_TX and USART1_RX (AN2606 Rev 55, page 50). The alternative pins used from bootloader arePA14 and PA15. But that device don't have a PA15 pin! I would expect, that the programmed bootloader use the existing pins PA2 and PA3for second option USART1_TX and USART1_RX instead of PA14 and PA15.Somebody already tried, if that (undocumented) PA2 and PA3 pins can be used with the bootloader?I think, the connected I2C hardware on PA9 and PA10 can make trouble whentransfering USART protocol on SDA and SCL but I don't want to use bitbang I2C or jumpers if possible.Kind regards :)
Greetings to the ST community,I was using the example project provided by ST in "STM32F769I-Discovery\Applications\Audio\Audio_playback_and_record\EWARM" and found out that voice was being output through the headphones. However I connected speakers to JP2 and JP3 each however no voice was being output. Although in "\Audio\Audio_playback_and_record\Src\waveplayer.c", the output is initalised as:static uint8_t PlayerInit(uint32_t AudioFreq) { /* Initialize the Audio codec and all related peripherals (I2S, I2C, IOExpander, IOs...) */ if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, uwVolume, AudioFreq) != 0) { Can I get some guidance what exactly is missing?
I'm trying to use fileX for format a card with filex with exfat but having some issues, after the format when I create a file the file says it is already created, presumably from a previous format, possibly with regular FAT.Currently calling as status = fx_media_exFAT_format(&sdio_disk, fx_stm32_sd_driver, (VOID *)FX_NULL, (UCHAR *)media_memory, sizeof(media_memory), "EX_DISK" /* Volume Name */, 1 /* Number of FATs */, 32768 /* Hidden sectors */, hsd1.SdCard.LogBlockNbr /* Total sectors */, 512 /* Sector size */, &nbs
This line:ProtocolStatus->Activity = (StatusReg & FDCAN_PSR_ACT);I think it should be:ProtocolStatus->Activity = ((StatusReg & FDCAN_PSR_ACT) >> FDCAN_PSR_ACT_Pos);I'd appreciate if ST can confirm this.
How to resolve recvfrom() issue on STM32_Network_Library. I'm using stm32H7B3I-DK board.FreeRTOSSTM32_Network_LibraryES_WIFI (BSP) When I tested UDP socket, sendto() was working.But recvfrom() was not working, it was blocked for ES_WIFI_MAX_SO_TIMEOUT. The remote received an ICMP (Port unreachable). This is my tested codes/** static void ecrio_udp_test(void) { int32_t sock = 0; int32_t ret = 0; sockaddr_in_t ServerIp; sockaddr_in_t LocalIp; net_ip4_addr_t addr; net_ip_addr_t ip; uint8_t received[1024]; uint32_t fromlen = 0; memset((char *)&ServerIp, 0, sizeof(ServerIp)); sock = net_socket(NET_AF_INET, NET_SOCK_DGRAM ,NET_IPPROTO_UDP ); if (sock < 0) { printf("net_socket error=%d\r\n", sock); } printf("net_socket success\r\n"); ip4_addr_set_u32(&addr, NET_ATON_R("192.168.45.15")); NET_IP4ADDR_PORT_TO_SOCKADDR(&ServerIp, &addr, 10000); { net_ip_addr_t remote; remote = net_get_ip_addr(&ServerIp); printf("remote ip = %s\r\n", net_ntoa(&remo
Hello community, I experienced a strange behavior, when when using the UART-DMA-mechanism.The MCU is a STM32L051R6T6, and I use CubeIDE with HAL-drivers.I receive a cyclic telegram of 40 bytes on both USARTs.The telegram starts with two detection bytes, then a telegram counter byte follows. After this header follows the payload and the last 4 bytes are a CRC32. It runs on 9600 baud, the telegram (oscill. checked) is 40ms long, the a idle time of about 10ms.Since a DMAbuffer of 40 bytes brought me to the result, that sometimes a telegam is overwitten before I could copy it away in HAL_UART_RxCpltCallback, I now use a 80 bytes DMAbuffer. and both, the HAL_UART_RxCpltCallback and HAL_UART_RxHalfCpltCallback.In most cases this works: At first I copy away the DMABuffer, then I scan for the header bytes. (In HAL_UART_RxHalfCpltCallback I scan from the middle of the buffercopy, in HAL_UART_RxCpltCallback I scan from the start to the middle). So I should find one telegram, while the UART write
hi,We're using the STM32F7 in our project and would like to flash over USB. In the host application we use USB for data transfer which works well. Unfortunately, I have had no success getting the device into the bootloader as we have no access to the boot pins. I tried this code I found on the internet but the the linux dfu-util -l command says no dfu devices found. I noticed this command takes a long time, same with lsusb when the board is in the bootloader (if it even is). Maybe the USB enumeration ist working properly?We use a 32 MHz HSE but that doesn't get initialized until after the bootloader is called. Any idea on what could be wrong?Any help would be greatly appreciated!best regards,dominikvoid JumpToBootloader(void) { void (*SysMemBootJump)(void); // read out if we want to enter the bootloader from the backup registers RTC_HandleTypeDef RtcHandle; RtcHandle.Instance = RTC; uint32_t callBootloader = HAL_RTCEx_BKUPRead(&RtcHandle, RTC_BKP_DR0); HAL_RTCEx_BKUPWr
Hello?As title, I want to know product with USB, FD-CAN, 2~3 DAC, etc.Problem is USB and HCLK are bound(using external clock), so that upper limit is determined to be low.(48, 96, 144 MHz in maximum 170 MHz)For that reason, to ask the question, is there a product that has USB+FD-CAN and separated PLLSAI in 32~48 pins package?Please reply.
I have 2 I2S ports. I have a masterclock from an external source.My clock config is set for external 24.576Mhz I2S clock.I have set up I2S1 in half duplex slave mode for an ADC. It is receiving data in DMA.I have setup I2S2 in half duplex master mode for a DAC. It does absolutely nothing, except set the registers up exactly as per the reference manual.I2S is enabled in master. DMA has transfered the first byte to the output DR. Everythng is waiting on TXE to fire and I2S to send the byte, but... it doesn't.Further, it produces no BCK and hold LRCLK HIGH. Why HIGH? It's setup in standard I2S which expects the left (LOW) channel first. Why is it holding that line high? It should be low.I have run the logic analyser on it and the ONLY signal I see is the master clock, which is not from the STM32. NONE of the I2S pins move. The only way I can get any of them to even trigger on an edge to hit NRST.I have had it working in master before, when it was generating the MCK output.My suspicion is
I am using STMCubeIDE latest and an F411CE.I used the MX wizard to enable USB_Audio class device set to 48000 s/sI configured an I2S with master clock on IS2.It plays whether I start the circular DMA in the AUDIO_Init function or in the AUDIO_CMD_START case within AUDIO_AudioCmd_FS().However there is a corrupt packet at the end or start of the buffer.I looked into the USB_AudioSync() method and seen it is expanding or contracting the buffer by 4 bytes. I have tried to use it, disabling circular mode and using the DMA complete call back to call USB_AUDIO_Sync() which then restarts the stream with the different size buffer.STILL there is a corrupted packet in the buffer.What am I missing?I could consider it plausible that the audio sync is trying to shorten the buffer but for some reason my DMA goes straight on past it. But I am currently relaunching the non-circular I2s DMA transfer with the size that AudioSync sent me.Also... those USB_DEVICE libraries are not easy to deal with, Eclips
I'm working on Over the Air and I have three components.Bootloader in first two pages (using stm32f09x) and applicaiton and then second application.I'm unable to jump to application from bootloader for a specific reason.I have one linker script, gave a build (app1) and made some modifications (app2).How can I jump to application if the second slot application is having an address of reset handler which is pointing in the first location? (And let's say I add the offset of the app1 size, am I sure that the reset handler stays in the exact same location everytime i give a build)?Help me out here. My master thesis time is running out.One solution I am implementing is two use two binary images and upload to the cloud but i think this is a patchy idea, I was something solid if you have one.Thanks in advance.
I have created project USB Virtual Com Device on STM 32F407. I set size of parcel = 32 byte. When i send parcel and befor parcel ends byte will be "0" STM 32 don't read bytes after "0". If no "0" byte always is OK. What doe's it mean? How get full parcel with "0" bytes inside parcel?
Hi,I am trying to read a simple register via SPI4, when I am using the HAL function (HAL_SPI_TransmitReceive()), this function return a timOut. I did some debugging and when I transmit my data via the SPI (line 1344) I can see on my RXDR the value of the read register but when I try to go to the next step (line 1345) the value on the register is remove and then I can no more ready the value on the register Do you guy have any idea why?
Hello, Is there a plan to offer Azure USBX programming training in the near future via MOOC? Thank you.
I have the B-L4S5I-IOT01A STM32L4S5 Discovery Kit. I followed the article and an online video to enable Tracex, but these are calling out a different platform. The RAM starting address for my kit is 0x20000000, but running the program I see in memory starts at 0x20000E20 and there is no data in memory only ????. Is there some sort of offset needed iof hte _FLASH.ld file for .trace?
The stm32-mw-openbl project supposedly implements the system memory bootloader available in all STM32 MCUs.However, there are some missing functions:The GetChecksum command is missing, but it is documentend for example in AN4221 (I2C interface for the system memory bootloader)See also my issue here: Where is Get Memory Checksum command (i2c interface) · Issue #5 · STMicroelectronics/stm32-mw-openbl · GitHubI am posting here because it seems that nobody reads/replies to issues on the github project.Can you update the github library accordingly, so that it provides the full feature set?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.