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

MSP430F5132: MSP430 TIMER0 config

$
0
0

Part Number:MSP430F5132

HI ,

I am new to MSP430 processor and TI CCS i am working on a DC DC converter, to implement a voltage control algorithm i need a 10 milli seconds timer interrupt based delay using TIMER0 of MSP430.

I am trying to use the example below which i found in sample codes.

WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P1DIR |= BIT0; // P1.0 output
TA0CCTL0 = CCIE; // CCR0 interrupt enabled
TA0CCR0 = 50000;
TA0CTL = TASSEL_2 + MC_1 + TACLR; // SMCLK, upmode, clear TAR

__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
__no_operation(); // For debugger

// Timer0 A0 interrupt service routine
#pragma vector=TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR(void)
{
P1OUT ^= BIT0; // Toggle P1.0
}

the above timer example is  configured for 48 milliseconds interrupt approx but when i try to run the same code, I observed that timer interrupt rate is only 2 milliseconds instead of 48 milliseconds.

the source clock for the above code is SMCLK (DCO = 1.045MhZ). I think i need to tune the DCO ( digitally controlled oscillator) frequency. please suggest how to initialise timer0 and SMCLK accordingly to   

achieve 10 milliseconds delay.

Thanks & Regards

Naveen Reddy 

 


DRV8305: The IDRIVE setting

$
0
0

Part Number:DRV8305

Dear All,

I was study the application note SLVA714B: Understanding IDRIVE and TDRIVE in TI Smart Gate Drivers, i was wondering that what is the meaning of the IDRIVE setting in below tables, does the 10/20mA means sink/source current? 

Thanks a lot.

Facai Zhang

DRV8312: Running at low frequency, prevent booster from reloading

$
0
0

Part Number:DRV8312

Hi All

I try to use DRV8312 on a 3phase synchronous motor in a strict "block-commutation" mode. That means, that each of the lines only switches twice per rotation. 

Our motor runs at rotations speeds from 10000/min to 60000/min, that is from 166Hz to 1KHz. So the time a high side transistor needs to stay on without switching can last up to 2ms. 

As the high side FETs are NFETs, their gate voltage is generated with the booster-capacitor / diode mechanism. The DRV8312 is quite smart, it can detect, that its booster voltage to drive the high side fets is no longer sufficient, and decides on its own, that an additional switching cycle is necessary to reload the booster capacitor. 

The DRV8312 is designed to run with a setup in PWM mode, so the lines are frequently switched by a PWM pulse to lower the actual output voltage

In this situation, the lines are frequently switched, that there is always sufficient booster voltage available. 

In our design, we don't want PWM, neither do we want the DRV8312 to decide on it's own to switch a phase to reload the booster capacitor. So we experimented with enlarging the booster capacitor. This works to a certain amount of capacity, but it was never sufficient, to have no in-between-cycle switching. 

Is there a possibility to supply DRV8312 from an external Voltage to feed its high side driving stages? In our design, we are running the motor at 12V. So the high side is never higher than 12V. We 24V available. Is there a way to feed it to the DRV8312, so it does not need to use the booster capacitors? 

Like this?

Remove C411 and feed booster directly through R409 from 24V?  Obviously we missed something, we tried and DRV8312 didn't like this. I vigorously tried to create additional switching pulses. 

Is there a way to have DRV8312 not decide to switch one line on it's own? 

Thank you for your help

Johannes

Compiler/TMS320F28335: Locating a function interface at fixed address

$
0
0

Part Number:TMS320F28335

Tool/software: TI C/C++ Compiler

Suppose I have the following function:
  #pragma CODE_SECTION(funcA,"funcA_Section")
  int funcA( int k, struct XX *x )
  { /* lots of code */ }

In the linker command file I can create the section, with enough space to hold the function, and all is OK.
But if the size of the function is unknown or likely to grow, I either have to allocate a large amount of memory for the function, or risk having to move it or other code.  

Is there a smart way to a place the interface at a fixed location, but let the linker sort out the body?

