Questions tagged [hal-library]

The HAL drivers include a complete set of ready-to-use APIs which simplify the user application implementation. It was developed by STMicroelectronics for STM32 microcontrollers.

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
4k views

UART reception problem when SysTick Interrupt is enabled

I'm using a STM32F411RE-Nucleo board and generating a project with Cube MX for System Workbench. The problem is that HAL_UART_Receive function doesn't receive input ...
2
votes
0answers
149 views

Migrating from STM32

Our company spent couple years streamlining development and porting everything from a mess of different platforms to one unified STM32-based architecture. And now with global chip shortage it came ...
2
votes
2answers
3k views

How to wake STM32F103 by RTC using HAL libraries / Registers?

I've started digging into STM32F103 using HAL Libraries and raw registers. It's the first time to program at such low level. Anyway following a video I've successfully implemented "Standby" mode. ...
2
votes
1answer
636 views

STM32 HAL_ADC_Start() ends with HAL_ERROR

I'm new to microcontroller programming and I have a problem I can't solve. I am using STM32 Nucleo board L4R5ZI and I try to read the analog value on one of the pins, and then use the ADC to convert ...
1
vote
0answers
628 views

STM32 - Using Timer as timebase source for HAL in FreeRTOS application

I am learning more about freertos by making a task based program. My problem comes when initializing and configuring the HAL time sources. I read that it is necessary to choose another HW timer as ...
1
vote
0answers
173 views

USART6 STM32F746NG isn't working

I'm having trouble configuring the USART6 in my STM32F746NG. I am setting up the USART6 to enable UART comunication, using the code below to initiate it and also create an echo function. ...
1
vote
0answers
361 views

STM32F4 ADC oscillating

I am trying to read the ADC of a STM32F4. The code skeleton was generated by CubeMX, the HAL library is used. The read values are feasible but have periodic noise, as seen here: The plot was ...
1
vote
0answers
572 views

interfacing tcs3200 color sensor with STM32f746zg

I want to interface TCS3200 color sensor with STM32f746ZG. Since the TCS3200 outputs a frequency based on the amount of light received, I need some way to count the number of pulses for different ...
1
vote
0answers
2k views

Getting UART Overrun Error with HAL_UART_Transmit() vs HAL_UART_Transmit_IT()

On my main board I have a STM32F103ZET6 and I use HAL library V1.6 in order to program it.There is also a sensor board which is connected to my main board and this sensor sends me data through UART ...
1
vote
1answer
34k views

STM32 HAL Implementing UART receive Interrupt

I have trouble in implementing the USART RX on a stm32f303k8t6 with the HAL libraries. What I actually want to achieve is, that I can send a variable length string over the uart bus and decode the ...
1
vote
0answers
2k views

STM32 non-blocking mode UART reception with HAL driver

I'm learning micro controller using STM32F429I-DISCOVERY board and have a question about non-blocking mode UART reception. I compiled this example project(UART_TwoBoards_ComIT) and flashed the STM32 ...
0
votes
0answers
38 views

Why is the buffer continue to be filled even when the CODEC is not receiving an input?

I am currently using the HAL function HAL_I2S_Receive(I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size, uint32_t Timeout) in order to collect an input ...
0
votes
0answers
70 views

ADC values too large on HAL stm32

Hi I am trying to read in a voltage value from a TDS sensor on my stm32 nucleo144-h723zg. The problem is that the voltage values are too high. The manufacturer only provides code and datasheet for ...
0
votes
0answers
58 views

What mechanism prevents me from initializing multiple peripherals on the same GPIO pin?

Can I initialize multiple peripherals on the same GPIO pin? For example, if I bind a GPIO with a peripheral, can I still manipulate this pin with the GPIO interface? With pseudo-code: ...
0
votes
0answers
46 views

I2C communication with MCP4728 and ATSAMD20J18 using HAL libraries

I'm trying to communicate MCP4728 with ATSAMD20J18 controller using HAL libraries. But the commands are returning NACK. Below are the commands. ...
0
votes
0answers
2k views

STM32 HAL_GPIO_WritePin not working

I am using an NUCLEO-F411RE and try to use the GPIO with HAL. Its the first time i am facing this problem. I initialized the GPIO Pins like this: ...
0
votes
1answer
61 views

SPI Daisy-chain with paralleled DIN

I'm trying to use daisy-chaining feature on three MAX5318 DAC's. However, I'm not sure how to do it properly. Do I need to turn CS low, then write 9 byte to SPI DIN, then double-trigger LDAC? Or to ...
0
votes
0answers
234 views

STM32G474 HAL Interrupt problem

I've just started learning STM32. I want to make a simple code that uses UART in interrupt mode. Unfortunately I can't make it work. I want an interruption occur when the microcontroller receives a ...
0
votes
0answers
73 views

MCU Package of STM32f1 series for stm32CubeMX

I am trying to download MCU Package of STM32f1 series for stm32CubeMX from the following link: https://www.st.com/en/embedded-software/stm32cubef1.html But the given link sends this messege that the ...
0
votes
1answer
646 views

HAL Library CAN Bus interrupt sources and callback functions

Im using STM32F407 Discovery board and HAL library in CAN bus(CAN1) Some receive interrupts used with callbacks (for example receive interrupt...
0
votes
0answers
601 views

STM32L4 External SPI NOR FLASH WinBond W25Q80DV

I am attempting to communicate with a winbond memory chip over SPI with the STM32L4VG. I am first just trying to read the manufacturing ID and my results are never consistent. Running the same code ...
0
votes
1answer
447 views

STM32F746 - DISCO I2C HAL_TIMEOUT

I am attempting to implement I2C interface on the STM32F7-Discovery Board using the a VEML 6070 UV light sensor (https://www.vishay.com/docs/84277/veml6070.pdf). The 7-bit slave address for the ...
0
votes
0answers
2k views

STM32 HAL UART receive timeout interrupt

I'm developing a software for the STM32l432KC (NUCLEO-L432KC) which uses 2 UARTS with DMA (RX DMA mode to DMA_CIRCULAR) using HAL. My problem seems to be quite common: the UART buffer length is ...
0
votes
0answers
2k views

STM32 HAL SPI DMA multi read sensor

I would like to read out a sensor over SPI using the DMA. Since the sensor has some noise, I would like to take the average and so I need to read out the sensor several times. For this I decided to ...
0
votes
1answer
1k views

how to set up SPI communication between a STM32F746ZG and a MCP2515

I am trying to communicate my STM32F746ZG microcontroller with a MCP2515 and am having a problem where I don't believe the MCP2515 is receiving anything I have sent via SPI. The reason I have come ...