The hardware is our own, but it's pretty much the standard CC2541 design. When an Attribute is written, simpleProfile_WriteAttrCB gets called. If i add code to that subroutine that requires more than 80 to 100 msec to execute, the connection drops. In particular, I need to erase up to 47 pages of flash memory. Each page erase takes 20 msec, so whenever I need to erase 5 or more flash pages, the link drops.
Unfortunately, it takes about an hour to recreate the problem, so it will be tomorrow before I can give you the BTool dump.