This would work, but the double function call is inefficient.
  #pragma CODE_SECTION(funcA,"funcA_Section")
  int funcA( int k, struct XX *x )
  {
     return funcA_2( k, x );
  }

I was wondering about
  #pragma CODE_SECTION(funcA,"funcA_Section")
  int funcA( int k, struct XX *x )
  {
    asm("  LB  funcA_2");
  }
But I can't think how to create funcA_2 in this case.
Any ideas?

Thanks.

TIDA-00779: PTC issue

$
0
0

Part Number:TIDA-00779

In the reference design, if I don't want to use PTC(Not available locally). what should I do? open circuit or short circuit PTC part?

or it's mandatory to use PTC?

SN65MLVD048: M-LVDS receiver to regular LVDS transmitter interface

$
0
0

Part Number:SN65MLVD048

Hello,

      In our design we are planning to interface DS90LV031ATM/NOPB (single ended to LVDS transmitter) to a M-LVDS receiver SN65MLVD048RGZT. 

Please advise if this is alright. 

Thank you for your time,

LMH1219: Eye Opening Monitor programing

$
0
0

Part Number:LMH1219

// 1
spi_ti_WriteTo(0xff,0x04);
// 2
spi_ti_WriteTo(0x3e,0x00);
// 3
spi_ti_WriteTo(0x11,0xc0);
// 4
spi_ti_WriteTo(0x24,0x81);
// 5
rd_data= 1;
k=0;
while(rd_data&1){
spi_ti_ReadFrom(0x24, &rd_data);
if(k++ >1000){ trace("Time Out1 ~~!! \n");break;}
}
// 6
spi_ti_ReadFrom(0x26, &rd_data);
// 7
rd_data = 1;
k=0;
while(rd_data&1){
spi_ti_ReadFrom(0x24, &rd_data);
if(k++ >1000){ trace("Time Out2 ~~!! \n");break;}
}
// 8
spi_ti_ReadFrom(0x26, &rd_data);
// 9
rd_data = 1;
k=0;
while(rd_data&1){
spi_ti_ReadFrom(0x24, &rd_data);
if(k++ >1000){ trace("Time Out3 ~~!! \n");break;}
}
// 10
for(k = 0;k<4095; k++){
spi_ti_ReadFrom(0x25, &rd_data);
rd_data = rd_data & 0xff;
spi_ti_ReadFrom(0x26, &rd_data2);
rd_data2 = rd_data2 & 0xff;
eye_data[k] = rd_data*256 + rd_data2;
}
// 11
spi_ti_WriteTo(0x24,0x40);
// 12
spi_ti_WriteTo(0x3e,0x80);
// 13
spi_ti_WriteTo(0x11,0x20);
for(cont=0; cont<64; cont++)
{
for(k=0; k<64;k++)
{
trace("%04x",eye_data[data++]);
}
trace("\n");
}

1.Is the step-by-step method correct?

2.If the setup method is correct, what is different from the data in "SigCon Architect"?

Me

SigCon Architect

3.Did "SigCon Architect" process the data specially?

4.Can you get the source code used in "SigCon Architect"?

Before Eye Opening Monitoring ..

5.Can you tell me the basic settings?

Please reply by item.

Linux/AM5708: USB as ethernet port in custom AM5708 board

$
0
0

Part Number:AM5708

Tool/software: Linux

Hi:

I have a custom AM5708 based board and want to use USB2 as an ethernet port.

I have configured the pinmux in u-boot accordingly.

How to configure in dts and defconfig?

Billa


RM48L952: Dual channel

$
0
0

Part Number:RM48L952

the hercules RM48 is SIL 3 and as i understands it, this can only be achieved with dual channel logic. where can i find info on this matter? 

RTOS/PROCESSOR-SDK-TDAX: Radar cascade usecase (object detection) question about accurate phase/amp. calibration

$
0
0

Part Number:PROCESSOR-SDK-TDAX

Tool/software: TI-RTOS

Dear community members,

I am developing an awr1243 cascade system with custom antenna topology, and its control and data logging is implemented by TDA2x processor (and FPGAs).

