Quantcast
Channel: Forums - Recent Threads
Viewing all 262198 articles
Browse latest View live

CCS/TMS320F280049: Installing SYS/BIOS

$
0
0

Part Number:TMS320F280049

Tool/software: Code Composer Studio

I have downloaded and installed the SYS/BIOS from the TI web-site.

The installation seem to go well and next time I opened CSS, then CSS seemed to recognize that new SW (SYS/BIOS) had been installed.

However, when I opened the Resource Explorer I did not see any appearance of a SYS/BIOS icon as I would have expected…


TIDA-00274: Max current limit

$
0
0

Part Number:TIDA-00274

The Feature list for the TIDA-00274 BLDC motor reference design lists the max current as 1.9Apk/1.25Arms, and the test data shows a test at this limit. However, the reference design uses the DRV8313 EVM hardware which states it can handle 2.5A pk.  

What limits the max current in the TIDA-00274 design?  Is this a limit set by the control algorithm? 

AWR1843: Bypassing the ADC

$
0
0

Part Number:AWR1843

Hello team,

For the AWR1843.  In this application, I have 4 of these devices in the system.  The application does not have a specific more aggressive requirement for angular resolution, but I have the 1243 device as a placeholder.

 

1. Can you bypass the ADC and put the I and Q data directly into the LVDS bus to send to an external device?

2. From the mmWaveEstimator – can someone elaborate on the term “ Measurement Rate (Hz)” ?  I have been assuming frame-rate to position this for a display refresh rate.

Thanks!

Errol

 

TPS22917: External pull-down for ON pin?

$
0
0

Part Number:TPS22917

Hi,

The TPS22917 datasheet says that the ON pin has an internal Smart Pull Down that pulls the ON pin down when it is not driven, negating the need for an external pull-down. The Pin Functions table in the same datasheet also states to not leave this pin floating.

Which is it?

Referencing TPS22917 datasheet - SLVSDW8A –SEPTEMBER 2017–REVISED FEBRUARY 2018

Thanks,
Will

AWR1642BOOST: TIDEP-0092

$
0
0

Part Number:AWR1642BOOST

Hi,

In TIDEP-0092 reference design schematics, I see a number of components with DNI=TRUE. Are these 'Do Not Include' components meant for variants of the board? If not, wouldn't it be easier not to show these components on the board to minimize chances of these getting populated during board assembly?

Thanks,

John

TMS320F28335: ePWM deadband delay

$
0
0

Part Number:TMS320F28335

Using Figure 32 in the ePWM user's guide as a reference diagram, I have a question as to the expected behavior on the output(s) of the ePWMxA and ePWMxB signals.

If the original PWM signal input, ie. EPWMxA.in (as illustrated in Figure 31) actually had a the falling edge of the input waveform occur before the rising edge delayed signal occurred, what would the expected EPWMxA output look like?  The modified falling edge is depicted by the red (color) line below.  It is meant to occur before the rising edge of the RED signal.

Would the ePWMA output have a similar waveform as the input, just delayed by RED and FED accordingly?

Or would the ePWMA output be suppressed?

RTOS/CC2640: The program hang and stop after any reading of I2C

$
0
0

Part Number:CC2640

Tool/software: TI-RTOS

I am working with the following code i have to clock tasks one for reading from SPI every 19.53 ms and the second reading from I2C every 1 second before i add the I2C the program was working probably after i added the I2C the progra

/*
 * Copyright (c) 2015-2016, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 *  ======== uartecho.c ========
 */

/* XDCtools Header files */
#include <xdc/std.h>
#include <stdio.h>
#include <xdc/runtime/System.h>

/* BIOS Header files */
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>

/* TI-RTOS Header files */
#include <ti/drivers/PIN.h>
#include <ti/drivers/UART.h>
#include <ti/drivers/PWM.h>
#include <ti/drivers/SPI.h>
#include <ti/drivers/I2C.h>
#include <ti/sysbios/knl/Clock.h>

/* Example/Board Header files */
#include "Board.h"

#include <stdint.h>

#define TASKSTACKSIZE     768

Task_Struct task0Struct;
Char task0Stack[TASKSTACKSIZE];
UART_Handle uart;
UART_Params uartParams;
PWM_Handle      pwm1;
PWM_Params      params;
uint32_t        pwmPeriod = 131080;      // Period and duty in microseconds
uint16_t        duty = 1000;
uint16_t        dutyInc = 100;

PIN_Handle ledPinHandle;
static PIN_Handle GSRPinHandle;
void clk0Fxn(UArg arg0);
void GSRCallbackFxn(PIN_Handle handle, PIN_Id pinId);
Clock_Struct clk0Struct,clk1Struct;
Clock_Handle clk2Handle,clk1Handle;

/* Construct BIOS Objects */

static SPI_Handle      ADChandle;
static SPI_Params      ADCparams;
static SPI_Transaction spiTransaction;
static uint8_t         transmitBuffer[24];
static uint8_t         receiveBuffer[24];
static char SendBuff[25]="0123456789abcdefghi";
static uint16_t count=0;
static uint16_t HeartRate=0;
static float old_res=1000;
uint8_t         txBuffer[10];
uint8_t         rxBuffer[5];
I2C_Handle      i2c;
I2C_Params      i2cParams;
I2C_Transaction     i2cTransaction;

/* Global memory storage for a PIN_Config table */
static PIN_State ledPinState;
static PIN_State GSRPinState;
//static uint32_t count=0;
Clock_Params clkParams;

/*
 * Application LED pin configuration table:
 *   - All LEDs board LEDs are off.
 */
