I have trouble with in-system writing data to FLASH. I'm trying to use empty areas of single large FLASH (BRIGHT BM29F400B-90TC) for runtime data storage. Therefore, the same FLASH should be used for both code and data storage. My hardware is based on C164CI (internal ROM disabled) with 512k FLASH (0x00000/0x7FFFF) and 64k RAM (0x80000/0x8FFFF). Actually, that is C-Control-II unit from Conrad Electronic, and except for this problem it works just fine. As a programming tool I'm using Keil C166 Toolchain (latest update). I have tried what was recommended in Keil's APNT_138. That appnote was referred to C16x devices with on-chip FLASH, so I modified the system configuration and assembly language routines for FLASH erase and write according to C-Control-II requirements. After many attempts, it turned out that I couldn't erase nor write any of FLASH segments. I have no idea what to do further. If someone had the same or similar problem, or any experience in FLASH programming, please help! Best regards Miroslav