Troubleshoot Codewarrior C code for saving variable to freescale micro MC9S08DZ128
$10-30 USD
Completato
Pubblicato circa 3 anni fa
$10-30 USD
Pagato al completamento
I have a variable in the attached code rm2 which is saved to the eprom. After programming the micro (which resets everything), rm2 = 65535, which makes sense. Then I save it with a value of, say, 8. When I restart the micro and read it, rm2 = 8, which makes sense. But if I then save it to some other value, it comes back as the wrong value. Sometimes it comes back as the original 8, sometimes something different. I'm an engineer trying to debug code from a very good programmer, who is no longer with the company. I'm hoping a good programmer can just look at this code an see potential problems for me to try as a fix.
Hey, I think the problem is that you don't erase the sector.
ERASE_SECTOR_EEPROM(0x3c58); // last one, doesn't erase 0x3c60 0x3c61 etc....
/* this missing: */
ERASE_SECTOR_EEPROM(0x3c60); //erase 8-byte block? unless you have selected 4-byte sector mapping, still should work though!
should be added to the save command. (if each sector erase is 8 bytes)
If you need help with anything else, don't hesitate to contact me.
$30 USD in 1 giorno
5,0 (1 valutazione)
1,0
1,0
2 freelance hanno fatto un'offerta media di $45 USD
I believe that my experience and my technical background makes me a competitive candidate for this task. Especially, my experience about software development, C, C++ and working with embedded systems match with the requirements of project.