542 questions
Advice
1
vote
0
replies
44
views
Why does the STM32H5xx Ethernet HAL provide a callback for appending an rx data buffer (that it found populated) to a list that it is managing?
The STM32H573 Ethernet HAL (header implementation) defines a callback, HAL_ETH_RxLinkCallback(), that it appears to call after it discovers that the hardware has populated a data buffer with received ...
1
vote
1
answer
88
views
STM32L010C6 TIM2 IRQ priority, over capture vs edge detection, classic timer issue
So I want to use a capture compare to measure an input frequency 0.1 Hz to 100 kHz.
The peripheral clock is set to 32 MHz to cover the full range and maximise the speed of calculations.
At lower ...
1
vote
0
answers
38
views
3.16 -> 3.17 HalLink now takes 3 arguments
After upgrading from Quarkus 3.16 to 3.17 my builds fail because HalLink constructor now takes 3 arguments instead of 1. I see that title and type have been added. I want to keep the same ...
1
vote
1
answer
126
views
How can I make all functions from the HAL standard library file work from RAM at once?
There is a HAL library of functions for working with flash memory. I want all the functions of this library to work from RAM. How can I do this correctly, without writing _attribute_((section("....
1
vote
1
answer
98
views
What is the proper way to turn a const parameter into non-const ? (STM32 HAL)
I am writing C++ wrapper classes for STM32 HAL functions, and ran into the following problem.
The HAL function is declared as:
HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t ...
1
vote
0
answers
91
views
__WFI() does not work as it should in STMCube
I'm programming in C on STM32f103rbT6. I'm using STM32CubeIDE.
For some strange reason, the __WFI function, instead of waiting for an interrupt to occur, automatically calls itself and doesn't wait ...
2
votes
0
answers
79
views
Preemption of Priority in EXTI not occuring when lower priority IRQ executes a forever while loop in the ISR
I am referring to the book Mastering STM32 by Carmine Noviello. I came across an example code which talks about Interrupt priorities. He showed an example which is given below where he makes a low ...
2
votes
1
answer
127
views
Why do MCU libraries use logic operations instead of bitfield structs?
In different hardware libraries for MCU I've seen (STM32 HAL, GD32 SPL, MDR32 SPL, LibOpenCM3), for operating with registers bits, logic operations (shifts, ands, ors, nots, etc) are used. But why not ...
2
votes
2
answers
442
views
STM32G4 TIM1 center aligned PWM update event problem
I'm facing an issue with the update event triggering in STM32G4 TIM1. I've configured TIM1 to generate PWM signals and set the update event to Center-Aligned Mode 1. However, I've noticed that the ...
0
votes
1
answer
204
views
Can you change the slave i2c address during execution on a stm32 board?
It’s all in the title
I want to be able to change the device's i2c slave address upon reception of a certain i2c command.
I'm currently using a nucleo 144 f207gz.
I've been trying to achieve this ...
0
votes
1
answer
105
views
Interrupt safety of `HAL_SPI_TransmitReceive`
I am working on RF communication in STM32 using the NRF24L01+ module via SPI. This module raises an interrupt on a GPIO pin whenever a new message is received so I handle the interrupt to read and ...
1
vote
1
answer
230
views
Why HAL_I2C_Mem_Read returns HAL_I2C_ERROR_TIMEOUT?
Consider this code portion:
...
typedef struct gyro_s
{
int16_t x;
int16_t y;
int16_t z;
} gyro_t;
...
/*
Configuration of:
- Gyroscopes' Full Scale Range.
- Deactivated Sleep Mode
*...
0
votes
1
answer
241
views
STM32 SPI communication with 93C46 EEPROM
I want to sent commands (Read, Write, etc.) to a 93C46 EEPROM with a STM32 micro-controller through the SPI interface. The data sheet of 93C46 says that we should send (e.g.) 20 clock cycles for a ...
0
votes
0
answers
75
views
Dialing and emergency number on android using kotlin and jetpack compose
I need to dial an emergency number from my app and from what I understand by reading the docs, I need to implement emergencyDial in IRadio.hal and implement emergencyDialResponse in IRadioResponse.hal ...
1
vote
1
answer
72
views
I2C address Error between Nucleo-F411RE and new board
I'm trying to test I2C communication between a board(Master) and stm32 board(Slave) with I2c-tools.
And I found some troubles.
I thought the slave address is 0x12, but in the ownaddress info of i2c.c,...
0
votes
0
answers
125
views
What is the proper way to configure the CLUT in an STM32H7?
I have an STM32H7A3 that is connected to a parallel (24-bit) RGB display. I would like to use the CLUT to save space in memory. I have the LTDC peripheral configured in L8 mode with a single layer ...
0
votes
1
answer
128
views
STM32 and BQ25713: it can not read / write to a register via I²C correctly
I am using the Texas Instruments BQ25713 charger. When we are programming BQ25713 via I²C, it cannot write/read a value to any register correctly.
E.g.; Not able to read ManufacturerID() 0x2E
Expected:...
0
votes
0
answers
34
views
How to retrieve value in controller of properties with [JsonPropertyName] applied?
public class PropertyCollection
{
[JsonPropertyName("User Name:")]
public string UserName { get; set; } = string.Empty;
[JsonPropertyName("User Password:")]
public ...
0
votes
1
answer
662
views
STM32 FDCAN filters not filtering anything
The problem
I am unable to get the HAL CAN filters to filter anything. I have FDCAN working perfectly on my STM32H723VGT6 uController. I would like to now implement CAN filters, but when I configure ...
1
vote
0
answers
287
views
How to split logic into modules using Embedded HAL in Rust (no_std)?
I'm exploring the use of Rust in embedded systems and I've using ESP32 with esp-hal crate and friends.
To this end, I've setup an ESP32 with a microSD card reader and a PCM5102a audio DAC to play some ...
1
vote
0
answers
153
views
Issues Establishing CAN FD on STM32U575
I'm trying to establish CAN FD communication using the STM32U575 microcontroller, but I've encountered some difficulties. While I successfully set up loop-back mode using the HAL library, I keep ...
0
votes
1
answer
1k
views
SDMMC not working on STM32H7 uControllers
Good day
The problem
I am trying to get an SD card working using an STM32H7 uController. I have in the past successfully integrated SDIO with STM32F4/F7 microcontroller but cannot get it to work on an ...
0
votes
3
answers
2k
views
How to write the device address when using HAL_I2C_Mem_Write and HAL_I2C_Mem_Read functions?
I want to use the HAL_I2C_Mem_Read() function to read a control register of ZSC31050 and then configure the control register by using the HAL_I2C_Mem_Write() function.
The default device address of ...
0
votes
1
answer
321
views
How to turn off LED in stm32 onn board f103c6t6?
I have started studying stm32. I'm trying to blink LED PC13 on board stm32f103c6t6. I could turn on led, but when i tried to turn it off, it didn't work. The fragment of code is below.
/* USER CODE ...
1
vote
0
answers
435
views
How to create vendor hal in Android
I have my custom AIDL HAL and my custom client which connects to this HAL in this way:
binder = ServiceManager.getService("my.custom.hal.ICustomThing/default");
This worked well when this ...
0
votes
0
answers
138
views
Interupting CAN communication with STM32
I am working on CAN communication with STM32F429I-Disc1 with TJA1050 transceiver. Standard communication works more than fine. What I would like to do next is to interrupt communication while CAN ...
0
votes
0
answers
45
views
Can I mix HAL USART2 initialization with Baremetal USART6 manipulation?
I am writing a code to read ADC data from an AC voltage sensor. I used HAL to initialize ADC 1 and USART2 for checking the values in Putty. However, I would like to use direct register manipulation to ...
0
votes
1
answer
66
views
Flash memory code migration from STM32F4 to STM32L4+ series
I have a function that was implemented for STM32F4 discovery board and needs to be migrated to STM32L4R9I.
static void hal_flash_bank_stm32_write(void * context, int bank, uint32_t offset, const ...
0
votes
1
answer
74
views
Get pin number in rust arduino_hal
I'm trying to port the firmata firmware in rust, more as an exercise to learn arduino coding than anything else.
However, I required to know the pin number, indeed part of the protocol requires doing ...
0
votes
1
answer
34
views
Need to decouple library and build a cohesive application
I have my application which has a hal function to invalidate cache memory. This application uses a library which needs the invalidate function.
A straight solution is to couple the application and ...
0
votes
0
answers
133
views
STM32 HAL UART Interrupt unable to receive data
I am trying to use the uart interrupt function on STM32F030xx series MCU. The initialization for uart is done using STM32cubeide, global interrupt enabled. Have already tested using HAL_UART_Transmit ...
0
votes
2
answers
458
views
STM32 Uart HalfDuplex keeps looping on USART2_IRQHandler never breaks
I cant seem to figure out why but when the Interrupt is enabled it just keeps calling USART2_IRQHandler I've checked the ISR register and nothing is changing it all stays the same.
I've tried ...
3
votes
1
answer
640
views
Why is HAL_UART_Transmit_DMA not transmitting my adc_buf array properly?
Using:
STM32CubeMX Version: 6.10.0
STM32CubeIDE Version: 1.13.1
Nucleo-F767ZI
I am working on a DIY oscilloscope project where I want to try and push the speed and accuracy of the STM32F7 series' ...
0
votes
1
answer
366
views
Using CMSIS with baremetal ARM cortex-M0 on Texas Instruments
I'm trying to integrate CMSIS-Core into a project that uses the MSPMOL-1306-Q1 MCU from Texas Instruments. Most examples seem to be for STM32 Cube MCUs. For instance, this and this.
I am facing an ...
0
votes
1
answer
713
views
STM32F407VG with LAN8742A through RMII protocol doesn't run
I am looking for help with my own PCB design first running process. I have PCB with STM32F407VG and LAN8742A PHY. After powering on, the orange LED is on constantly, and nothing else. I tried it with ...
1
vote
1
answer
941
views
Calculate CRC for modbus RTU using STM32 HAL [closed]
I have the implementation for calculating CRC16 with function and I want to do it using HAL_CRC_Calculate but cant get the same results.
My function is:
uint16_t CalcCRC(const uint8_t* const buffer, ...
0
votes
1
answer
971
views
STM32H7 SDMMC1 stuck at Initializing phase
I'm trying to make HAL's SDMMC1 work and didnt get any response in registers ( looking at it in KEIL's debug mode, registers just dont even toggle any bits) , also cant see any tries of Initialize MMC ...
0
votes
0
answers
429
views
HAL UART transmission from RxEventCallback
I've got a problem with sending data over UART using HAL_UART_Transmit_DMA function "being inside" HAL_UARTEx_RxEventCallback function more then one time (actually it doesn't matter what the ...
0
votes
1
answer
748
views
Writing FRAM driver STM32
I am trying to learn how to write a driver using the datasheet for a component. Using MB85RC16 FRAM in this case. Datasheet = https://www.fujitsu.com/ca/en/Images/MB85RC16-DS501-00001-8v0-E.pdf - Page ...
0
votes
1
answer
38
views
How supported Headers and Media Types are "discovered" with HATEOAS?
Simply put, imagine a particular resource can be served using different Media Types (e.g. application/vnd.com.example.resource-v1+json and application/vnd.com.example.resource-v2+json).
My question is,...
0
votes
0
answers
694
views
How to implement Brown-Out Reset, in STM32L496 MicroControler With STM32 Cube IDE Tool
How to implement Brown-Out Reset by using STM32_HAL API's, what are the API's are required, Which pin need to use for configuration, How check the input threshold value, How to Compare input ...
0
votes
0
answers
78
views
HAL define bug with STM32WLE5CCU microcontroller
Im trying to use interrupts from UART DMA and SubGhz with STM32WLE5CCU in STM32Cube IDE.
I noticed that I don’t get interrupts from both when I don’t define delay time between the configurations. The ...
0
votes
1
answer
125
views
How might one support cross-platform development in embedded systems (32-bit mcu board level primarily) - cross-vendor and cross-boards of a vendor?
I am trying to find an existing open source platform that abstracts hardware and boards-specifics, and allows jumping right in to application development on embedded mcu's. Ideally, I'd be able to use ...
1
vote
1
answer
325
views
stm32f103c8t6, pins B3 and B4 doesn't work, CubeIDE, HAL
I did something wrong in CubeIDE and two pins stopped working. (Maybe something else stopped working until I saw it). To check, I created a new project for stm32f103c8t6 and added the following code ...
0
votes
0
answers
44
views
Data circulating with UART in STM32
When I initialize my stm32 i add a 5 second delay and then transmit a 13 bytes long uint8 array over UART. On the reception side, I have my HAL_UART_Receive_IT in the main loop (before while) and then ...
1
vote
1
answer
250
views
A socket API return "permission denied" in HAL(C++) at Android development
I am creating new HAL application which use socket access.
However, the socket API return Operation not Permitted in HAL(c++).
s = socket(AF_INET, SOCK_STREAM, 0) /// ---> return Operation not ...
0
votes
1
answer
315
views
Assertion error while trying to debug program STM32CubeIDE, using NUCLEO board: exit error 3
EDIT: Problem solved. The IDE didn't install properly - apparently some files got corrupted. Works fine after reinstallation.
I just started learning how to program STM32 boards and my first project ...
0
votes
1
answer
119
views
MPU6050 Data Not Changing?
I'm using an STM326050 MCU and I'm trying to get gyroscope and accelerometer data using an MPU6050(MPU6050 Registers, MPU6050 Datasheet. I've made sure the MPU6050 is properly initialized and ready ...
0
votes
0
answers
142
views
problems with usb virtual com port stm32f769 discovery
I am trying to initialise VCP through usb on n stm32f769 diso.
The following function seems happy enough. But nothing happens. ioreg -p IOUSB doesn't detect anything
Where do I look next?
I am using ...
1
vote
2
answers
255
views
atoi() function returning garbage to terminal STM32, C lang
I have some question about atoi() function. I'm trying to convert string data received from HAL_UART_Receive_IT function to integer and next to sent again to terminal. And what I have at the exit it ...