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: CACHE_AS_RAM + Optimization_OFF = FAIL TO RUN

Part Number: CC2640R2F


Tool/software: TI-RTOS

Hi,

Here's a weird issue, if the 3 conditions are met the ICall Task is not started due to something like Heap allocation failing.

There's no MemFail on Heap allocation, in fact the MemMax stays quite "low" at 3500 vs 6500 when it starts fine.

All Task-Stacks look fine too.

How to reproduce:

- Load the current multi_role_cc2640r2lp_app example project, SimpleLink v 1.30.00.25.

- Enable CACHE_AS_RAM, make sure to set both Predefined Symbols and Command File Preprocessing, or there's a compilation target already setup in the example.

- Switch OFF optimization on the Application directory only, this should not affect ICall.

- Increase the size of advertData as follow, (this step might not be necessary, tbd). Make sure to clean before build.

// GAP - Advertisement data (max size = 31 bytes, though this is
// best kept short to conserve power while advertisting)
static uint8_t advertData[] =
{
  // Flags; this sets the device to use limited discoverable
  // mode (advertises for 30 seconds at a time) instead of general
  // discoverable mode (advertises indefinitely)
  0x02,   // length of this data
  GAP_ADTYPE_FLAGS,
  DEFAULT_DISCOVERABLE_MODE | GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,

  // service UUID, to notify central devices what services are included
  // in this peripheral
  17,   // length of this data
  GAP_ADTYPE_128BIT_MORE,      // some of the UUID's, but not all
  TI_BASE_UUID_128(SIMPLEPROFILE_SERV_UUID)
};

I've tried 'Task_construct()' instead of 'Task_create()' but that didn't help.

Could anyone at TI please investigate. Thanks.

Best regards,

Jerome