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.

  • TI Thinks Resolved

RTOS/CC2640R2F: Flash out of range error when using ADCBuf

Expert 1380 points

Replies: 21

Views: 379

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hi All,

I am trying to integrate ADCBuf into my project. after integrating "adcbufcontinuous" example into my project, I am getting below linker error.

"error #10099-D: program will not fit into available memory. placement with alignment fails for section ".cinit" size 0x3aa . Available memory ranges:FLASH size: 0xa090 unused: 0x4 max hole: 0x3"

No matter how much memory optimization I have done like reducing all static variables sizes .. etc.  This error is not going off. If I comment all ADCBuf API calls in the application then only it is clearing off. 

Any idea, why this is happening? 

Regards

Lakshmikanth. 

  • Guru 241570 points

    Is this in a BLE context? 

    How much memory do you have free before you try to add ADCbuf? 

     

  • In reply to TER:

    Hi TER,

    How to know flash image size in CCS? 

    Regards

    Lakshmikanth

  • Guru 241570 points

    In reply to lakshmikanth satyavolu:

    You can check the .map file

     

  • In reply to TER:

    Hi TER,

    Below are the contents from my map file before adding ADCBuf. It seems there is 1668 Bytes flash available. 

     

     

    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    FLASH_IMG_HDR 00000000 00000050 00000050 00000000 R X
    ENTRY 00000050 00000040 0000003c 00000004 R X
    FLASH 00000090 0000a090 00009a0c 00000684 R X
    SRAM 20000000 00004068 00002cdc 0000138c RW X
    AUX_RAM 400e0000 00000800 00000640 000001c0 RW X

    Regards

    Lakshmikanth.

  • Guru 241570 points

    In reply to lakshmikanth satyavolu:

    The ADCbuf driver takes up some space since it's using the DMA etc. You can test how much space this take by just looking at the http://dev.ti.com/tirex/explore/node?node=ABRdeCrcBJpAeet6NKFVYg__krol.2c__LATEST example. Have you looked into using the Sensor Controller, it could be that you save some space using this.

    Is the ADCbuf the last thing you have to include in your code to get it finished? If that is the case you should look into deleting unused defines etc to see if you can free up space. Or you should look into CC26x2 since this has more memory. 

     

  • In reply to TER:

    Hi TER,

    I have built the application you have mentioned. If I remove UART part from that app, it is using 16KBytes of flash. which seems to be very high for my memory layout.  

    We are using ADC for continuous battery monitoring in our application. Earlier we were using normal ADC in blocking mode. Now we need ADCBuf for callback mode to periodically check the voltage. 

    I already removed unnecessary peripheral headers from board.h file. We also have OAD in this application along with the BLE stack. 

    Can you please point me to sensor controller examples? I will have a look into it if it fits in my memory requirements. 

    Regards

    Lakshmikanth. 

  • Guru 241570 points

    In reply to lakshmikanth satyavolu:

    The Sensor Controller Studio (http://www.ti.com/tool/SENSOR-CONTROLLER-STUDIO) contains examples.

    ADCbuf is typically used to sample a periodical signal For this purpose it sounds like it's not required to have the extra functionality in the ADCbuf driver vs the ADC driver? You should at least check the memory footprint difference between the two. 

     

  • In reply to TER:

    I believe ADC driver doesn't have callback mode. It can only be used in blocked mode. This is the reason I am preferring ADC driver.

    I need a callback where I can check the battery voltage periodically to see if there is a drastic change in the voltage to save the application parameters before system goes down. 

    Regards

    Lakshmikanth

  • Guru 241570 points

    In reply to lakshmikanth satyavolu:

    First: Do you require higher resolution than BATMON gives? 

    Do you need callback mode to do what you want to do? You can do a ADC read and check of the value in a task that you runs at the wanted interval controller by a timer.

     

  • In reply to TER:

    BATMON monitors regulated output voltage in my design. So I cannot use it. I want to monitor battery voltage directly. 

    I need to check the voltage every 10ms. I have to experiment with it how does it effects other threads in my app. Let me check with this and get back. 

    Regards

    Lakshmikanth

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.