Developer support experience survey - We value your feedback
Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
Good morning,I would like to implement Fatfs to communicate with a sd card in the core M4 and with a usb mass storage device in the core M7. In Cube Mx environment I'm able to initialize what I need, obtaining a fatfs M4 initialized to communicate with sd card and a fatfs M7 initialized to communicate with a usb mass storage device. Pratically this solution doesn't work (The devices are not recognized: the sd card is correctly mounted just one time and then it is not recognized while the usb is never recognized) but, when I keep everything together in the same core, fatfs M7 (usb mass storage+sd card) works perfectly. Could you tell me If it's possible to implement fatfs in the following way: fatfs M4 (sd card) and fatfs M7 (usb mass storage)? And considering that I need to create files inside sd card and write data to them in core m4 and sending these files from sd to usb in m7, are there some variables (like sd file path etc) that I need eventually to put in shared memory ?Let m
I have a simple function with loop that checks RX pin state for 10ms, and if there was high level - breaks loop and exits. it works ok with -O0, but is broken with -Os or -O1 (-O2) or -Og - it loops forever.Here's code:uint8_t isModemOn() { uint32_t expire = uwTick + 10; while (expire - uwTick < 11) { // check RXD pin level, if low for 10ms - consider modem is off if (LL_GPIO_ReadInputPort(GPIOA) & LL_GPIO_PIN_10) { return 1; } } return 0; }and how it's appears in listing080003dc <isModemOn>: * @PAram GPIOx GPIO Port * @retval Input data register value of port */ __STATIC_INLINE uint32_t LL_GPIO_ReadInputPort(GPIO_TypeDef *GPIOx) { return (uint32_t)(READ_REG(GPIOx->IDR)); 80003dc: 21a0 movs r1, #160 @ 0xa0 //#pragma GCC optimize ("O0") // Error in -Os optimization uint8_t isModemOn() { uint32_t expire = uwTick + 10; while (expire - uwTick < 11) { // check RXD pin level, if low for 10ms - consider modem is off if (LL_GPIO_ReadInputPort(GPIOA) & LL
Dear all I am trying to follow the exmaple https://github.com/STMicroelectronics/STM32CubeH5/tree/e6985112c824fce355638ef4e7113b1bc671f999/Projects/NUCLEO-H503RB/Examples/SPI/SPI_FullDuplex_ComDMA_Slave project with STM32H563 on my own target board, I copied most of the code/DMA setup form the example and got it working, however, my requirement is more complicated than the example, the example only receives and reply 1 message after a button press, but my application needs it to be able to receive/reply messages periodically, i.e. master keep sending fixed length of message and expect slave to reply with same length of message at a fixed period. For now, after I copied example, it runs receives/replies 1 message, which I see the data on bus , but then it ends up with busy state and never recovers even wait for a long time, could anyone help please? Also, the about the DMA setting, does it needs to be in circular mode? I am sort of new to STM32 and DMA. Any suggestion is appre
Hello, I need a clear step by step guide on how to set up Pnucleo lrwan 3 end node and gateway and connect both to the loriot server. currently I have issues communicating with my END node using the AT command via terminal.My other issue is that; the PNUCLEO lrwan 3 antenna is 480MHz, but when I check the paramaters of the device using terminal, I discover that the frequency is EU-868MHz, so now I have to reconfigure the device tp the right frequency, how do I do this. I have consulted the UM2587 material but it does not appear to be so clear to me.
Hi @TDK ,I have just downloaded and installed the new version 2.0.0 of the IDE and the MX software (since it is no longer integrated). I was working on a project based on the STM32WB5MMG, and everything was working correctly with IDE version 1.19.0 and STM32Cube FW_WB V1.23.0.After opening the project and regenerating the code with the new IDE version and STM32Cube FW_WB V1.24.0, I noticed some issues: in custom_stm.c it generates two times this variables:/* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ uint16_t SizeFw_Ver = 1; uint16_t SizeDatetime = 7; uint16_t SizeStatus = 6; uint16_t SizeMonitor = 15; uint16_t SizeEnv_Data = 90; uint16_t SizeFw_Ver = 1; uint16_t SizeDatetime = 7; uint16_t SizeStatus = 6; uint16_t SizeMonitor = 15; uint16_t SizeEnv_Data = 90;2. it doesn't generate any local functions in custom_app.c:/* USER CODE END FD */ /***************************************************
We noticed that the Overcurrent warning appears even when Overcurrent Protection is disabled. Could this be related to the missing feedback capacitors C38 and C42 on the OPAMPs for current sensing? Thank you for your support.Best regardsPelino
Hello,I am trying to communicate with an SDI-12 sensor through my custom STM32L4 pcb. The communication that I am trying to achieve is from a 3.3V microcontroller. Thus, I used the SN74LVC1G240DBVT buffer to convert my UART to SDI-12 data one wire, and also I had a MOSFET which converts my 3.3V of the pin to 5V (I have checked that the hardware wiring and voltages working as expected). For my UART protocol, I have this configurations: static void MX_UART5_Init(void) { /* USER CODE BEGIN UART5_Init 0 */ /* USER CODE END UART5_Init 0 */ /* USER CODE BEGIN UART5_Init 1 */ /* USER CODE END UART5_Init 1 */ huart5.Instance = UART5; huart5.Init.BaudRate = 1200; huart5.Init.WordLength = UART_WORDLENGTH_8B; // Including parity huart5.Init.StopBits = UART_STOPBITS_1; huart5.Init.Parity = UART_PARITY_EVEN; huart5.Init.Mode = UART_MODE_TX_RX; huart5.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart5.Init.OverSampling = UART_OVERSAMPLING_16; huart5.Init.OneBitSampling = UART_ONE_BIT
I have seen recommendation for by pass capacitor to be 10 times the boot strap capacitor for Mosfet driver IC's. When i verified the schematics of mb1419-g431cbu6-c01_schematic The Boostrap capacitance value is 1uF but the By pass capacitance value is 470nF between VCC and Gnd. Request to please clarify.
There have been a few posts on this forum with the same issue, but it seems the root cause is different to this post or (probably) this one.I am using an Stm32f446re Nucleo, and trying to output a waveform from dac2 using dma and tim6. What I have tried so far: Trigger is set to Timer 6 Trigger Out event. DMA is configured in Circular Mode. I'm calling HAL_DAC_Start_DMA(...) Tried changing the data width to half word and word, neither worked. Callback functions are correctly named and defined in main.c: void HAL_DAC_ConvCpltCallbackCh2(DAC_HandleTypeDef *hdac) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_8); } void HAL_DAC_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef *hdac) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, 1); } I want to be able to set a flag variable to start processing the next buffer. I will paste the rest of my code, it includes a (buggy) sine wave table but I can fix that once the callbacks are handled properly. It is just something to sen
Hello,I have developed a external Loader for my custom projekt. It uses a W25Q128 QSPI conected to bank 2 and alternative Pin of CLK. (Worse!, but it is so...) So i Have no exactly example for it. Also it is a Dual Core, and no example i find have special definitions for it.I worked more days on it and it worked perfekt (now!) in a Cube Projekt.Erase, write and read (manual) and memory mapped mode are perfect.If I compile the stldr file, I can load ist in Cube programmer and stm prog utility.But then I could cry. I can't do anything. No read on QSPI and so on.....I think i will have trouble with the m4 Core. The M7 Core must wait for him.I don't know. How you can help me. What is wrong. Have you any Idea?
I'm working on a battery management system using an STM32F302 going to an AEK-COM-ISOSPI1 dev board using the L9963T transcevier which is daisy-chained to 10 AEK-POW-BMS63EN boards using the L9963E chip.The problem that I'm having is that when I send a message over the ISO SPI lines, it adds an additional 0 before it sends the message.I have attached two messages that show the leading 0 bit that is added. msg 0x55 55 55 55 55 and msg 0xFF 00 FF 00 FF. SPI settings are8 bits frame MSB first Baud rate 1000 kbits/secCPOL lowCPHA 2 edgeCRC Disabled How would I go about removing the leading zero from the message? Any help would be greatThanks
Hi there ! here i'm for another question, are a day i'm go crazy with the SPI interface . I try to comunicate with MC33HB2000EX 10 A H-bridge, SPI programmable brushed DC motor driver. The datasheet write that: So i configure my SPI : and when i send data with uint16_t spiData=0x2000;uint16_t spiRxData = 0x0000; i reset the CS pin HAL_SPI_TransmitReceive_IT(&hspi1,(uint8_t*)&spiData,(uint8_t*)&spiRxData,1); i wait the callback function and i set the CS pin no one data come out from MISO and i put on my analaizer and i don't understand why the clock start to logic high and no from logic low i don't know if is the real problem I hope someone can help me Thank you Sergio
Environment:STM32F407VGTX USB HID mouse, Full SpeedProblem:Hi, I’m using a STM32F407VGTX board. I send a USB remote wakeup signal to the host and then try to receive a resume signal from the host. The STM32 board can wake up the host (bringing it to the login screen), but it cannot trigger the USB_OTG_GINTSTS_WKUINT interrupt. I have already configured my STM32 board as a HID mouse. However, if I use a real mouse instead, it can wake up the host and successfully trigger the USB_OTG_GINTSTS_WKUINT interrupt. Is there any suggestion or workaround for this problem? void usb_remote_wakeup() { if (hUsbDeviceFS.dev_remote_wakeup == 1) { __HAL_PCD_UNGATE_PHYCLOCK(&hpcd_USB_OTG_FS); HAL_PCD_ActivateRemoteWakeup(&hpcd_USB_OTG_FS); HAL_Delay(5); HAL_PCD_DeActivateRemoteWakeup(&hpcd_USB_OTG_FS); } }
I am trying to probe TC358743 (HDMI to CSI ic) to STM32MP257f-dk. The ic is able to take input from the HDMI from my laptop (I is being checked as when i give an edid as input from v4l2 then the screen of my laptop gets extended).The problem is in receiving the stream at stm32. TC358743 outputs 2 formats - MEDIA_BUS_FMT_RGB888_1X24 and MEDIA_BUS_FMT_UYVY8_1X16. Both of them are not supported by CSI input of stm.
I'm using Seeed Studio's Wio E5 board, LoRaWAN 1.0.3 and the repository Seeed Studio Wio E5 LoRa as the base of my source code. I want my device to force a rejoin only when NVM context is not restored (e.g., after a reset or memory clear), and to resume using the previous session if the NVM context is successfully restored. I have already set LORAWAN_FORCE_REJOIN_AT_BOOT to false and CONTEXT_MANAGEMENT_ENABLED to true, and I noticed that even if NVM data is restored successfuly the device rejoins (which is wrong).
Hi everyone, I’m working on an audio project with an STM32H743ZIT6 and a MEMS microphone (MP34DT05-A). Audio is captured via DFSDM + DMA, and the DMA callback (HAL_DFSDM_FilterRegConvCpltCallback) fires reliably with fresh PCM audio samples. At the moment, I am transferring the audio data to the USB Audio IN endpoint directly inside the DFSDM callback using: USBD_LL_Transmit(pdev, AUDIO_IN_EP, buffer, packet_size); To avoid overlapping transmissions, I set a busy flag until the DataIn callback (from the USB stack) fires. Only then do I allow the next USB packet to be sent. This works in the sense that nothing crashes, but the actual audio stream never “starts” on the PC (e.g., in Audacity the recording stays silent and no data seems to flow).So now I am unsure whether my current design is fundamentally flawed. What is the correct way to link DFSDM audio → USB IN endpoint? Is it recommended to send directly from the DFSDM callback (as I do now) or push the data int
Hello,I am trying to figure out how to configure internal voltage monitoring use the internal tamper detection to clear the RTC when an undervoltage condition occurs. My understanding is that you have to enable the backup regulator and enable monitoring like this.SET_BIT (PWR->CR1, PWR_CR1_DBP); HAL_PWREx_EnableBkUpReg(); HAL_PWREx_EnableMonitoring();But how do I set up the tamper detection. There appears to be an inconsistency between the RM and the SFR view of the RTC registers in CubeIDE. The register at offset 0x40 in the RM is called RTC_TAFCR (pg. 1980) while in CubeIDE it is called RTC_TAMPCR and they have differnt bit definitions. Which of these is correct (thye can't both be)? I believe the internal detection is included in Tamper 3, but how do I configure that.Without working tamper detection the data is preserved in the RTC at least down to 0.4V but it stops getting updated at a much higher voltage, resulting in losing time when the device is powered on again, but no way
I need to use STM32CubeMX to generate initialization routine for two pins (7,8) on SO8 package of STM32CubeC011 MCU that switches the pin's roles BACK to STLINK mode. I created a new project on STM32CubeMX whose only task is to initialize pins 7 and 8 to PA13/PA14 SWCLK/SWDIO. I wanted to copy the GPIO initialization function MX generated into an existing application which had previously (that is, after start-up) changed the two pins to another mode; after that work is done, the two pins no longer need to be in GPIO mode and can be switched back to STLINK mode to facilitate firmware upgrade/debug/etc.Two screen captures from STLINK32MX are below (pin assignments and project specifications.)The resulting (very short) C language program generates the following code for initialization of the two pins: static void MX_GPIO_Init(void) { /* USER CODE BEGIN MX_GPIO_Init_1 */ /* USER CODE END MX_GPIO_Init_1 */ /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOA_CLK_ENABLE(); /* USER CODE BEGIN M
Hi,i am working on STM32cubeIDE for STM32G071RB nucleo-64 dev board with windows 11.i have a ST-LINK/V2-1 programming and debugging tool is integrated into the Nucleo as shown below image.To power the board, I connect the STM32 Nucleo-64 board to my laptop with a USB Type-A to Micro-B cable through the USB connector (CN2). As a result, the PWR green LED (LD3) lights up and the COM LED (LD1) blinks.I checked the jumper position on the board, STLK (CN4) on [1-2], [3-4], PWR (JP2) on [1-2], IDD (JP3) ON.I installed stsw-link0009 USB driver for ST-Link/V2-1 to make this connection successful.But, still No ST-Link is visible in Device manager, image is attached below. kindly support me to fix this issue and looking forward for your response.ThanksBest RegardsSachin chhaleria
Hi, I want to get synchronized samples from 4 microphones connected via I2S2 and I2S3. First I set one as master and other as slave and just connect Clock and Word Select, but I have only 0 values on slave interface. Is it possible to do it this way? Or there is another better one? I am using STM32H533
Hi all.I'm working on a project where my MCU (STM32H755) communicate with a device via UART at 921600 Bauds.Here some details about the environment:The device sends constantly, each second, a log at 921600 Bauds. The MCU sends at same speed some commands to the device, the device will answer after that the command is executed and continue to sends out log. There isn't any synchronization mechanism for communication (no clock signal or CTS/RTS is used), plus, there isn't any difference or special character that will allow me to differentiate between command answer and log, so I must take everything I receive in a window of time and parse it at upper level (not relevant for this question), and, finally, to manage the communication I tried with FIFO enabled and disabled (but result seems to not change)What I do to manage the communication is the following:1a: Flush Read data register (but is this sufficient in case of FIFO enabled?)2a: Enable DMA via HAL_UART_RECEIVE_DMA API3a: Enabl
Hi all,I am using STM32G030F6P6 and trying to read ADC channel 11 and channel 16 using DMA.ADC works correctly in polling and interrupt mode.When I enable DMA, the ADC values in the buffer remain 0 all the time.DMA does not trigger at EOC, and DMA transfer never happens.I have been trying for 1 week, and I cannot understand what is wrong.What I have done:Configured ADC correctly (calibration, sequence, sampling time, etc.)Configured DMA correctly (channel, source/destination, size, circular mode)Enabled ADC DMA request (DMAEN)Enabled DMAMUX (for STM32G0 series)But still no data is transferred and buffer remains 0. #include "stm32g030xx.h" #include "gpio.h" volatile uint32_t adc_value[2] = {0},adc_buff = 0, adc_index = 0; void delay_ms(uint32_t ms) { SysTick->LOAD = 64000 - 1; // 64MHz ? 1ms SysTick->VAL = 0; SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk; for(uint32_t i = 0; i < ms; i++) { while(!(SysTick->CTRL & SysTick_CTRL_COUN
Hi,I am working on custom board with STM32MP257. I am trying to enable i2c7 but it is RIFSC blocked.When I try to change the rif configuration for i2c7 the flashing process is interrupted and I cannot download the FW.Any help would be appreciated.Thanks.
HiI'd like to do a memory-to-memory transfer, where I take a 8x12 px rectangle and copy it into a framebuffer. My display is 256x64px and it uses a grayscale 4 bpp format. My framebuffer size is 8192 bytes, and the rectangle that I need to copy is 48 bytes big. I'm confused whether I should use L4 or L8 because L8 seems more straightforward for my byte ordered graphics.I set my screen byte width to 128, and I used L8. My output image looks garbage, as if the alignment was off (bad stride maybe). What is suspicious is that the garbage image is 4 lines tall, which could mean that the stride is calculated with 2 bytes instead of 1. Based on the RM0468 I think in no PFC mode it only uses the foreground and if I use L8 as hdma2d.LayerCfg[1].InputColorMode = DMA2D_INPUT_L8; (which btw. couldn't be set with CubeMX) it could increment the address correctly. In addition, if I'm copying a 256x64px image to the frame buffer, it is working properly. void write_framebuffer(
Hello Everyone, I’m having trouble understanding how to get the STSW-WMBUS-GUI (GUI for wireless M-Bus stack evaluation of ST Sub-1GHz devices) to work with the STEVAL-FKI868V2 mounted on a NUCLEO-L053R8? https://www.st.com/en/embedded-software/stsw-wmbus-gui.html Does anyone have or know the details to get this to work?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.