cancel
Showing results for 
Search instead for 
Did you mean: 

pma start address

kenny2
Associate
Posted on February 28, 2017 at 15:24

Hi,

In the CDC_Standalone example of stm32f0cube there is the following line in usbd_conf.h.

HAL_PCDEx_PMAConfig(&hpcd , 0x00 , PCD_SNG_BUF, 0x40);

Online I also often see 0x18 instead of 0x40. How do you determine the first address available in PMA? For instance, could I fill in 0x00 instead of 0x40? Why isn't this done? Where can I find this info in the reference manual? Thanks!

#pma-usb-pmaconfig #hal
1 REPLY 1
Imen.D
ST Employee
Posted on February 28, 2017 at 16:12

Hi,

The reference manual 

RM0091 mentioned that 'e

ach table entry is associated to an endpoint register and it is composed of four 16-bit half-words so that table start address must always be aligned to an 8-byte boundary (the lowest three bits of USB_BTABLE register are always “000�). '

To obtain the address in PMA, you can refer to the Buffer descriptor table entries which are described in the Section 30.6.2: Buffer descriptor table.

Hope this helps you.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen