Skip to content

Commit 96c5c72

Browse files
HiFiPhilehathach
authored andcommitted
Fix double buffer not disabled for smaller devices.
1 parent f565267 commit 96c5c72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,11 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet
650650

651651
/* Create a packet memory buffer area. Enable double buffering for devices with 2048 bytes PMA,
652652
for smaller devices double buffering occupy too much space. */
653-
uint32_t pma_addr = dcd_pma_alloc(largest_packet_size, true);
654653
#if FSDEV_PMA_SIZE > 1024u
654+
uint32_t pma_addr = dcd_pma_alloc(largest_packet_size, true);
655655
uint16_t pma_addr2 = pma_addr >> 16;
656656
#else
657+
uint32_t pma_addr = dcd_pma_alloc(largest_packet_size, false);
657658
uint16_t pma_addr2 = pma_addr;
658659
#endif
659660

0 commit comments

Comments
 (0)