Microchip
直播中

陈炜

7年用户 213经验值
私信 关注
[问答]

DSPIC33 EP32 MC202的耐久性是多少?

您好,我已经成功地在PIC32 MX NVM读/写上工作了。现在我必须工作在SPIC33 EP32 MC202NVM读/写上。我需要保存4个整数值。DSPIC33 EP32 MC202的耐久性是多少?什么样的变化我需要工作的DSPIC33 EP(XC16编译器)..我可以使用相同的代码吗?有演示代码吗?我需要装配级指令来使用DSSPICEP吗?——TS9

以上来自于百度翻译


      以下为原文

    Hello,

I have successfully worked on PIC32MX NVM Read/Write .Now I have to work on dsPIC33EP32MC202  NVM Read/Write.
I need to save 4 integer values . What is  the endurance for dsPIC33EP32MC202  ?
What kind of changes I need to work the dsPIC33EP (XC16 Compiler)..
Can I use same code ? Any Demo Code ? Do I Need assembly level instructions to Work with dsPIC33EP ?

#include
// Tell the compiler where you want it:
#define ROMDATA1_ADDR 0x9d008000
#define NVM_PAGE_SIZE 4096
const uint16_t __attribute__ ((space(prog), address(ROMDATA1_ADDR))) RomData1[NVM_PAGE_SIZE];
// Let the compiler/linker put this anywhere it wants to
const uint16_t __attribute__ ((space(prog), aligned(NVM_PAGE_SIZE))) RomData2[NVM_PAGE_SIZE];
void TestNVM(void)
{
unsigned int x,databuff[10]={'A','B','C','D'};
// Note that for xc32 and c18, just initializing Uart2 makes
// printf work.
// Erase second page of Program Flash
NVMErasePage((void *)ROMDATA1_ADDR);
// Write 128 words starting at Row Address NVM_PROGRAM_PAGE
printf("Write Value n");
NVMWriteRow((void *)ROMDATA1_ADDR, (void*)databuff);
printf("Display Written Valuen");
printf((void *)ROMDATA1_ADDR) ;
printf((void *)ROMDATA1_ADDR+4) ;
printf((void *)ROMDATA1_ADDR+8) ;
printf((void *)ROMDATA1_ADDR+12) ;
printf("nn");
}


--
TS9

回帖(3)

赵护林

2018-11-7 15:47:01
您好,我从Microchip网站上已经有了CykDeCe88yRTSPWorddWrad示例。在研究了这个演示后,我想使用DSPICTSPAPI API和RTSPAPI API来使用DSPIC33 EP设备NVM来使用。/ /读取页面并将数据放入Page MeReRoBuf数组TEMP= Flash Page Read(NVMADRU,NVMADRPGEAR,Page)//修改Page MeReRoBuf数组TEMP= Flash Page MyDyFy(NVMROW,NVMSIZE,MyRoDATAILAM,Page Error BuffFF);/ /在Flash TEMP= Flash Page(NVMADRU,NVMADRPage对齐)中擦除页面;/ /用修改数据TEMP= Flash Page编写程序(NVMADRU,NVMADRPGEAR对齐,Page MeReBufff)无法理解如下:如何选择DSPIC33 EP32 MC202中的特定记忆?下面的PIC32 MXDSPIC33 EP如下?请更新我……TS9

以上来自于百度翻译


      以下为原文

    Hi,
 
I have checked ce478_rtsp_word_write example from Microchip website.After study this demo I think
rtsp_api.h and rtsp_api.s is necessary to work with dsPIC33EP Devices NVM to use .
 
// Read the page and place the data into pageMirrorBuf array
temp = FlashPageRead( nvmAdru, nvmAdrPageAligned, pageMirrorBuff );
// Modify the pageMirrorBuf array
temp = FlashPageModify( nvmRow, nvmSize, myRowDataInRam, pageMirrorBuff );
// Erase the page in Flash
temp = FlashPageErase( nvmAdru, nvmAdrPageAligned );
// Program the page with modified data
temp = FlashPageWrite( nvmAdru, nvmAdrPageAligned, pageMirrorBuff );
Unable to understood as below:

nvmAdru = __builtin_tblpage( &myRowData1InFlash[0] );
nvmAdr = __builtin_tbloffset( &myRowData1InFlash[0] );
nvmAdrPageAligned = nvmAdr & 0xF800; // Get the Flash Page Aligned address
nvmRow = ( (nvmAdr >> 7) & 7 ); // Row in the page
nvmSize = 128;
nvmOffset = 8;

How to chose specific memory in dsPIC33EP32MC202 ?
As below for PIC32MX
    
#define ROMDATA1_ADDR 0x9d008000
#define NVM_PAGE_SIZE 4096
const uint16_t __attribute__ ((space(prog), address(ROMDATA1_ADDR))) RomData1[NVM_PAGE_SIZE];

dsPIC33EP is like below ?

uint16_t    myRowData1InFlash[] __attribute__( (space(prog), address(0x1000)) ) ={......}  // Long Array 

Please update me ..
--
TS9
举报

赵护林

2018-11-7 16:05:55
我使用的是频率为7.37兆赫的内部振荡器。是否需要为NSPM设置任何配置来使用DSSPICEP32 MC202?

以上来自于百度翻译


      以下为原文

    I am using Internal Oscillator Of Frequency 7.37 MHz.

Do I need to set
Any configuration for using NVM for dsPIC33EP32MC202 ?
举报

赵护林

2018-11-7 16:14:34
任何人都有什么想法?

以上来自于百度翻译


      以下为原文

    Any Body have some ideas?
举报

更多回帖

发帖
×
20
完善资料,
赚取积分