PIN_Config PinTable[] = {
                         Board_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
    PIN_TERMINATE
};
PIN_Config GSRPinTable[] = {
    Board_GSR_INT  | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_DIS,
    POST  | PIN_INPUT_EN | PIN_PUSHPULL | PIN_IRQ_DIS,
    PIN_TERMINATE
};


void SPIFxn(SPI_Handle handle, SPI_Transaction *transaction)
{
 //  HeartRate=50;// sem_post(&slaveSem);
}
void I2CFxn(I2C_Handle handle, I2C_Transaction *transaction, bool res)
{
   HeartRate=res;//receiveBuffer[5];// sem_post(&slaveSem);
   count++;
}

void GSRCallbackFxn(PIN_Handle handle, PIN_Id pinId) {

}

/*
 *  ======== clk0Fxn =======
 */
Void clk0Fxn(UArg arg0)
{
    static float time;
    static float volt;
    static float new_res;
    static char pi1=0;
 //   static char str[];
    time = Clock_getTicks();
    time/=100;
    //PWM_stop(pwm1);
    //PIN_setOutputValue(ledPinHandle, Board_SPI_FLASH_CS, 0);
    pi1=PIN_getInputValue(Board_GSR_INT);
    //pi2=PIN_getInputValue(POST);
    SPI_transfer(ADChandle, &spiTransaction);
    //PWM_start(pwm1);
    volt=receiveBuffer[0]*0x10000+receiveBuffer[1]*0x100+receiveBuffer[2];
    if (volt>0x7fffff) {
        volt=-1*(16777216-volt);
    };
    volt=volt/((12842325.47-volt)/2000);
    new_res=volt;
    if (volt-old_res<-50) {
        volt=old_res;
    }
    old_res=new_res;
    //PIN_setOutputValue(ledPinHandle, Board_SPI_FLASH_CS, 1);
/*
    count++;
    if (count>=103){
    I2C_transfer(i2c, &i2cTransaction);
    count=0;
    }
*/
    sprintf(SendBuff,"%10.2f,%8.3f, %d\r",time,volt,count);
    if (pi1==0) UART_write(uart, SendBuff, sizeof(SendBuff));
//    PIN_setOutputValue(ledPinHandle, Board_SPI_FLASH_CS,!PIN_getInputValue(Board_SPI_FLASH_CS));

}

Void clk1Fxn(UArg arg0)
{
    I2C_transfer(i2c, &i2cTransaction);
}
/*
 *  ======== echoFxn ========
 *  Task for this function is created statically. See the project's .cfg file.
 */
