2020-05-14 12:58 PM
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
2020-05-15 05:03 AM
@Community member Would be grate, if you culd share your thoughts about this issue :)
2020-06-13 10:47 AM
Finally fixed it. The problem was in the lincer script.
/Anton