The configuration of the system is successfully done using "PROCESSOR-SDK-RADAR",

and I checked all the range profiles are working without any problem.

however, the calibration between the virtual antennas seems not working due to modified antenna positions.

I am evaluating the system performance by using usecase "Object detection",

so I tried modify the antenna topology which is described in "chains_cascadeRadarOd.c" in Processor SDK example.

In shortly, my question is that how I can allocate each antenna position in the source code, and how is it possible to distinguish the 4 ar12xx chips.

(I only know what is the master chip and can't distinguish between slave chips)

I think I am having problem in especially in "gAoa_sensorRxOffset", How I can fill out this structure in what order?

Thank you.

Best regards,

LM74610-Q1: LM74610-Q1 / LM5060 for input battery polarity

$
0
0

Part Number:LM74610-Q1

Hi Sir 

I saw LM74610 and LM5060 both of can support input polarity function 

May I know which condition prefer to use LM74610 ,which condition prefer to use LM5060?

Thanks 

TLV320AIC34EVM-K: Audio Serial Data Bus

$
0
0

Part Number:TLV320AIC34EVM-K

Hi all,

I have to read two stereo channels, so two I2S outputs A and B of the Codec are used. Both I2S A and B outputs are connected to an FPGA on two IP I2S.

Is it possible to read I2S_A (Audio Serial Data Bus A) and I2S_B (Audio Serial Data Bus B) outputs simultaneously ? That means both I2S outputs are independent, i.e no data multiplexed ?

Best regards,

Pat

DLPC4422 I2C error

$
0
0

Error: DeVaSys UsbI2cIo::WriteI2c failed

?.04
Last Reset Source: 0xFF
e from the Help menu to get start
Last firmware error: 0xffffff0c (-244)
Write 2 bytes:
0000: 89 00

What is wrong with this?How to solve?

How to reduce ringing of the drain voltage in the push pull design

$
0
0

      Hai,

i am in the process of designing a push pull inverter.I had heating issues in primary and i happen to probe the drain voltage of the mosfets connected across the halfs of  transformer.The images of the ringing of the drains have been attached.How should i calculate the snubber for this ringing.Even though i had been suggested by ti to refer snubber design by Phili c tod.i couldn't find the proper way explaind in the document to reduce this ringing effect in image.how should i calculate the cap and resistor values for this type of ringing of the drain voltage.Two channels have been probed and the channels represent the halfs of the transformer with the mosfets.How should i estimate the power rating of the resistor values in design?

AWR1642BOOST: dat data file donot correspond with csv data file

$
0
0

Part Number:AWR1642BOOST

Hi TI-team,

I run the mmWave Demo Visualizer according to the mmwave_sdk_user_guide.pdf, and I got two data file "*.dat" and "*.csv".  My operation order was:  at first click "log start", then click "record start", then after a while the record stopped automatically according to the "record time" configuration, then click "log stop".  I thought that these two kinds of files represent the same data but with different forms, I read the *.dat datafile to a *.txt file according to the python program "parseTLV.py" that TI-team suggested. After that, I looked through these two data file, I could not find any correspondence in these two files. For example, in the ".csv" file the total targets number(the second coloumn) is alway less than 8, but in the ".txt" file there are some packet whose targets number bigger than 10. Is there anything wrong? Thanks a lot in advance!

Best wishes,

Kathy

(Please visit the site to view this file)


CCS/TMS320F28035: SCI communication two F28035

$
0
0

Part Number:TMS320F28035

Tool/software: Code Composer Studio

Hi,

I am trying to communicate between two F28035 via SCI. One F28035 receiver, one F28035 transmitter. I connected transmitter F28035's tx to receiver F28035's rx. But I could not see any value on the rx buffer. How can I fix this? Meanwhile I programmed two MCU on the same PC. I used LED3 for understanding which device working now.

Transmitter Code

#include "DSP28x_Project.h"     // Device Headerfile and Examples Include File

// Prototype statements for functions found within this file.
void scia_loopback_init(void);
void scia_fifo_init(void);
void scia_xmit(int a);
void error();
__interrupt void scia_rx_isr(void);
__interrupt void scia_tx_isr(void);

// Global counts used in this example
Uint16 LoopCount;
Uint16 ErrorCount;

void main(void)
{
    static volatile Uint16 GPIO34_count = 0;
    Uint16 SendChar;
    Uint16 ReceivedChar;

    // Step 1. Initialize System Control registers, PLL, WatchDog, Clocks to default state:
    // This function is found in the DSP2803x_SysCtrl.c file.
    InitSysCtrl();

    // Step 2. Select GPIO for the device or for the specific application:
    // This function is found in the DSP2803x_Gpio.c file.
    // InitGpio(); skip this as this is example selects the I/O
    // for SCI-A in this file itself
    InitSciGpio();

    // Step 3. Initialize PIE vector table:
    // The PIE vector table is initialized with pointers to shell Interrupt
    // Service Routines (ISR).  The shell routines are found in DSP2803x_DefaultIsr.c.
    // Insert user specific ISR code in the appropriate shell ISR routine in
    // the DSP28_DefaultIsr.c file.

    // Disable and clear all CPU interrupts:
    DINT;
    IER = 0x0000;
    IFR = 0x0000;

    // Initialize Pie Control Registers To Default State:
    // This function is found in the DSP2803x_PieCtrl.c file.
    // InitPieCtrl();  PIE is not used for this example

    // Initialize the PIE Vector Table To a Known State:
    // This function is found in DSP2803x_PieVect.c.
    // This function populates the PIE vector table with pointers
    // to the shell ISR functions found in DSP2803x_DefaultIsr.c.
    InitPieVectTable();

    // Enable CPU and PIE interrupts
    // This example function is found in the DSP2803x_PieCtrl.c file.
    EnableInterrupts();

    // Step 4. Initialize all the Device Peripherals to a known state:
    // Skip this for SCI tests

    // Step 5. User specific functions, Reassign vectors (optional), Enable Interrupts:
    LoopCount = 0;
    ErrorCount = 0;

    scia_fifo_init();      // Initialize the SCI FIFO
    scia_loopback_init();  // Initialize SCI for digital loop back

    // Note: Autobaud lock is not required for this example

    // Send a character starting with 0
    SendChar = 0;

    // Step 6. Send Characters forever starting with 0x00 and going through
    // 0xFF.  After sending each, check the receive buffer for the correct value
    for(;;)
    {
        scia_xmit(SendChar);
        //while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for RRDY/RXFFST =1 for 1 data available in FIFO

        // Check received character
        //ReceivedChar = SciaRegs.SCIRXBUF.bit.RXDT;
        //if(ReceivedChar != SendChar) error();

        // Move to the next character and repeat the test
        SendChar++;
        // Limit the character to 8-bits
        SendChar &= 0x00FF;
        LoopCount++;

        if(GPIO34_count++ > 60000)                  // Toggle slowly to see the LED blink
        {
            GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;  // Toggle the pin
            GPIO34_count = 0;                       // Reset the counter
        }
    }
}


// Step 7. Insert all local Interrupt Service Routines (ISRs) and functions here:
void error()
{
    ErrorCount++;
    //    __asm("     ESTOP0");  // Uncomment to stop the test here
    //    for (;;);
}

// Test 1, SCIA  DLB, 8-bit word, baud rate 0x000F, default, 1 STOP bit, no parity
void scia_loopback_init()
{
    // Note: Clocks were turned on to the SCIA peripheral
    // in the InitSysCtrl() function

    SciaRegs.SCICCR.all =0x0007;   // 1 stop bit,  No loopback
    // No parity,8 char bits,
    // async mode, idle-line protocol
    SciaRegs.SCICTL1.all =0x0003;  // enable TX, RX, internal SCICLK,
    // Disable RX ERR, SLEEP, TXWAKE
    SciaRegs.SCICTL2.all =0x0003;
    SciaRegs.SCICTL2.bit.TXINTENA =1;
    SciaRegs.SCICTL2.bit.RXBKINTENA =1;
    SciaRegs.SCIHBAUD    =0x0000;
    SciaRegs.SCILBAUD    =0x00C2;     // BaudRate 9600
    SciaRegs.SCICCR.bit.LOOPBKENA = 0; // Enable loop back
    SciaRegs.SCICTL1.all =0x0023;     // Relinquish SCI from Reset
}

// Transmit a character from the SCI
void scia_xmit(int a)
{
    SciaRegs.SCITXBUF=a;
}

// Initialize the SCI FIFO
void scia_fifo_init()
{
    SciaRegs.SCIFFTX.all=0xE040;
    SciaRegs.SCIFFRX.all=0x2044;
    SciaRegs.SCIFFCT.all=0x0;
}
//===========================================================================
// No more.
//===========================================================================


Receiver Code

#include "DSP28x_Project.h"     // Device Headerfile and Examples Include File

// Prototype statements for functions found within this file.
void scia_loopback_init(void);
void scia_fifo_init(void);
void scia_xmit(int a);
void error();
__interrupt void scia_rx_isr(void);
__interrupt void scia_tx_isr(void);

// Global counts used in this example
Uint16 LoopCount;
Uint16 ErrorCount;

void main(void)
{
    static volatile Uint16 GPIO34_count = 0;
    Uint16 SendChar;
    Uint16 ReceivedChar;

    // Step 1. Initialize System Control registers, PLL, WatchDog, Clocks to default state:
    // This function is found in the DSP2803x_SysCtrl.c file.
    InitSysCtrl();

    // Step 2. Select GPIO for the device or for the specific application:
    // This function is found in the DSP2803x_Gpio.c file.
    // InitGpio(); //skip this as this is example selects the I/O
    // for SCI-A in this file itself
    InitSciGpio();

    // Step 3. Initialize PIE vector table:
    // The PIE vector table is initialized with pointers to shell Interrupt
    // Service Routines (ISR).  The shell routines are found in DSP2803x_DefaultIsr.c.
    // Insert user specific ISR code in the appropriate shell ISR routine in
    // the DSP28_DefaultIsr.c file.

    // Disable and clear all CPU interrupts:
    DINT;
    IER = 0x0000;
    IFR = 0x0000;

    // Initialize Pie Control Registers To Default State:
    // This function is found in the DSP2803x_PieCtrl.c file.
    //InitPieCtrl();  //PIE is not used for this example

    // Initialize the PIE Vector Table To a Known State:
    // This function is found in DSP2803x_PieVect.c.
    // This function populates the PIE vector table with pointers
    // to the shell ISR functions found in DSP2803x_DefaultIsr.c.
    InitPieVectTable();

    // Enable CPU and PIE interrupts
    // This example function is found in the DSP2803x_PieCtrl.c file.
    EnableInterrupts();

    // Step 4. Initialize all the Device Peripherals to a known state:
    // Skip this for SCI tests

    // Step 5. User specific functions, Reassign vectors (optional), Enable Interrupts:
    LoopCount = 0;
    ErrorCount = 0;

    scia_fifo_init();      // Initialize the SCI FIFO
    scia_loopback_init();  // Initialize SCI for digital loop back

    // Note: Autobaud lock is not required for this example

    // Send a character starting with 0
    //SendChar = 111;

    // Step 6. Send Characters forever starting with 0x00 and going through
    // 0xFF.  After sending each, check the receive buffer for the correct value
    for(;;)
    {
        //scia_xmit(SendChar);

        //while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for RRDY/RXFFST =1 for 1 data available in FIFO

        // Check received character
        ReceivedChar = SciaRegs.SCIRXBUF.all;
        //if(ReceivedChar != SendChar) error();

        // Move to the next character and repeat the test
        //SendChar++;
        // Limit the character to 8-bits
        //SendChar &= 0x00FF;
        LoopCount++;

        if(GPIO34_count++ > 60000)                  // Toggle slowly to see the LED blink
        {
            GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;  // Toggle the pin
            GPIO34_count = 0;                       // Reset the counter
        }
    }
}


// Step 7. Insert all local Interrupt Service Routines (ISRs) and functions here:
void error()
{
    ErrorCount++;
    //    __asm("     ESTOP0");  // Uncomment to stop the test here
    //    for (;;);
}

// Test 1, SCIA  DLB, 8-bit word, baud rate 0x000F, default, 1 STOP bit, no parity
void scia_loopback_init()
{
    // Note: Clocks were turned on to the SCIA peripheral
    // in the InitSysCtrl() function

    SciaRegs.SCICCR.all =0x0007;   // 1 stop bit,  No loopback
    // No parity,8 char bits,
    // async mode, idle-line protocol
    SciaRegs.SCICTL1.all =0x0003;  // enable TX, RX, internal SCICLK,
    // Disable RX ERR, SLEEP, TXWAKE
    SciaRegs.SCICTL2.all =0x0003;
    SciaRegs.SCICTL2.bit.TXINTENA =1;
    SciaRegs.SCICTL2.bit.RXBKINTENA =1;
    SciaRegs.SCIHBAUD    =0x0000;
    SciaRegs.SCILBAUD    =0x00C2;
    SciaRegs.SCICCR.bit.LOOPBKENA = 0; // Enable loop back
    SciaRegs.SCICTL1.all =0x0023;     // Relinquish SCI from Reset
}

// Transmit a character from the SCI
void scia_xmit(int a)
{
    SciaRegs.SCITXBUF=a;
}

// Initialize the SCI FIFO
void scia_fifo_init()
{
    SciaRegs.SCIFFTX.all=0xE040;
    SciaRegs.SCIFFRX.all=0x2044;
    SciaRegs.SCIFFCT.all=0x0;
}
//===========================================================================
// No more.
//===========================================================================


Best PMIC for My design

$
0
0

Hi,

I am Looking for the best PMIC that will fit for my design. The requirements are given below:

  1. Input:
    1. 3.5V to 4.2V
    2. Typically 3.7V
  2. Output 1:
    1. Vout: 3.3V
    2. I out maximum: 0.4 mA
    3. I out normal: 0.3 mA
  3. Output 2:
    1. Vout: 1.5V
    2. I out maximum: 0.2 mA
    3. I out normal: 0.15 mA
  4. Output 3:
    1. Vout: 1.2V
    2. I out maximum: 0.5 mA
    3. I out normal: 0.4 mA

The PMIC should be as small as possible. Please help me to find the best PMIC for the above requirements.

LM5145: using two LM5145's to drive TEC/Peltier module?

$
0
0

Part Number:LM5145

Team,

we have an application where we need to drive a TEC/Peltier module for both heating and cooling (up to 7A current flowing through the module in one or another direction).

Would that be achievable with two LM5145 used as below? Each of the LM5145's would need to transition from being current source to current sink and vice-versa (controlled for instance with LM10011).

Thanks for your advice. 

Linux/AM3352: Where to fix the MAC address for the HOST and the SELF/LOCAL in the BBB ?

$
0
0

Part Number:AM3352

Tool/software: Linux

Hi,

I am trying to fix the MAC address of USB (local and host).

I found that u_ether.c is allocating a random MAC for both self and host, upon every boot.

So, I'd like to fix that to a particular HOST MAC address and SELF/LOCAL MAC address.

Something like, MAC- A1:22:33:44:55:B1 ; HOST_MAC: C1:33:22:44:55:A4

But, I couldn't get proper information on that.

Could you kindly provide some hints on that ?

P.S:  I am using USB-RNDIS, not the physical Ethernet port.

Compiler/CC2642R: interfacing I2C to cc2640 innocom

$
0
0

Part Number:CC2642R

Tool/software: TI C/C++ Compiler

we did interfacing from i2c to cc2650 and all specified sensors are working properly but i am trying to interfacing i2c to cc2640 but no sensors are specified here, can anyone help out in this problem, how would i interface the i2c to cc2640.... if u already have code also very much helpful to me
Viewing all 262198 articles
Browse latest View live


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