void echoFxn(UArg arg0, UArg arg1)
{
    /* Call board init functions */
////////////////////////
    UART_Params_init(&uartParams);
    uartParams.writeDataMode = UART_DATA_BINARY;
    uartParams.readDataMode = UART_DATA_BINARY;
    uartParams.readReturnMode = UART_RETURN_FULL;
    uartParams.readEcho = UART_ECHO_OFF;
    uartParams.baudRate = 115200;
    uart = UART_open(Board_UART0, &uartParams);

    if (uart == NULL) {
        System_abort("Error opening the UART");
    }
//////////////////////

    PWM_Params_init(&params);
    params.dutyUnits = PWM_DUTY_FRACTION;
    params.dutyValue =PWM_DUTY_FRACTION_MAX/2;
    params.periodUnits = PWM_PERIOD_HZ;
    params.periodValue = pwmPeriod;
    pwm1 = PWM_open(Board_PWM3, &params);

    if (pwm1 == NULL) {
        System_abort("Board_PWM0 did not open");
    }
    PWM_start(pwm1);
//////////////////
    SPI_Params_init(&ADCparams);
    ADCparams.bitRate=1000000;
    ADCparams.dataSize=8;
    //SPI_init();
    ADCparams.transferCallbackFxn=SPIFxn;
    ADCparams.transferMode=SPI_MODE_CALLBACK;
    ADChandle = SPI_open(Board_SPI_MASTER, &ADCparams);
    if (!ADChandle) {
        Task_exit();
    }
    spiTransaction.rxBuf=(void *)receiveBuffer;
    spiTransaction.txBuf=(void *)transmitBuffer;
    spiTransaction.count=3;

    //intiating the I2C

    I2C_Params_init(&i2cParams);
    //i2cParams.transferCallbackFxn=I2CFxn;
    i2cParams.transferMode=I2C_MODE_BLOCKING;
    i2cParams.bitRate = I2C_400kHz;
    i2c = I2C_open(Board_I2C0, &i2cParams);
    if (i2c == NULL) {
        System_abort("Error Initializing I2C\n");
    }
    transmitBuffer[0] = 0;
    transmitBuffer[1] = 3;
    transmitBuffer[2] = 0x44;
    transmitBuffer[3] = 1;
    transmitBuffer[4] = 1;
    i2cTransaction.slaveAddress = 0x44;
    i2cTransaction.writeBuf = transmitBuffer;
    i2cTransaction.writeCount = 5;
    i2cTransaction.readBuf = receiveBuffer;
    i2cTransaction.readCount = 5;


    //intiating the clock function
////
    Clock_Params_init(&clkParams);
    clkParams.period = 19530/Clock_tickPeriod;
    clkParams.startFlag = false;



    // Construct a periodic Clock Instance
    Clock_construct(&clk0Struct, (Clock_FuncPtr)clk0Fxn,
                   0, &clkParams);

    clkParams.period = 2000000/Clock_tickPeriod;
    clkParams.startFlag = false;



    // Construct a periodic Clock Instance
    Clock_construct(&clk1Struct, (Clock_FuncPtr)clk1Fxn,
                   0, &clkParams);

    /* Open LED pins */
    /////////
    ledPinHandle = PIN_open(&ledPinState, PinTable);
    if(!ledPinHandle) {
        System_abort("Error initializing board LED pins\n");
    }
    //////
    GSRPinHandle = PIN_open(&GSRPinState, GSRPinTable);
        if(!GSRPinHandle) {
            System_abort("Error initializing GSR pins\n");
        }
    //char input;
    char echoPrompt[8]="ABCDE\r\n";

    /* Create a UART with data processing off. */

    Task_sleep(100);
    PIN_setOutputValue(ledPinHandle, Board_SPI_FLASH_CS, 1);
    Task_sleep(100);
    PIN_setOutputValue(ledPinHandle, Board_SPI_FLASH_CS, 0);
    Task_sleep(100);
    PIN_setOutputValue(ledPinHandle, Board_SPI_FLASH_CS, 1);
    Task_sleep(500);
    UART_write(uart, echoPrompt, sizeof(echoPrompt));
    while(!PIN_getInputValue(POST)){};
   // send START command for PPG
   I2C_transfer(i2c, &i2cTransaction);
   I2C_close(i2c);
   i2cParams.transferCallbackFxn=I2CFxn;
   i2cParams.transferMode=I2C_MODE_CALLBACK;
   i2cParams.bitRate = I2C_400kHz;
   i2c = I2C_open(Board_I2C0, &i2cParams);
   if (i2c == NULL) {
       System_abort("Error Initializing I2C\n");
   }
   transmitBuffer[0] = 0;
   transmitBuffer[1] = 4;
   transmitBuffer[2] = 0x44;
   transmitBuffer[3] = 2;
   transmitBuffer[4] = 8;
   transmitBuffer[5] = 0x20;
   i2cTransaction.slaveAddress = 0x44;
   i2cTransaction.writeBuf = transmitBuffer;
   i2cTransaction.writeCount = 6;
   i2cTransaction.readBuf = receiveBuffer;
   i2cTransaction.readCount =6;

   // send GET heart rate command for PPG

   // set DATA for heart rate parameter for PPG
        /*if (PIN_registerIntCb(GSRPinHandle, &GSRCallbackFxn) != 0) {
            System_abort("Error registering button callback function");
        }

        PIN_setConfig(GSRPinHandle, PIN_BM_IRQ, Board_GSR_INT | PIN_IRQ_NEGEDGE);
*/
////
   clk2Handle = Clock_handle(&clk0Struct);

   Clock_start(clk2Handle);

   clk1Handle = Clock_handle(&clk1Struct);

   Clock_start(clk1Handle);

    /* Loop forever echoing */
    while (1) {
//        I2C_transfer(i2c, &i2cTransaction);
        //SPI_transfer(ADChandle, &spiTransaction);
//      System_sprintf(echoPrompt,"%d \r\n",receiveBuffer[0]*0x100+receiveBuffer[1]*0x10+receiveBuffer[2]);
//        UART_write(uart, echoPrompt, sizeof(echoPrompt));
        //CPUdelay(8000*50);
    }
}
/*
 *  ======== buttonCallbackFxn ========
 *  Pin interrupt Callback function board buttons configured in the pinTable.
 *  If Board_LED3 and Board_LED4 are defined, then we'll add them to the PIN
 *  callback function.
 */

/*
 *  ======== main ========
 */
int main(void)
{
    Task_Params taskParams;

    Board_initGeneral();
    Board_initUART();
    Board_initPWM();
    Board_initSPI();
    Board_initI2C();

    /* Construct BIOS objects */
        Task_Params_init(&taskParams);
        taskParams.stackSize = TASKSTACKSIZE;
        taskParams.stack = &task0Stack;
        Task_construct(&task0Struct, (Task_FuncPtr)echoFxn, &taskParams, NULL);
    /* Start BIOS */
    BIOS_start();

    return (0);
}

m stopped after many reading and hangs. after i debugged the program i found that it hangs in a function related to the sysbios as in the photo (endless loop) 

TXS0102: TXS0102DCT part marking "Z" in second line

$
0
0

Part Number:TXS0102

Does anyone know what the "Z" in the second line of a TI part marking indicates?

The website shows the marking for TXS0102DCTR should be:

"NFE"

"Z"

The parts I have are marked with:

"NFE"

"8AR"

Does the Z just indicate that there are a second line of markings?


UCC2895: Require ESD & MSL Levels and Test Specifications

$
0
0

Part Number:UCC2895

We are updating our component information and are in need of the following information:

ESD LEVEL
ESD TEST SPEC
MSL LEVEL
MSL TEST SPEC

I hope to hear back from you in a timely manner.

LM2596: Increase fixed voltage by 0.3v

$
0
0

Part Number:LM2596

I designed a PCB using the LM2596S-5.0v, hoping that it would be close enough to drive a Raspberry Pi.. but the voltage output is at the low end, 4.8v per the datasheet.  Is there any easy way to bump the output voltage slighly so that it's closer to 5.1v?  It's connected exactly per the schematic.

        

            

CCS/LAUNCHXL-CC2650: UART log with PuTty

$
0
0

Part Number:LAUNCHXL-CC2650

Tool/software: Code Composer Studio

Hello,

I am using 

#include <ti/drivers/UART.h>
#include <uart_logs.h>

I have initialized 

UART_init();
UartLog_init(UART_open(Board_UART, NULL));

I am able to connect to Putty at a baud rate of 115200. But my issue is it only displays two logInfo messages. I am not able to see any other log messages.

I am attaching the app_ble_uartlog.cf file. Please let me know if I need to make any changes.

