I need to store some data once during programing,address and some flags. I use PIC32 clicker2 board.
I have more that 2000 bytes to be stored, but I stuck at first step, reading flash.
Once program enter to routine below it is stacked ! Why? Anybody able to help?
Code: Select all
sub procedure citaj_flash() 'read flash
dim cntint as integer
dim memword as longword
dim memAddress as longword 'adresa na kojoj se PAGE nalazi a vidi se u memorijskoj mapi PIC32
dim ptr as ^longword
memAddress = 0x9D07E000 ' page address ' pocetna adresa flash memorije u chipu treba mi 1024 byta
ptr = memAddress 'pocetna adresa
for cntint= 0 to 127 'read 1 row of data 128*32 bits
memword = ptr^ 'read longword
longwordtostr(memword,pomstr40) 'store for print
memAddress=memaddress + 1 'next address
ptr = memAddress 'adresa+1
if test=1 then
uart2_write_text(pomstr40)
uart2_write_text(" ")
end if
next cntint
uart2_write(13)
uart2_write(10)
end sub
Thanks,Damir