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 have a question about DMA in the STM32L432 (and presumably similar more most STM32L4* devices). The background is that I'm trying to set up timer #2 driving a DAC, and have the DAC grab new data from a circular buffer via DMA.In the RM0394 reference manual (chapter 11: DMA controller), Table 41 details the request-to-channel multiplexor. For channel 3, CxS[3:0]=0110, it lists “TIM6_UP DAC_CH1.”First, what does TIM6_UP mean? Is it meant to be a timer update event, as somehow distinct from the timer trigger-output TRGO? In any case, chapter 10 (Peripherals Interconnect Matrix) doesn’t even mention any interconnect from timers to DMA. Second, what does it mean to have two sources listed for the same mux setting? In my application, TIM2 is triggering the DAC, and the DAC requests a DMA transfer – so TIM2 never directly talks to the DMA controller. Does the notation “TIM6_UP DAC_CH1” mean that either source can trigger the DMA transfer, and the user is responsible for ensuring that o
My project uses H7 MCUWhen I use the USB host I try to write to the USB device, this works OK if I do not write more then 13 characters to a line any more and the data is not written to the file but the file is still created. The below code writes 1000 lines to a text file. uint8_t wtext[] = "\n hello world!1"; // this works // uint8_t wtext[] = "\n hello world!12"; // this does not work fresult = f_mount(&USBHFatFS, (TCHAR const*)USBHPath, 1); // mount usb stick fresult = f_open(&USBHFile, "1:/USBHost.txt", FA_CREATE_ALWAYS | FA_WRITE); // create file f_close(&USBHFile); // close to ensure the file is created for(int i = 0; i<1000; i++) { fresult = f_open(&USBHFile, "1:/USBHost.txt", FA_OPEN_APPEND | FA_WRITE); // open the file fresult = f_write(&USBHFile, wtext, sizeof(wtext), &byteswritten); // write the data f_close(&USBHFile); // close the file } fresult = f_mount(NULL, (TCHAR const*)USBHPath, 1); // unmount usb stick &nb
Hello,I have an issue with the maximum speed of the ADC clock for Nucleo-C031C6. In the device datasheet, it states that the max clock speed is 35 MHz. However, in STM32 CubeIDE, I have the option to select the asynchronous clock mode, and DIV1 is accepted as the prescaler. Alternatively, I can manually set synchronous clock (DIV1) and still get the ADC to work at 48 MHz. I am getting the correct timing and accurate results.Is this OK to do and are there any possible drawbacks? Thanks!
I have a f767 SPI1 connected to F411 SPI2. F411 DMA Circular buffers at 64 bytes.F7 is sending and receiving 32 byte packets at 10HzF7 Clock is at 196Mhz, F4 clock is at 100MHzAfter a few hundred packets the F4 NDTR dma register for TX is no longer 63 or 31 when Half or full RXTX interrupt occurs, but changes to a different value. This causes my expected F4 TX pkt filler to be out of alignment with the next DMA packet TX location. The RX->ndtr seems to be fine each time.How do I reset the DMA to realign the NPTR counters.If I slow down the F7 SPI clock the problem occurs less often.When we go to PCB the hope is that this will not be a problem.We need to connect 40 F411 to 4 SPI busses on 1 F7. Running with 32 pkts at 1Khz static void MX_SPI2_Init(void){/* SPI2 parameter configuration*/hspi2.Instance = SPI2;hspi2.Init.Mode = SPI_MODE_SLAVE;hspi2.Init.Direction = SPI_DIRECTION_2LINES;hspi2.Init.DataSize = SPI_DATASIZE_8BIT;hspi2.Init.CLKPolarity = SPI_POLARITY_HIGH;hspi2.In
I am using STM32G071RB+SRC1M1 as the source and communicating with emaker in the cable, which has been enabled globally_ VCONN_ SUPPORT, but using STM32CUBEMONITOR USB TYPE-C PD to send messages to sop1 failed. Sending to sink can succeed,can
Hello,I am implementing a DRP device that is to be connected to a battery.I have this DRP example setup with the X-NUCLEO-DRP1M1 and a NUCLEO-G071RB. It is working with a 5V profile and a fixed 5V supply.I have added a 9V source PDO in CubeMX, and can see it when I interface with the hardware through the CC lines, and now need to communicate to a DCDC to up the voltage from 5 to 9V.I am wondering where in the code base to interface with a digitally controlled I2C DC/DC converter. AN5225:Any help would be appreciated,Nate
Hi. I want to make microphone array with 16 ICS-52000 microphones connected to STM32L476RG. I made 16 PCB's and now I want to test each microphone and display some data in console just to see if they just work properly. Below is my SAI config: ICS-52000 MEMS mics have TDM interface wirh 24bit data. First time using SAI interface and it's a little bit confusing to me. I've tried to use HAL_SAI_Receive() function to get data, and store it in uint8_t data variable, but it didn't work. How to do it properly? Thanks for help!
STM32Cube FW_F4 V1.27.1HAL ETH PTPfilestm32f4xx_hal_tim_ex.cDefinition of TIM_TIM2_ETH_PTPline 75-79#if defined(TIM8)#define TIM_TIM2_TIM8_TRGO 0x00000000U /*!< TIM2 ITR1 is connected to TIM8 TRGO */#else#define TIM_TIM2_ETH_PTP TIM_OR_ITR1_RMP_0 /*!< TIM2 ITR1 is connected to PTP trigger output */#endif /* TIM8 */fix:#if defined (TIM2)#if defined(TIM8)#define TIM_TIM2_TIM8_TRGO 0x00000000U /*!< TIM2 ITR1 is connected to TIM8 TRGO */#endif /* TIM8 */#define TIM_TIM2_ETH_PTP  
Hi, i have a certain problem.I have an application which continuously reads out data from sensors. Each sensor read will be triggered by me by using a dma-uart transaction. On the receiving side i have a uart-dma in cyclic mode which fills up the buffer and gives me the wr/rd pointer to the incomming bytes. Currently i got 2 sensors each running on it's own task, so there is also a RTOS involved. All sensors are on a RS485-Bus in halfduplex mode, so i have to toggle the data-transmit or receive pin of the tranceiver by software. For that i'm waitng on the uart TC-Flag to occure inside an ISR to switch back to receive.Now there is a problem. At first everything works fine, but after several hours i see that the transceiver is still on transmitting didn't went back to receive, so the whole Bus is blocked. Task is still running. Could it be that interrupts are delayed that much (RTOS or i disable interrupts in my debug printfs) or even missed so that my uartTC-interrupt is enabled af
Hey ,I have a problem getting LWIP NO_SYS to work on a STM32F765IGT6. We have a custom board with a RMII-PHY and have a 50 MHz clk, data on the RXD0, RXD1 and CSR_DV lines. We also have data on the TXD0, TXD1 and TX-EN lines.On boot the device transmits an ARP announcement. And when trying to send a test UDP packet the device sends an ARP request, this request is seen and a response given.It looks like RX is failing in the device i.e. inside HAL_ETH_ReadData() we never enter:HAL_StatusTypeDef HAL_ETH_ReadData(ETH_HandleTypeDef *heth, void **pAppBuff){.../* Check if descriptor is not owned by DMA */while ((READ_BIT(dmarxdesc->DESC0, ETH_DMARXDESC_OWN) == (uint32_t)RESET) && (desccnt < desccntmax)&& (rxdataready == 0U)){ .... }...OWN bit is always set?This is the output from the SWV Data Console:SWV ITM Data Console - ITM Port: 0if: netmask of interface set to 255.255 ?netif: netmask of interface set to 255.255.255.0netif: GW address of interface set to 131.31.128.1
Posted on June 15, 2016 at 08:58I'm working with STM32F429NI with 2Mbytes of internal flashI use the dual bank boot mode & RWW to support FW upgrade to a product. I basically followed the examples I saw at STM32Cube_FW_F4_V1.7.0\Projects\STM324x9I_EVAL\Examples\FLASH\The user insert a SD with the new FW, the SW identify it, load the FW bin file to memory and flash it to the non-active bank, that is, I start with the SW loaded at 0x8000000 and the BFB2 option byte is 0 (boot from bank 1), then if there is a new FW I flash it to 0x8100000 (after unlock and erase) and after verify it I change the BFB2 to 1 and reset the system. The system is boot from Bank 2 successfully.Now, when I try to load a new FW version while I'm running from bank 2 I'm doing the same procedure but on Bank 1, that is unlock, erase and flash bank 1 with the new code, verify it and set BFB2 to zero but at that stgae the system hangs!!When I read the flash with a J-Link at that point I see that bank 1
Hi,I'm stuck on the slave responding to read holding and input register. I've followed the "Controllers Tech" page. Can anybody help me to solve the problem?The issue is not getting exact responses. STM32 slave receives data correctly from the software but does not send the same value with incorrect CRC.Here, I'll attach my code and proteus.
Hello ST Microelectronics Support Team, I am currently working with an STM32F429IIT6 microcontroller and intend to integrate Ethernet functionality using the KSZ8091RNACA Ethernet PHY. I have some questions and require guidance to successfully implement this setup.Compatibility with STM32 Cube MX LWIP: I would like to inquire whether it is possible to use STM32 Cube MX LWIP (Lightweight IP) for the KSZ8091RNACA Ethernet PHY integration with the STM32F429IIT6 microcontroller. Can you provide information or any specific considerations I should be aware of when using STM32 Cube MX LWIP with this particular PHY?Availability of Example Code: I am also curious if there are any example codes or reference projects available for integrating the KSZ8091RNACA Ethernet PHY with an STM32 microcontroller, particularly the STM32F429IIT6. Having access to such examples would greatly assist me in understanding the necessary configuration and code structure.Guidance for Ethernet Deve
STM32F103 and W5300 (Ethernet chip) were connected to FSMC.I've officially checked how to do firmware using Uart or USB.However, I can't find the firmware method using Ethernet.Can STM32F103 proceed with firmware upgrade using firmware data received from Ethernet Chip?
Hello, I try to write some user parameters to the non volatile memory of the program like using an EEProm , trying to read or wrote to say memory address 0x08019000 keeps crashing my program and debugger when reading / writing from it.I see from the memory scan with the debugger that address 0x08019000 did infact get written by luck in one of my many attemps today but still can't read / write to it realy.Here are the base functions I use:```uint32_t flashWriteData(uint32_t Address, uint64_t data){ HAL_FLASH_Unlock(); FLASH_EraseInitTypeDef EraseInitStruct; EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES; // EraseInitStruct.Banks = FLASH_BANK_1; // ? EraseInitStruct.Page = Address; // EraseInitStruct.NbPages = 1; uint32_t PageError; if (HAL_FLASHEx_Erase(&EraseInitStruct, &PageError) != HAL_OK) //Erase the Page Before a Write Operation return HAL_ERROR; // HAL_Delay(50)
Hi!!!Need assist. 2 boards with stm32F439 (Nucleo boards) direct connect1 board send packet (every 1 sec) using function:HAL_ETH_Transmit(&heth, &txConfig, HAL_MAX_DELAY);ok. packed succes captured and verified with WireShark, no errors.Try receive this packet with 2nd board.When i receive RX_COMPLETE Callback what i need to do?I was try HAL_ETH_ReadData(heth,&ptp_frame_incoming);But it filled 0x00 and after 4 frames (ETH_RX_DESC_CNT) i have ERROR_Callback with DMA errors;( with every next incoming frames.Please help to receive frames from ethernet with HAL
I designed a product that uses the STM32G474 MCU and found that if the BOOT0 pin is left floating, the MCU randomly appears to be running wild code when power is first applied. In my design, this could cause serious damage to the hardware. Although, I can program the nSWBOOT0 options bit so that the external BOOT0 pin is ignored, the initial application of power will always observe this pin (i.e., this pin must be tied low to ensure that execution start from the main Flash memory). When the STM32G474 is initially unprogrammed, if the external BOOT0 pin is tied low and execution starts from the main Flash memory, what will the MCU be doing (e.g., executing NOPs, continually jumping to address 0, etc.)?
Configure as a extended capacity SINK(15V/3A)NUCLEO-G0B1RE + X-NUCLEO-USBPDM1Could somebody can share some documents for reference?or if can give some suggestions or advices , it's also graet!
Dear community,I work on a 'robot' with odometrie.Each geared DC motor have a rotarty magnetic encoder ( AS5047P).I use Quadrature Output to Encoder mode. It's works but i have some questions...> get_valueWhathever the configuration on STMCube, the value given by tim4->CNT is a decrease value.My setting > Prescaler =0 / Counter Mode = 0 / Counter Periode = 60000.A timer is set for read value each 500us.My question, is how set the register value at 0. The register value increase up to the time interrup for read the data, next re-set the register at 0.> InterruptI would like replace the timer (for read value) by an interrupt when the register is full.Like this, my speed_correction(PID) function will be call in function of speed and not periodically...if you have an idea.. thanks :)
Dear all,I try to read out ADC-Data, that is streamed from an external adc (AD7768) out to the uC. What I want to do is to more or less directly stream out the data via USB CDC.Therefore, I planned to use the DMA between the SPI and USB. However, this doesn't really work consistently. It seems that there may be a timing problem and after some seconds to minutes the transmission via USB stops.At the moment I only start the HAL_SPI_Receive_DMA before while(1) and again in the receive complete callback before the USB_CDC_TX is called. Another strange thing is, that as soon as I do something inside the USB_Transmit_complete function, for example a HAL_Delay, the code stops here again. Is there anything I missed? Is it even possible to use USB with DMA and SPI this way?I also tried it with Interrupts, in this case the Code doesn't stop. However, only as long as I don't put anything in the CDC_Transmit_Complete function.I am looking forward to your responses.Thank you a lot in advance Best r
Hello, I found on one website that ST provide audio music codecs (mp3 wma aac) optimized for STM32.But i need contact sales office for information of availability for specified STM32. I can't find the procedure for obtaining this library.. What is procedure to receive codecs ?? I already implemented WAV, MP3, FLAC but for AAC i need memory optimized library. Maybe someone has experience in this matter? Best regards,Andrzej
Hi, I wanted to use the bootloader via uart in a nucleo-L476RG (target) and have an L4P5ZG as a Master. I read the AN2606 and AN3155 but I am facing some problems. The activation pattern is the 7. I did the following: - BOOT0->to VDD- nBoot1 ->1 -BFB2->0 ( default value)I connected the TX-RX and The RX-TX and the GND of both boards. I am using USART_1 ( I tried normal uart before and it seems to work) in both. I used the USB to power them. In the c code, I sent the first 0x7F. But I am always receiving a NACK(0x1F), so I cannot continue with the commands ( I wanted to send the get command to see if it was working before doing anything else). I am doing something wrong obviously but I do not know what, I read the application notes but I do not know what I am missing. Do you have any idea?I am not doing anything with the reset, can this be related? In some forums, they mention the reset but in the application note, it does not say muc
Hi,I am using STM 32H745I disco boards. When I have configured the boards with LTDC interface image has been displayed on 480*272 display.Now we have removed on board 480*272 display , we have connected external 480*480 display & I have initize the display through SPI.I want to know wheather is it possible ? If yes ...then how it needs to be configured ?Thankyou
Hi everyone. This is the first time I have to implement the FFT of a signal and I can't understand a few things.I wrote this code that "should" calculate the coefficients of the FFT of a sine wave in that I create with the DAC (the DAC code to generate sinewave works, I measured it with oscilloscope) and I kindly ask for some opinions on how to solve these 3 problems:1) The warning in the FFT instruction arm_rfft_fast_f32 that says: "passing arguments 2 and 3 of 'arm_rfft_fast_f32' from incompatible pointer type"2) If the code below that I wrote to calculate fftBufOut, in which the real and complex coefficients of the FFT of the sine wave should be present, is correct3) I don't see the coefficients inside fftBufOut right in the "Expressions" tab .. why? Below there are the only lines of code I wrote in the entire project:/* USER CODE BEGIN PD */#define FFT_BUFFER_SIZE 2048arm_rfft_fast_instance_f32 fftHandler;float fftBufIn[FFT_BUFFER_SIZE];float fftBufOut[FFT_BUFFE
Hi there,I'm new on stm32 platform and I'm also new on the bootloaders applications.I'm trying to arrange a custom bootloader for stm32h755 mcu to permit remote firmware updates of our products.My idea is to implement the bootloader application on the M7 core only, while end application require both M7 and M4 cores.By this way M7 flash will be shared between boot and final application while M4 flash will be dedicated to the end application only.M7 bootloader shall program both M7 and M4 applications.At the startup (power on or after system reset) bootloader on the M7 and M4 application will start: M4 will enter in stop mode waiting for the wake-up from the M7 as ususal, but bootloader will not release it.After its execution, bootloader M7 will jump to the (new) m7 application that will release the new programmed M4 application.To jump from the running application to the bootloader, M4 core shall perform a system reset.I already tried this mechanism and seems work as described.it could
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.