STM32CubeMX (MCUs)

Showing results for 
Search instead for 
Did you mean: 

Forum Posts

UART DMA Memory Corruption during Buffer Wrap-Around

I'm using HAL UART Receive with DMA (configured using CubeMX). I'm encountering a problem where data via UART, send in chunks, is corrupted if a chunk doesn't fit at the end of buffer perfectly. By chunks I mean a set of byte-sized data that is trans...

01555cdd-5cbd-43c4-a234-eb25a712e08a.jpg 2567e32a-06ac-4be4-a013-18cc8052056c.jpg
lgacnik97 by Associate III
  • 7 replies
  • 3 kudos

STM32F401 SPI CLK turns off with DMA

Hello Got a weird issue, to further test I created  blank project with no other code to rule out conflict. When I put in HAL_SPI_Receive_IT(&hspi3, SPI_RX_BUF, 2);,According to my logic analyzer, the clk and data pins stay high and dont move. When I ...

i-3.jpg i-2.jpg i-1.jpg i-4.jpg

HAL_SPI_TransmitReceive_DMA not written correctly by CubeMX

I am using SPI with DMA as shown in the screenshot. DMA is using Data Handling to truncate data from SPI's 16bit buffer into 8 bit values.The following part of the code errors out. Commenting this code out makes my application work, but every time I ...

btd5 by Associate II
  • 2 replies
  • 0 kudos

HAL_UARTEx_ReceiveToIdle_DMA repeating same data

I am currently using HAL_UARTEx_ReceiveToIdle_DMA and getting results that don't make sense to me. My main function is very simple: int main() { MX_DMA_Init(); MX_UART4_Init(); HAL_UARTEx_ReceiveToIdle_DMA(&huart4, rxDmaBuffer, sizeof(r...

aweav1 by Associate
  • 1 replies
  • 0 kudos

Resolved! How the ADC works in F103RC

I've been confused for days and am unable to make the ADC work on F103RC and have to seek for help.The test consists of ADC1 with 6 channels, an UART for printf and an I/O port that drives an LED. The ADC configuration: The test code: /* USER CODE BE...

Chao_0-1711202637902.png Chao_2-1711202730095.png Chao_1-1711202678933.png Chao_3-1711202780449.png
Chao by Senior
  • 15 replies
  • 1 kudos

Resolved! ADC multichannel with DMA with more than 8 ADC channel

HI everybody,i am using STM32G0B1 and in an older project i used successful ADC multichannel DMA conversion of 8 channel. I started a multichannel ADC conversion of 8 channel and a ADC callbacksets the finished bit and later on i read the result for ...

Kai4 by Associate II
  • 3 replies
  • 1 kudos

Resolved! Setting up a multichannel ADC with DMA

Hello.Recently I've been trying to set up a multichannel ADC. The data of both channels are supposed to be transfered to memory through DMA. I've looked through many examples, read many discussions but none of them addressed my issue. In my CubeIDE C...