/******************************************************************************

 @file  cc2640.cfg

 @brief TI RTOS Configuration file for CC26xx

        Imported Symbols
        Note: These symbols are defined following the --cfgArgs option.
        In IAR this is done at the end of the pre-build step.  In CCS, this
        is done in Properties->build->XDCtools-Advanced options->Configuration
        script arguments.  Multiple symbols can be used separating them by a
        comma (",").

        By default, TI RTOS builds with RTOS in ROM, interrupt vectors starting
        at address 0x0 and uses ROM only kernel modules.

        NO_ROM:     When set to a non-zero value, RTOS builds in Flash instead
                    of ROM
        OAD_IMG_A:  When set to a non-zero value, interrupt vectors are set to
                    their expected location for on-chip OAD Image A.
        OAD_IMG_B:  When set to a non-zero value, interrupt vectors are set to
                    their expected location for on-chip OAD Image B.
        OAD_IMG_E:  When set to a non-zero value, interrupt vectors are set to
                    their expected location for external flash OAD.
        USE_EVENTS: Build the RTOS Kernel Event module.

 Group: WCS, BTS
 Target Device: CC2650, CC2640, CC1350

 ******************************************************************************

 Copyright (c) 2013-2016, Texas Instruments Incorporated
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:

 *  Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

 *  Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

 *  Neither the name of Texas Instruments Incorporated nor the names of
    its contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 ******************************************************************************
 Release Name: ble_sdk_2_02_01_18
 Release Date: 2016-05-06 22:17:28
 *****************************************************************************/


/* ================ ROM configuration ================ */
/*
 * To use BIOS in flash, comment out the code block below.
 */
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
  var ROM = xdc.useModule('ti.sysbios.rom.ROM');
  if (Program.cpu.deviceName.match(/CC26/)) {
      ROM.romName = ROM.CC2650;
  }
  else if (Program.cpu.deviceName.match(/CC13/)) {
      ROM.romName = ROM.CC1350;
  }
}



/* ================ Boot configuration ================ */
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
  var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
}
/*
 * This module contains family specific Boot APIs and configuration settings.
 * See the SYS/BIOS API guide for more information.
 */
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
  Boot.driverlibVersion = 2;
  Boot.customerConfig = false;
}


/* ================ Clock configuration ================ */
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
/*
 * When using Power and calibrateRCOSC is set to true, this should be set to 10.
 * The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
 * to set the tick period to 10 us without generating the overhead of additional
 * interrupts.
 *
 * Note: The calibrateRCOSC parameter is set within the Power configuration
 *     structure in the "Board.c" file.
 */
Clock.tickPeriod = 10;
Clock.swiPriority = 5;


/* ================ Types configuration ================ */
var Types = xdc.useModule('xdc.runtime.Types');
/*
 * This module defines basic constants and types used throughout the
 * xdc.runtime package.
 */



/* ================ Defaults (module) configuration ================ */
var Defaults = xdc.useModule('xdc.runtime.Defaults');
/*
 * A flag to allow module names to be loaded on the target. Module name
 * strings are placed in the .const section for debugging purposes.
 *
 * Pick one:
 *  - true (default)
 *      Setting this parameter to true will include name strings in the .const
 *      section so that Errors and Asserts are easier to debug.
 *  - false
 *      Setting this parameter to false will reduce footprint in the .const
 *      section. As a result, Error and Assert messages will contain an
 *      "unknown module" prefix instead of the actual module name.
 *
 *  When using BIOS in ROM:
 *      This option must be set to false.
 */
//Defaults.common$.namedModule = true;
Defaults.common$.namedModule = false;

/* Compile out all Assert's */
//Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;

/* Allow Mod_create() and Mod_construct() but not delete() or destruct() */
Defaults.common$.memoryPolicy = Types.CREATE_POLICY;



/* ================ Error configuration ================ */
var Error = xdc.useModule('xdc.runtime.Error');
/*
 * This function is called to handle all raised errors, but unlike
 * Error.raiseHook, this function is responsible for completely handling the
 * error with an appropriately initialized Error_Block.
 *
 * Pick one:
 *  - Error.policyDefault (default)
 *      Calls Error.raiseHook with an initialized Error_Block structure and logs
 *      the error using the module's logger.
 *  - Error.policySpin
 *      Simple alternative that traps on a while(1) loop for minimized target
 *      footprint.
 *      Using Error.policySpin, the Error.raiseHook will NOT called.
 */
//Error.policyFxn = Error.policyDefault;
Error.policyFxn = Error.policySpin;

/*
 * If Error.policyFxn is set to Error.policyDefault, this function is called
 * whenever an error is raised by the Error module.
 *
 * Pick one:
 *  - Error.print (default)
 *      Errors are formatted and output via System_printf() for easier
 *      debugging.
 *  - null
 *      Errors are trapped with a while(1) stub function. This option reduces
 *      code footprint.
 *  - non-null function
 *      Errors invoke custom user function. See the Error module documentation
 *      for more details.
 */
//Error.raiseHook = Error.print;
Error.raiseHook = null;
//Error.raiseHook = "&myErrorFxn";

/*
 * If Error.policyFxn is set to Error.policyDefault, this option applies to the
 * maximum number of times the Error.raiseHook function can be recursively
 * invoked. This option limits the possibility of an infinite recursion that
 * could lead to a stack overflow.
 * The default value is 16.
 */
Error.maxDepth = 2;



/* ================ Hwi configuration ================ */
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
/*
 * Checks for Hwi (system) stack overruns while in the Idle loop.
 *
 * Pick one:
 *  - true (default)
 *      Checks the top word for system stack overflows during the idle loop and
 *      raises an Error if one is detected.
 *  - false
 *      Disabling the runtime check improves runtime performance and yields a
 *      reduced flash footprint.
 */
