Skip to main content
Associate II
Nov 11, 2026 5:48 PM UTC
Solved

STM32H563+NetXDuo when configuring DMA goes to HardFault()

I am using code from STM32CubeH5/Projects/NUCLEO_H563ZI/Applications/NetXDuo/Nx_UDP_Echo_Server which I copied over to my own project running on the NUCLEO_H563ZI using STM32CubeIDE 2.2.0 and STM32CubeMX 6.18.1 with ThreadX and NetXDuo both selected.

DMA is not configured in the example and yet the code calls the HardFault() when it starts to configure the DMA

HAL_StatusTypeDef HAL_ETH_GetDMAConfig(const ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf)
{
if (dmaconf == NULL)
{
return HAL_ERROR;
}

dmaconf->AddressAlignedBeats = ((READ_BIT(heth->Instance->DMASBMR, ETH_DMASBMR_AAL) >> 12) > 0U) ? ENABLE : DISABLE;
dmaconf->BurstMode = READ_BIT(heth->Instance->DMASBMR, ETH_DMASBMR_FB | ETH_DMASBMR_MB);
dmaconf->RebuildINCRxBurst = ((READ_BIT(heth->Instance->DMASBMR, ETH_DMASBMR_RB) >> 15) > 0U) ? ENABLE : DISABLE;

I used the debugger and tried to access DMASBMR and it told me it could not access 0x1004. Why not? What or why were parts of the heth->Instance structure missing?

The example code works just fine with it  the situation. What am I missing?

Saket_OmBest answer
ST Technical Moderator
Nov 17, 2026 2:40 PM UTC

Hello ​@whascal 

Please refer to the article below to debug the HardFault.

How to debug a HardFault on an Arm® Cortex®-M STM32 | Community

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om

1 reply

Saket_OmBest answer
ST Technical Moderator
Nov 17, 2026 2:40 PM UTC

Hello ​@whascal 

Please refer to the article below to debug the HardFault.

How to debug a HardFault on an Arm® Cortex®-M STM32 | Community

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om