2017-02-28 06:24 AM
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 #hal2017-02-28 07:12 AM
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