//halHwi.checkStackFlag = true;
halHwi.checkStackFlag = false;

/*
 * The following options alter the system's behavior when a hardware exception
 * is detected.
 *
 * Pick one:
 *  - Hwi.enableException = true
 *      This option causes the default m3Hwi.excHandlerFunc function to fully
 *      decode an exception and dump the registers to the system console.
 *      This option raises errors in the Error module and displays the
 *      exception in ROV.
 *  - Hwi.enableException = false
 *      This option reduces code footprint by not decoding or printing the
 *      exception to the system console.
 *      It however still raises errors in the Error module and displays the
 *      exception in ROV.
 *  - Hwi.excHandlerFunc = null
 *      This is the most aggressive option for code footprint savings; but it
 *      can difficult to debug exceptions. It reduces flash footprint by
 *      plugging in a default while(1) trap when exception occur. This option
 *      does not raise an error with the Error module.
 */
//m3Hwi.enableException = true;
//m3Hwi.enableException = false;
m3Hwi.excHandlerFunc = null;

/*
 * Enable hardware exception generation when dividing by zero.
 *
 * Pick one:
 *  - 0 (default)
 *      Disables hardware exceptions when dividing by zero
 *  - 1
 *      Enables hardware exceptions when dividing by zero
 */
m3Hwi.nvicCCR.DIV_0_TRP = 0;
//m3Hwi.nvicCCR.DIV_0_TRP = 1;

/*
 * Enable hardware exception generation for invalid data alignment.
 *
 * Pick one:
 *  - 0 (default)
 *      Disables hardware exceptions for data alignment
 *  - 1
 *      Enables hardware exceptions for data alignment
 */
m3Hwi.nvicCCR.UNALIGN_TRP = 0;
//m3Hwi.nvicCCR.UNALIGN_TRP = 1;

/* Put reset vector at start of Flash */
if (typeof OAD_IMG_A != 'undefined' && OAD_IMG_A == 1)
{
  m3Hwi.resetVectorAddress  = 0x0610;
}
else if (typeof OAD_IMG_B != 'undefined' && OAD_IMG_B == 1)
{
  m3Hwi.resetVectorAddress  = 0x6010;
}
else if (typeof OAD_IMG_E != 'undefined' && OAD_IMG_E == 1)
{
  m3Hwi.resetVectorAddress  = 0x1010;
}
else
{
  m3Hwi.resetVectorAddress  = 0x0;
}

/* Put interrupt vector at start of RAM so interrupts can be configured at runtime */
m3Hwi.vectorTableAddress  = 0x20000000;

/* CC2650 has 50 interrupts */
m3Hwi.NUM_INTERRUPTS = 50;



/* ================ Idle configuration ================ */
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
/*
 * The Idle module is used to specify a list of functions to be called when no
 * other tasks are running in the system.
 *
 * Functions added here will be run continuously within the idle task.
 *
 * Function signature:
 *     Void func(Void);
 */
//Idle.addFunc("&myIdleFunc");



/* ================ Kernel (SYS/BIOS) configuration ================ */
var BIOS = xdc.useModule('ti.sysbios.BIOS');
/*
 * Enable asserts in the BIOS library.
 *
 * Pick one:
 *  - true (default)
 *      Enables asserts for debugging purposes.
 *  - false
 *      Disables asserts for a reduced code footprint and better performance.
 *
 *  When using BIOS in ROM:
 *      This option must be set to false.
 */
//BIOS.assertsEnabled = true;
BIOS.assertsEnabled = false;

/*
 * Specify default heap size for BIOS.
 */
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
  BIOS.heapSize = 1668;
}

/*
 * A flag to determine if xdc.runtime sources are to be included in a custom
 * built BIOS library.
 *
 * Pick one:
 *  - false (default)
 *      The pre-built xdc.runtime library is provided by the respective target
 *      used to build the application.
 *  - true
 *      xdc.runtime library sources are to be included in the custom BIOS
 *      library. This option yields the most efficient library in both code
 *      footprint and runtime performance.
 */
//BIOS.includeXdcRuntime = false;
BIOS.includeXdcRuntime = true;

/*
 * The SYS/BIOS runtime is provided in the form of a library that is linked
 * with the application. Several forms of this library are provided with the
 * SYS/BIOS product.
 *
 * Pick one:
 *   - BIOS.LibType_Custom
 *      Custom built library that is highly optimized for code footprint and
 *      runtime performance.
 *   - BIOS.LibType_Debug
 *      Custom built library that is non-optimized that can be used to
 *      single-step through APIs with a debugger.
 *
 */
BIOS.libType = BIOS.LibType_Custom;
//BIOS.libType = BIOS.LibType_Debug;

/*
 * Runtime instance creation enable flag.
 *
 * Pick one:
 *   - true (default)
 *      Allows Mod_create() and Mod_delete() to be called at runtime which
 *      requires a default heap for dynamic memory allocation.
 *   - false
 *      Reduces code footprint by disallowing Mod_create() and Mod_delete() to
 *      be called at runtime. Object instances are constructed via
 *      Mod_construct() and destructed via Mod_destruct().
 *
 *  When using BIOS in ROM:
 *      This option must be set to true.
 */
BIOS.runtimeCreatesEnabled = true;
//BIOS.runtimeCreatesEnabled = false;

/*
 * Enable logs in the BIOS library.
 *
 * Pick one:
 *  - true (default)
 *      Enables logs for debugging purposes.
 *  - false
 *      Disables logging for reduced code footprint and improved runtime
 *      performance.
 *
 *  When using BIOS in ROM:
 *      This option must be set to false.
 */
