This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC2640R2F: OAD ICall_malloc() Heap Runout Problem

Part Number: CC2640R2F

Tool/software: TI-RTOS

This topic may have been discussed very long time ago but I don't see any fix or further discussion regarding this issue.

Based on the current CC2640R2F 1.35 SDK, this is how OAD handles the received writing block data:

  1. The central writes the block writing data to OAD_IMG_BLOCK_UUID
  2. oadWriteAttrCB() receives block data 
  3. oadWriteAttrCB() sends the received data block to SimpleBLEPeripheral_processOadWriteCB()
  4. SimpleBLEPeripheral_processOadWriteCB() calls ICall_malloc() to get the memory from the heap and stores it to the heap
  5. The application task takes the data from the heap and save it to the flash

The problem is obvious. If the speed between Central and Peripheral is really fast. ICall_malloc() might run out of the heap memory if the flash writing takes a little bit more time. And I don't see the current SDK takes care of this situation.

Samson