Hi all,
I am using FLASH_WriteDoubleWord in my program, but I cannot get it working. I read the help file, but unfortunately still in trouble. I would be grateful if somebody provides me with a simple example.
thank you for your help.
problem with FLASH_WriteDoubleWord
- lana.arsic
- mikroElektronika team
- Posts: 1715
- Joined: 15 Jan 2016 12:50
Re: problem with FLASH_WriteDoubleWord
Hi,
Can you tell me which MCU are you using,
which address have you tried to use in FLASH_WriteDoubleWord?
Kind regards,
Lana
Can you tell me which MCU are you using,
which address have you tried to use in FLASH_WriteDoubleWord?
Kind regards,
Lana
Re: problem with FLASH_WriteDoubleWord
Thank you for your response.
I am using dsPIC33EP512MU810. I manage to use FLASH_Wrire, FLASH_Read, etc. but unfortunately I could not utilize FLASH_WriteDoubleWord and FLASH_ReadDoubleWord. I would be grateful if you send a simple example or give me a brief explanation.
Thank you
I am using dsPIC33EP512MU810. I manage to use FLASH_Wrire, FLASH_Read, etc. but unfortunately I could not utilize FLASH_WriteDoubleWord and FLASH_ReadDoubleWord. I would be grateful if you send a simple example or give me a brief explanation.
Code: Select all
FLASH_WriteDoubleword(0x055400, BUFF1A);
Thank you
Last edited by jalal_am on 12 Jul 2017 20:07, edited 1 time in total.
Re: problem with FLASH_WriteDoubleWord
I also have a problem with Flash_Erase
as you see the FLASH_Erase in an infinite while loop. a funny thing happens, and it is that the FLASH_Erase reset the MCU second time it is executed, and never again happens! I mean that First I see all output erased ( output before while loop); then I see the correct values on output ( it means that erase, write and read are executed perfectly). but on next recursion, MCU reset and I see cleared output (0xFFFF). after that never this error occurs and every thing is fine. could you please share your comment on this issue, also?
Thank you for your help
Code: Select all
main{
....
FLASH_Read(0x055400, ReadWordArr, 64);
for (LOP=0; LOP<4; LOP++){
LATD=ReadWordArr[LOP];
delay_ms(10000);
}
while (1){
.....
for (LOP=0; LOP<4; LOP++){
// LATD=BUFF1A[LOP];
WriteWordArr[LOP]= BUFF1A[LOP];
// delay_ms(5000);
}
for (LOP=4; LOP<64; LOP++){
WriteWordArr[LOP]= 0;
}
FLASH_Erase(0x055400);
FLASH_Write(0x055400, WriteWordArr);
FLASH_Read(0x055400, ReadWordArr, 64);
for (LOP=0; LOP<4; LOP++){
LATD=ReadWordArr[LOP];
delay_ms(5000);
}
....}}
Thank you for your help
- lana.arsic
- mikroElektronika team
- Posts: 1715
- Joined: 15 Jan 2016 12:50
Re: problem with FLASH_WriteDoubleWord
Hi,
I have sent you response to your e-mail,
I suggest to continue our correspondence there.
Kind regards,
Lana
I have sent you response to your e-mail,
I suggest to continue our correspondence there.
Kind regards,
Lana