Skip to main content
kenny2
Visitor II
February 28, 2017
Question

pma start address

  • February 28, 2017
  • 1 reply
  • 779 views
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
This topic has been closed for replies.

1 reply

Technical Moderator
February 28, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks