Search found 9 matches
- Tue Feb 11, 2025 5:16 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
OK I found the main cause. Because Arduino turns on D Cache by default
- Sun Feb 09, 2025 8:32 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
SPI_HandleTypeDef hspi2;
DMA_HandleTypeDef hdma_spi2_rx;
DMA_HandleTypeDef hdma_spi2_tx;
extern "C" {
void SystemClock_Config(void){
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
__HAL_PWR_VOLTAGESCALING ...
- Sun Feb 09, 2025 7:22 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
By the way, I can not enable DMA IRQ. Because program will get into WWDG_Handler.
- Sat Feb 08, 2025 5:32 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
well, I'm yet to test my DMA codes
https://www.stm32duino.com/viewtopic.php?p=15283#p15283
so I do not really know if it works.
But that while I worked the codes, I noted that there can be conditions of overrun if data not read etc. e.g. that RXNE (receive buffer not empty) is set.
If those flags ...
- Sat Feb 08, 2025 2:50 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
DMA IRQs are disabled.
I think DMA IRQs are actually needed, some samples from HAL codes, this is for F4
https://github.com/stm32duino/Arduino_Core_STM32/blob/main/system/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c#L1926
well I'm not sure, but in some of my codes, I've enabled them ...
- Fri Feb 07, 2025 12:40 pm
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
I don't think that simply adding the cube file is a good idea because some stuff are duplicated like weak function already overridden and don't which one the linker use.
You can see this topics on how to convert a Cube example in Arduino.
https://www.stm32duino.com/viewtopic.php?t=110
I know ...
- Fri Feb 07, 2025 1:01 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
Re: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
Hard to answer without the full code.
As the SPI DMA is not (yet) supported by the core it probably comes from your code.
SPI Code is genreated by CubeMX
//STM32H750XBH6
#define USE_ARDUINO
#include "hal_conf_custom.h"
#include "STM32H750XBH6/Core/Src/main.c"
#include "STM32H750XBH6/Core ...
- Thu Feb 06, 2025 3:39 am
- Forum: General discussion
- Topic: HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
- Replies: 11
- Views: 1598
HAL_SPI_TransmitReceive_DMA doesn't transfer properly under Arduino Core (STM32H750XBH6)
Same code works directly using CubeIDE.
Chip: STM32H750XBH6
DMA Config
Mode: Circular
Data Width: Byte/Byte
No Sync/Event used
SPI Config:
Mode: Slave with hardware SS Input
Frame Format: Motorola
Data Size: 8Bits
Other configs are default.
Here I encountered a strange problem.
//This is the ...
Chip: STM32H750XBH6
DMA Config
Mode: Circular
Data Width: Byte/Byte
No Sync/Event used
SPI Config:
Mode: Slave with hardware SS Input
Frame Format: Motorola
Data Size: 8Bits
Other configs are default.
Here I encountered a strange problem.
//This is the ...
- Tue Nov 05, 2024 7:35 am
- Forum: General discussion
- Topic: [BUG] __libc_init_array fails on STm32H750XBH6
- Replies: 2
- Views: 859
[BUG] __libc_init_array fails on STm32H750XBH6
Arduino IDE 2.3.3
STM32H750XBH6
STM32 MCU Based Boards 2.8.1
An empty sketch is compiled with only setup and loop.
in startup_stm32h750xbhx.s
running "bl __libc_init_array" causes WWDG_Handler before "main".
Program compiled using CubeIDE works fine. "main" can be called.
STM32H750XBH6
STM32 MCU Based Boards 2.8.1
An empty sketch is compiled with only setup and loop.
in startup_stm32h750xbhx.s
running "bl __libc_init_array" causes WWDG_Handler before "main".
Program compiled using CubeIDE works fine. "main" can be called.