//BIOS.logsEnabled = true;
BIOS.logsEnabled = false;

BIOS.swiEnabled = true;



/* ================ Memory configuration ================ */
var Memory = xdc.useModule('xdc.runtime.Memory');
/*
 * The Memory module itself simply provides a common interface for any
 * variety of system and application specific memory management policies
 * implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
 */
/* Create a small "alloc-only" heap */
if (typeof NO_ROM != 'undefined' && NO_ROM != 0)
{
  var HeapMin = xdc.useModule('xdc.runtime.HeapMin');
  var heapMinParams = new HeapMin.Params;
  heapMinParams.size = 1668;
  var myHeapMin = HeapMin.create(heapMinParams);
  Memory.defaultHeapInstance = myHeapMin;
}



/* ================ Program configuration ================ */
/*
 *  Program.stack is ignored with IAR. Use the project options in
 *  IAR Embedded Workbench to alter the system stack size.
 */
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
  Program.stack = 1024;
  Program.argSize = 0;
}
else
{
  Program.stack = 512;
}



/* ================ Semaphore configuration ================ */
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
/*
 * Enables global support for Task priority pend queuing.
 *
 * Pick one:
 *  - true (default)
 *      This allows pending tasks to be serviced based on their task priority.
 *  - false
 *      Pending tasks are services based on first in, first out basis.
 *
 *  When using BIOS in ROM:
 *      This option must be set to false.
 */
//Semaphore.supportsPriority = true;
Semaphore.supportsPriority = false;

/*
 * Allows for the implicit posting of events through the semaphore,
 * disable for additional code saving.
 *
 * Pick one:
 *  - true
 *      This allows the Semaphore module to post semaphores and events
 *      simultaneously.
 *  - false (default)
 *      Events must be explicitly posted to unblock tasks.
 *
 *  When using BIOS in ROM:
 *      This option must be set to false.
 */
//Semaphore.supportsEvents = true;
Semaphore.supportsEvents = false;




/* ================ Events configuration ================ */
if (typeof USE_EVENTS != 'undefined' && USE_EVENTS != 0)
{
  var Events = xdc.useModule('ti.sysbios.knl.Event');
}



/* ================ Swi configuration ================ */
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
/*
 * A software interrupt is an object that encapsulates a function to be
 * executed and a priority. Software interrupts are prioritized, preempt tasks
 * and are preempted by hardware interrupt service routines.
 *
 * This module is included to allow Swi's in a users' application.
 */
Swi.numPriorities = 6;



/* ================ System configuration ================ */
var System = xdc.useModule('xdc.runtime.System');
/*
 * The Abort handler is called when the system exits abnormally.
 *
 * Pick one:
 *  - System.abortStd (default)
 *      Call the ANSI C Standard 'abort()' to terminate the application.
 *  - System.abortSpin
 *      A lightweight abort function that loops indefinitely in a while(1) trap
 *      function.
 *  - A custom abort handler
 *      A user-defined function. See the System module documentation for
 *      details.
 */
//System.abortFxn = System.abortStd;
System.abortFxn = System.abortSpin;
//System.abortFxn = "&myAbortSystem";

/*
 * The Exit handler is called when the system exits normally.
 *
 * Pick one:
 *  - System.exitStd (default)
 *      Call the ANSI C Standard 'exit()' to terminate the application.
 *  - System.exitSpin
 *      A lightweight exit function that loops indefinitely in a while(1) trap
 *      function.
 *  - A custom exit function
 *      A user-defined function. See the System module documentation for
 *      details.
 */
//System.exitFxn = System.exitStd;
System.exitFxn = System.exitSpin;
//System.exitFxn = "&myExitSystem";

/*
 * Minimize exit handler array in the System module. The System module includes
 * an array of functions that are registered with System_atexit() which is
 * called by System_exit(). The default value is 8.
 */
System.maxAtexitHandlers = 0;

/*
 * The System.SupportProxy defines a low-level implementation of System
 * functions such as System_printf(), System_flush(), etc.
 *
 * Pick one pair:
 *  - SysMin
 *      This module maintains an internal configurable circular buffer that
 *      stores the output until System_flush() is called.
 *      The size of the circular buffer is set via SysMin.bufSize.
 *  - SysCallback
 *      SysCallback allows for user-defined implementations for System APIs.
 *      The SysCallback support proxy has a smaller code footprint and can be
 *      used to supply custom System_printf services.
 *      The default SysCallback functions point to stub functions. See the
 *      SysCallback module's documentation.
 */
//var SysMin = xdc.useModule('xdc.runtime.SysMin');
//SysMin.bufSize = 128;
//System.SupportProxy = SysMin;
var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
System.SupportProxy = SysCallback;
//SysCallback.abortFxn = "&myUserAbort";
//SysCallback.exitFxn  = "&myUserExit";
//SysCallback.flushFxn = "&myUserFlush";
//SysCallback.putchFxn = "&myUserPutch";
//SysCallback.readyFxn = "&myUserReady";



/* ================ Task configuration ================ */
var Task = xdc.useModule('ti.sysbios.knl.Task');
/*
 * Check task stacks for overflow conditions.
 *
 * Pick one:
 *  - true (default)
 *      Enables runtime checks for task stack overflow conditions during
 *      context switching ("from" and "to")
 *  - false
 *      Disables runtime checks for task stack overflow conditions.
 *
 *  When using BIOS in ROM:
 *      This option must be set to false.
 */
//Task.checkStackFlag = true;
Task.checkStackFlag = false;

/*
 * Set the default task stack size when creating tasks.
 *
 * The default is dependent on the device being used. Reducing the default stack
 * size yields greater memory savings.
 */
