My IAP routines work in the PDS900 emulator but not in a real device – why?
We suggest that you familiarise yourself with the “PDS900 IAP Applications note” (accessed through the Help menu). There are two points that you need to take careful note of that could cause a Flash write operation to fail: 1) If you are running interrupts and interleaving code Flash write functions amongst them then ensure that the OI error code returned is correctly processed. 2) If you are performing advanced power management with BOE programmed but enable or disable the brownout detector with the BOPD bit, then ensure that the detector is enabled prior to performing an Flash write operation. The data sheet is quite explicit in that the error code returned from the IAP calls should be examined and correctly processed.