请教STM32F2XX HS USB FIFO大小的问题

[复制链接]
4083|2
 楼主| zeaphr 发表于 2012-11-29 14:23 | 显示全部楼层 |阅读模式
在STM32F2XX的reference manual 中
HS USB有4K的fifo ram
这是原文
“It features a dedicated 4-Kbyte data RAM with advanced FIFO management:
– The memory partition can be configured into different FIFOs to allow flexible and
efficient use of RAM
– Each FIFO can contain multiple packets
– Memory allocation is performed dynamically
– The FIFO size can be configured to values that are not powers of 2 to allow the
use of contiguous memory locations”


但是在st提供的STM32_USB-Host-Device_Lib_V2.1.0中
关于fifo 在usb_conf.h中有这样一段说明:
*   (vi) In HS case12 FIFO locations should be reserved for internal DMA registers
*        so total FIFO size should be 1012 Only instead of 1024   


到底这个fifo ram是4KBytes还是1012Bytes?


如果把fifo设置超过1012bytes, 程序运行确实不太稳定。难道是reference manual出错?还是没理解对?
byeyear 发表于 2012-12-2 16:11 | 显示全部楼层
是4KByte 折算到32位字就是1024
另外注释中说了要保留12个字给DMA自己
剩下的就是1012了
 楼主| zeaphr 发表于 2012-12-6 10:27 | 显示全部楼层
明白了
多谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

11

主题

52

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部