Task.defaultStackSize = 512;

/*
 * Enables the idle task.
 *
 * Pick one:
 *  - true (default)
 *      Creates a task with priority of 0 which calls idle hook functions. This
 *      option must be set to true to gain power savings provided by the Power
 *      module.
 *  - false
 *      No idle task is created. This option consumes less memory as no
 *      additional default task stack is needed.
 *      To gain power savings by the Power module without having the idle task,
 *      add Idle.run as the Task.allBlockedFunc.
 */
Task.enableIdleTask = true;
//Task.enableIdleTask = false;
//Task.allBlockedFunc = Idle.run;

/*
 * If Task.enableIdleTask is set to true, this option sets the idle task's
 * stack size.
 *
 * Reducing the idle stack size yields greater memory savings.
 */
Task.idleTaskStackSize = 512;

/*
 * Reduce the number of task priorities.
 * The default is 16.
 * Decreasing the number of task priorities yield memory savings.
 */
Task.numPriorities = 6;



/* ================ Text configuration ================ */
var Text = xdc.useModule('xdc.runtime.Text');
/*
 * These strings are placed in the .const section. Setting this parameter to
 * false will save space in the .const section. Error, Assert and Log messages
 * will print raw ids and args instead of a formatted message.
 *
 * Pick one:
 *  - true (default)
 *      This option loads test string into the .const for easier debugging.
 *  - false
 *      This option reduces the .const footprint.
 */
//Text.isLoaded = true;
Text.isLoaded = false;



/* ================ TI-RTOS middleware configuration ================ */
var mwConfig = xdc.useModule('ti.mw.Config');
/*
 * Include TI-RTOS middleware libraries
 */



/* ================ TI-RTOS drivers' configuration ================ */
var driversConfig = xdc.useModule('ti.drivers.Config');
/*
 * Include TI-RTOS drivers
 *
 * Pick one:
 *  - driversConfig.LibType_NonInstrumented (default)
 *      Use TI-RTOS drivers library optimized for footprint and performance
 *      without asserts or logs.
 *  - driversConfig.LibType_Instrumented
 *      Use TI-RTOS drivers library for debugging with asserts and logs enabled.
 */
driversConfig.libType = driversConfig.LibType_NonInstrumented;
//driversConfig.libType = driversConfig.LibType_Instrumented;



// Remaining Modules
var Diags = xdc.useModule('xdc.runtime.Diags');
var Main = xdc.useModule('xdc.runtime.Main');
var Reset = xdc.useModule('xdc.runtime.Reset');


// Need Text loaded for formatting of Log_info/warning/error, but not for Log_print.
Text.isLoaded = true;

// Logging
var Log = xdc.useModule('xdc.runtime.Log');

// Override error output color with ANSI codes, and use shorter (file.c:line) format.
Log.L_error =  {
    mask: Diags.STATUS,
    level: Diags.ERROR,
    msg: "\x1b[31;1mERROR:\x1b[0m (%s:%d) %$S"
};

Log.L_info = {
    mask: Diags.INFO,
    msg: "\x1b[32;1mINFO:\x1b[0m (%s:%d) %$S"
};

Log.L_warning = {
    mask: Diags.STATUS,
    level: Diags.WARNING,
    msg: "\x1b[33;1mWARNING:\x1b[0m (%s:%d) %$S"
    };

// Pull in LoggerCallback
var LoggerCallback = xdc.useModule('xdc.runtime.LoggerCallback');

// Tell LoggerCallback to call our output function
LoggerCallback.outputFxn = "&uartLog_outputFxn";

// Tell the Idle module to add our flush() function to the idle loop (before Power)
var Idle = xdc.useModule('ti.sysbios.knl.Idle'); // Add if Idle isn't already imported.
Idle.addFunc('&uartLog_flush');

// Create a static instance of LoggerCallback and set as default Main logger
var loggerParams = new LoggerCallback.Params();
loggerParams.arg = 1;

// Only for Main (code that's not in an rtsc module)
Main.common$.logger = LoggerCallback.create(loggerParams);
//Defaults.common$.logger = LoggerCallback.create(loggerParams); // Use for all log events

// Turn on USER1 logs and INFO in Main module (user code). Turn off USER2 for fun.
Main.common$.diags_USER1 = Diags.ALWAYS_ON;
Main.common$.diags_USER2 = Diags.ALWAYS_OFF;
Main.common$.diags_USER6 = Diags.ALWAYS_ON;
Main.common$.diags_INFO = Diags.ALWAYS_ON;

Thanks and regards,

Rathna

ADS1115: 16bit resolution does not add up

$
0
0

Part Number:ADS1115

Hi,

I am using a voltage divider to measure the voltage drop on an ohmic resistor (0V-5V)(NTC). When I take out the sensor I should get a steady 2^16 output (bc 16bit resolution). However the ADS1115 gives me a value of 26753 (give or take). It varies +/- 10 data points. Why is that and what am I doing wrong?

I’m sending the data from the ADS1115 to an Arduino Mega. The voltage divider is supplied by the Arduino (5V).

Thank you so much in advance.

LAUNCHXL-F28069M: c2000 + TMC4671-EVAL+ TMC-UPS-10A70V-EVAL

$
0
0

Part Number:LAUNCHXL-F28069M

Hello

I was wondering if I can combine these 3 to make a motor controller out of it.

is there any possible way to do that?

since the main CPU of the TMC has less frequency compared with F28069m, I wanted to get rid of that and use C2000 instead.

any help appreciated.

Thanks in advance.

CCS/CC3220MODA: Access to the 32-MBit flash from the CC3220SF

$
0
0

Part Number:CC3220MODA

