Flash Library Help Mistake

General discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
JimKueneman
Posts: 417
Joined: 10 Jan 2009 22:03

Flash Library Help Mistake

#1 Post by JimKueneman » 04 Jan 2013 21:39

Reading the flash library docs was confusing me for the dsPIC33
procedure FLASH_Write(address : longint; var data_ : array[64] of word);
Fills one writeable block of Flash memory (64 instructions, 128 addresses, 192 bytes) in the "regular" mode. Addresses and data are being mapped 1-on-1. This also means that 3rd byte of each program location remains unused.
That made no sense as an instruction is 2 words wide and it says 64 instructions were passed in the array...

In the compiler if you check code completion it says
procedure FLASH_Write(address : longint; var data_ : array[128] of word);
That makes more sense.

Jim

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Flash Library Help Mistake

#2 Post by filip » 08 Jan 2013 11:44

Hi,

The routine prototype that you are referring to:

Code: Select all

procedure FLASH_Write(address : longint; var data_ : array[128] of word);
is used for PIC24EP and dsPIC33EP MCUs, for the dsPIC33 it is :

Code: Select all

procedure FLASH_Write(address : longint; var  data_ : array[64] of word); 
Regards,
Filip.

JimKueneman
Posts: 417
Joined: 10 Jan 2009 22:03

Re: Flash Library Help Mistake

#3 Post by JimKueneman » 08 Jan 2013 15:42

Sorry I am using the dsPIC33EP that is why I needed the 128. A blurb about that different in the help would be useful.

Jim

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Flash Library Help Mistake

#4 Post by filip » 09 Jan 2013 10:38

Hi,

Yes, I agree it would be good if this is documented.

Regards,
Filip.

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 General”