Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Read and write from Flash memory of PIC32mx

Status
Not open for further replies.

rajalakshmiA

Newbie level 6
Joined
Jun 23, 2015
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
130
Hi
I want write a byte in internal Flash of pic32mx microcontroller.i have tried sample code.But i cant able to read the exact data .. Anyone help me on that...
 

Hi,

Please show your code.

Klaus
 

Hi,

Please show your code.

Klaus

This is My Code for NVM
int main(void) {

SYSTEMConfig(SYS_FREQ, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE);
// JTAG port must be disabled.
mJTAGPortEnable(DEBUG_JTAGPORT_OFF);

mPORTBSetPinsDigitalOut(BIT_8);

NVMErasePage((void *)NVM_PROGRAM_PAGE);
ReturnVal = NVMWriteWord((void*)(NVM_PROGRAM_PAGE), 0x1234);


if(ReturnVal == 0)
{
mPORTBSetBits(BIT_8);
}


read_data = *((int *)(NVM_PROGRAM_PAGE)) ;
Data1 = &read_data;



}

- - - Updated - - -

After erasing flash only i am writing into that
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top