2016-11-09 09:49 AM
Hello
As i inspected through stm32cubef3_1.6 and tested with keil uvision, pma address caculation is as follows:
USB_ADDRn_TX: 0x40006000(usb PMA base) + (BTABLE + 8*n) * 2
USB_COUNTn_TX:
0x40006000(usb PMA base) +
(BTABLE + 8*n + 2) * 2
USB_ADDRn_RX: 0x40006000(usb PMA base) + (BTABLE + 8*n + 4) * 2
USB_COUNTn_RX:
0x40006000(usb PMA base) +
(BTABLE + 8*n + 6) * 2
But as it seems, it is written wrong in RM0316(REV7, Pages1087 to 1089):
USB_ADDRn_TX(offset):
(
BTABLE + 16*n)
USB_COUNTn_TX
(offset)
:
(BTABLE + 16*n + 4)
USB_ADDRn_RX(offset):
(
BTABLE + 16*n + 8)
USB_COUNTn_RX
(offset)
:
(BTABLE + 16*n + 12)
2016-11-15 07:27 AM
Hello,
What is the problem that you have? Have you an issue with the address calculation in CubeF3?As mentioned in the RM0316 in the (32.6.2 Buffer descriptor table) section, to obtain the correct memory address value, the actual memory location address must be multiplied by two: ''In the following pages, two address locations are reported for devices with “1 x 16 bits/word� access scheme: the one to be used by application software while accessing the packet memory, and the local one relative to USB peripheral access. To obtain the correct memory address value to be used in the application software while accessing the packet memory, the actual memory location address must be multiplied by two.''Regards