Skip to content

Commit 8ed5830

Browse files
committed
Use linker script section to allocate PDM_BUFFER
1 parent 353bec5 commit 8ed5830

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/PDM/src/stm32/audio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ static PDM_Filter_Config_t PDM_FilterConfig[2];
4646
static volatile uint32_t xfer_status = 0;
4747

4848
// BDMA can only access D3 SRAM4 memory.
49-
int8_t* PDM_BUFFER = (uint16_t*)0x38000000;
49+
//int8_t* PDM_BUFFER = (uint16_t*)0x38000000;
50+
uint8_t PDM_BUFFER[PDM_BUFFER_SIZE] __attribute__ ((section(".pdm_buffer")));
5051

5152
void PDMIrqHandler(bool halftranfer);
5253
void PDMsetBufferSize(int size);

0 commit comments

Comments
 (0)