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.

TMS320F28027F: TMS320F28027F

Part Number: TMS320F28027F

Tool/software:

I'm working on C2000 PICCOLO LAUNCHPAD TMS320F28027F microcontroller interfacing i2c using bmp sensor and included sci functionality if I'm using sci print msg except in read function writing in any function getting error that memory size is not fit. Not only that I'm getting this error if i include some program extension. Actually my controller flash is 64kb but in memory allocation I'm seeing the flash A 4kb,flashB 4kb why this and also i tried to increase the size of flash in cmd files by changing address please check below pictures

before sci msg print

after placing sci msg print(Description Resource Path Location Type
<a href="file:/C:/ti/ccs1271/ccs/tools/compiler/dmed/HTML/10099.html">#10099-D</a> program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".cinit" size 0x2e page 0. Available memory ranges: F2802x_generic_flash.cmd /BMP_USING_I2C/common/cmd line 152 C/C++ Problem
)

increasing the size of flash getting so many error like overlap register etc i have sloved all those and make error error cmd file

THIS IS CMD (which i edited) zero error  

but while debugging getting this error

  • Hi Kishor,

    Can you share me the complete linker cmd file with error and the one that you have made changes.

    Thanks

    Aswin

  • Hi Aswin,

    This issue resolved.

    BY increasing size of flash

    FLASHA      : origin = 0x3F0000, length = 0x007F7F     /* on-chip FLASH */

    Thanks 

  • iam working on ti launchpad tms320f28027f  i2c interface using bmp sensor  below is my code of i2c initialization and scanner to get the device address but iam not getting the address of i2c 0x76 if i connecting to gnd or 0x77 if i connected to vcc   and i have taken external pull up for both pins and also shorted jumper to isolate gpio expansion working on 32,33 pin of j6.7 and j6.8. because of external pullup iam setting the gpio pins to 1.please solve this

    void I2C_Init(void)
    {
    // Enable the I2C peripheral clock
    EALLOW;
    SysCtrlRegs.PCLKCR0.bit.I2CAENCLK = 1; // Enable I2CA clock
    EDIS;

    // Reset I2C to a known state
    I2caRegs.I2CMDR.bit.IRS = 0; // Disable I2C module (reset state)
    delay_function(10); // Small delay to ensure reset completes

    I2caRegs.I2CPSC.all = 149; // Prescaler for I2C clock
    I2caRegs.I2CCLKL = 10; // Low period for SCL
    I2caRegs.I2CCLKH = 5; // High period for SCL

    // Set master mode and enable I2C
    I2caRegs.I2CMDR.bit.MST = 1; // Set I2C as master mode
    I2caRegs.I2CMDR.bit.IRS = 1; // Enable the I2C module
    }

    // I2C Scanner Function
    void I2C_Scanner(void)
    {
    uint32_t timeout = 100000; // Timeout counter
    uint8_t deviceAddress;
    for (deviceAddress = 1; deviceAddress < 128; deviceAddress++)
    {
    // Set the slave address
    I2caRegs.I2CSAR = (deviceAddress << 1); // Shift left for 7-bit address

    // Send a start condition
    I2caRegs.I2CMDR.bit.STT = 1; // Set start condition bit

    // Wait for the start condition to complete
    while (I2caRegs.I2CSTR.bit.BB == 1 && timeout > 0)
    {
    timeout--;
    }

    if (timeout == 0)
    {
    // Timeout occurred
    scia_msg("I2C start condition timeout.\r\n");
    return;
    }

    // Check if the device responded
    if (I2caRegs.I2CSTR.bit.NACK == 0)
    {
    // Device found

    scia_msg("\r\nDevice found: \0");
    }

    // Send a stop condition
    I2caRegs.I2CMDR.bit.STP = 1; // Set stop condition bit

    // Wait for the stop condition to complete
    while (I2caRegs.I2CSTR.bit.BB == 1); // Wait for bus to be free
    }
    }

  • Hi Kishor,

    Please create a new thread for this query, our team will loop it to I2C experts.

    Thanks

    Aswin