Tool/software: Code Composer Studio

My application requires storing a small amount of data in non-volatile memory from the CC3220MODA itself.

FIrst I though in using the internal flash of CC3220 but was deterred to do so after reding this https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/683919

Then I though in using the external 32-Mbit flash but I could not find which is the interface the CC3220SF uses to write/read data to/from that memory. 

Can you point me to an example where this is used?

Regards

Andoni

ADC08D1520: Potential datasheet errata in ADC08Dxxxx

$
0
0

Part Number:ADC08D1520

Team, 

I’ve been going over the datasheet for the ADC08D1520 ADC, and have a specific question about some info included in Tables 10 and 12 (registers 3 and 11). These each contain the quote:

 

“For best performance, it is recommended that the value in this field be limited to the range of 0110 0000 0b to 1110 0000 0b, i.e., limit the amount of adjustment to ±15%”

 

These quotes are also consistent across the ADC08Dxxxx family. Should they instead say “limited to the range of 0010 0000 0b to 1110 0000 0b”? This would agree with the linear relationship implied by the rest of the table, and give +/- 192 counts = +/- 15%.

 

Let me know what you think. Thanks!


DAC7760: DAC recommendation for wireless MCUs

$
0
0

Part Number:DAC7760

Hello, I'm using TI's Wi-Fi board; CC3220SF-launchxl

I'm using the HTTP Wi-Fi Web server example and I wish to use my MCU to control DAC outputs.

Since the CC3220 MCU does not support DAC, I'm planning to buy a 4-channel DAC from TI.

With the DAC, I'm trying to create

- 4 Bi-phasic pulses (minimum pulse width = 10μs, maximum pulse frequency = 4kHz)

I will try to connect a passive high pass filter on each channel so that I can create a Bi-phasic pulse.

After that, the filtered pulse will be fed to an Op Amp from TI.

- Creating consecutive pulse

I wish a feature that the DAC chip can create outputs for each channel consecutively.

For instance, after creating a pattern (1.66V -> 0 V -> 3.33 V) on channel 0, channel 0's output is fixed to 1.66V and channel 1 creates the same pattern.

Although this can be achieved by adding some code on the firmware side, I was curious whether I can set this type of feature on the DAC.

Considering the pulse conditions (need 4 channels, minimum pulse width = 10μs, maximum pulse frequency = 4kHz)

and the MCU I use (3.3V supply, supports UART, SPI 20MHz max, I2C),

what DAC chip can I use?

TMS320F28035: CSM application: load program but fails to verify

$
0
0

Part Number:TMS320F28035

My customer is having issues verifying the code after loading it when using password for CSM. We are using the latest version of Uniflash and loading a hex file. 

1. Does Uniflash reset the device at the end of loading the code? Will device lock automatically after that?

2. We are unable to verify the code even after successfully unlocking it.

3. Any reason why we are getting the load/verification error at 0x003F7FFB? When trying verification immediately after unlocking the device, we see error 0x3E8001.

4. We are putting the device in wait mode by pulling GPIO34 low. GPIO31 is TDO and we are leaving it alone - should we do something about TDO?

Thank you!

RTOS/66AK2H12: Building PCIe Example From SDK/PDK

$
0
0

Part Number:66AK2H12

Tool/software: TI-RTOS

Hi all,

I am having trouble building the PCIe example for the K2H evaluation module. I am following the guide here: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_overview.html#building-the-sdk 

The steps I have taken are as follows: 

  1. From the command line I navigate to the PDK directory, and then packages.
  2. Run C:\ti\pdk_k2hk_4_0_12\packages> gmake clean
  3. Run C:\ti\pdk_k2hk_4_0_12\packages> pdksetupenv.bat 
  4. Run C:\ti\pdk_k2hk_4_0_12\packages> gmake pcie LIMIT_BOARDS="evmK2H" LIMIT_SOCS="k2h" LIMIT_CORES="dsp_0"
  5. Run C:\ti\pdk_k2hk_4_0_12\packages> pdkProjectCreate.bat K2H all little pcie example dsp
  6. Then I follow the guide from the link at the top of this post to bring the project into Code Composer Studio and then build it:
  7. And then ultimately, I build the project, as described in Step 2. And.....I get an error.
  8. I feel as though I've followed the steps in the guide word-for-word. So could anyone please explain what I'm doing wrong, and what I can do in order to get the PCIe example to build for the DSP Core 0?    Thank you,Andre

TMS320F28379D: SD filter update rate

$
0
0

Part Number:TMS320F28379D

Good Afternoon,

I wonder if anyone can tell me how fast I can drive the SD filters at a 12 bit effective resolution.  We are planning to PWM at 40KHz or faster and to use shunt resistors for current measurement.  

Thanks,

Imre Kiss

AM5728: DDR3 from alternate vendors

$
0
0

Part Number:AM5728

My Sitara-based board has 4GB of DDR3 based on Micron's 512x16 chip, MT41K512M16 - which is now EOL. I'm getting samples of the two-die replacement this week. But the whole EOL thing got me worrying about sustaining this design going forward. We could be building this board for 10 years!

Some contract SW person gave me the impression that we couldn't just drop in other vendors' chips without updating driver SW.  I believed that for the last couple of years, but now I'm wondering. If a new DDR3 chip has the same address scheme and mode register definitions, it should work, right? I don't see anything in any data sheets that refer to a Vendor ID or device ID.  I'm thinking about adding ISSI or Alliance 512x16 DDR3 to the Approved Vendor List.

Does anyone know of any SW implication to having multiple vendors supply DDR3 chips? I understand there might be signal integrity issues, but what about SW?

Cheers!

MADman

Viewing all 262198 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>