cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 Change USB buffers

Gabriel T
Senior

I recently changed my SPI, I2C and USB HID to DMA. I changed buffers so they are in specific RAM sections which are accessible to DMA (RAM_D3 for I2C and RAM_D2 for SPI and USB). I am using DTCM RAM for stack, heap, data, etc. It was easy to change previous buffers with SPI and I2C but with USB I can't find where to change USB DMA buffers so it uses my buffers and not his. Because it will be probably located by the linker in DTCM and cause error. Here is my buffers :

uint8_t __attribute__(( section(".ramd2section") )) usb_rx[0x40]; // USB Rx
uint8_t __attribute__(( section(".ramd2section") )) usb_tx[0x40]; // USB Tx

2 REPLIES 2
Uwe Bonnes
Principal III

Where does the linker script put ramd2section? And look at the picture "bus maxtrix" is this is compatible with your selection.

Gabriel T
Senior
  .ramd2block (NOLOAD) :
  {
    KEEP(*(.ramd2section))
  } > RAM_D2

I wrote this in the linker script, I use this domain because it is the same as the USB peripheral