• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 請教 DSPIC33FJ64GP706的DMA如何調用更多的SRAM?
#3
新會員
新會員


查看用戶資訊
正體字(CHT)是間體(CHS)轉的,請各位講究壹下,因爲發間體(CHS)會有不兼容想象。


是這洋的,I2S和DMA,我把全部代碼上傳上來。主要在i2s.c和player.c

因爲在1個周期裏,也就是每次1次P-P的過程,讀取SD卡(SPI-10M) /每次讀取512byte,>1次就會爆音,也就是造成延時。
而讀取1次則安然無恙。

實際上,我是的I2S結構式按照BCK=64FS設計的,也就是說
1個周期裏,LRCK(WS)爲高或低電平裏,SDATA的數據分別是0,d0,d1,d2...d15,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; 其中的0有16個(開頭1個,末尾15個),數據爲16個。(見附件)

也就是說TXBUFF0是16bit pcm數據,而TXBUFF1是16個0。
這洋就浪費了1k的資源。因爲我是以word來填充的,也就是兩個word[512]共計2k SRAM,


如果是修改成以下的形式,不知道是否也能工作:
把BCK修改爲32FS,數據仍對其第2個BCK周期,這洋有效的節約了DMA RAM的資源,而且以2FS來讀取3次SPI的數據,應該沒有太大問題。

但是,沒有在範例和規格書上找到可用資料。但是代碼裏的資料是可用的,已經正常工作。但是這段代碼的問題是,沒有預讀FAT表的功能,所以是像讀CD壹洋,壹扇區到下壹扇區。但是實際上如果遇到碎片,那麽是會隔4到8個扇區的,所以每4-16次讀取SPI的數據,則會有壹次機會導致1周期裏讀取2次SPI數據。具體的我在附件中有圖片解釋。

Attach file:


Link only for registered users

發表於: 2009/7/21 22:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教 DSPIC33FJ64GP706的DMA如何調用更多的SRAM?
#2
版主
版主


查看用戶資訊
抱歉 dsPIC33FJ 系列的 Dual-Port RAM 只設計到 2K Bytes 的大小,即使是 dsPIC33FJ256GP710 有 32K Bytes 的 RAM 但其 DMA RAM 也是一樣只有 2K Bytes。
不是很清楚你所說 2K DMA RAM 不夠用的使用方式,可否提出來討論一下。不知你是否有看過DMA裡的 Ping-Pong DMA Buffer 的功能? 使用此 Ping-Pong 模式可以讓 dsPIC 與 DMA 一起分工合作的。

發表於: 2009/7/21 11:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教 DSPIC33FJ64GP706的DMA如何調用更多的SRAM?
#1
新會員
新會員


查看用戶資訊
請教 DSPIC33FJ64GP706的DMA如何調用更多的SRAM?

單單的2K已經不夠用了,經過計算,至少要加大1倍。

假如更換30K SRAM的版本的話,劃不來~

谢谢上次帮过我的朋友和斑竹,现在已经做得差不多了。

發表於: 2009/7/17 12:33
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------