cancel
Showing results for 
Search instead for 
Did you mean: 

BSP_AUDIO_OUT_Play works only when the data pointer is external flash in memory mapped mode. STM32H747HI-DISCO

ALevc.1
Associate III

Hello,

I would really appreciate a hint to understand why BSP_AUDIO_OUT_Play works if the data pointer is external flash memory in memory mapped mode. But doesn't work when the data pointer is a global array in RAM.

When it does't work with RAM pointer, I get time out error in

HAL_SAI_Transmit_DMA()

This is how the sound is played

void CAudioController::AudioPlay()
{
	uint8_t *qspi_addr = (uint8_t *)(0x90000000);
        //Set Ext flash in Mapped mode
	BSP_QSPI_EnableMemoryMappedMode(0);
	BSP_AUDIO_OUT_Play(0, qspi_addr, 2048);
}

And here I get the timeout error

uint8_t playBuff[20148];
 
void CAudioController::AudioPlay()
{
	uint8_t *qspi_addr = (uint8_t *)(0x90000000);
        //Set Ext flash in Mapped mode
	BSP_QSPI_EnableMemoryMappedMode(0);
        memcpy(playBuff, qspi_addr, 2048);
	BSP_AUDIO_OUT_Play(0, playBuff, 2048);
}

Best Regards,

Anton

2 REPLIES 2
ALevc.1
Associate III

@Community member​  Would be grate, if you culd share your thoughts about this issue :)

ALevc.1
Associate III

Finally fixed it. The problem was in the lincer script.

/Anton