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

How to Get 180 degree phase shift between two pwm pulses in MSP430G2553

$
0
0

hi i amusing MSP430G2553 to generate pulses for Interleaved boost converter which requires 180 degree phase shift between to pulses .so can you help me it this? 


TM4123GH6PGE USB device not recognized

$
0
0

Hello,

 

I have been developing a USB bulk device application for the TM4123GH6PGE.  I have been using the LM4F232H5QD Evaluation board and we have recently had a prototype board made for our device using the TM4123GH6PGE.  The problem is that when I run the application on the prototype, windows does not recognize the USB device and creates an unknown device with error code 43.

 

When I look at the properties of the device in windows, the hardware and vendor ids are both zero.  I do know that when the bootloader runs the DFU device does appear correctly in windows and flash programming can be completed without issue.  If my device attempts to switch to DFU mode, that does not work either and the same unknown device appears in windows.  I can get the DFU device to be recognized by windows by erasing flash which forces the bootloader to run.

 

The main difference in the hardware for our design is we are using the standard USB cable with a 6-pin B side, as opposed to the micro-B connector used on the eval board.  The connector has no direct connection to PB0 USB0ID because we are not attempting to use OTG mode, and the documentation implies that when set as a device, this pin can be left floating.  Pins 4,  5, and 6 are grounded, pin 1 is connected directly to VBUS, pin2 to USB0DM, and pin3 to USB0DP.

 

I am having difficulty determining why I cannot run the same code that runs on the eval board on the prototype board.  I believe the design of the board is correct because the DFU device works exactly as it should when started by the bootloader.  Any help would be greatly appreciated. 

 

Jon

 

Need info on ".rawTI" and "yuvTI" formats

$
0
0

In the process of tuning DM365-IPNC, we need to generate/load images files of the above format.

I would like to know the format of those raw image files so I can do modification of those images for customized tuning.

For example, the tool only comes with "gray-720P-LSC.rawTI", but I would like to use different resolutions of the same image, such as SVGA or even 1080p.

Are there tools available to produce those images? or Can I have the info so I can do so by myself?

Thanks.

Edward

TPS22967 TINA MACRO MODEL

$
0
0

Is there or will there be available a Tina Macro-model for the TPS22967 Single, channel, Ultra-low Resistance Load Switch?

Help making DRV8412 - 2xDC_motor have simultaneous voltage & current control

$
0
0

Hello all,

I've been playing around with  the DRV8412-C2-Kit for the last year, using it to produce and demonstrate patterns of pulsing motor control, done though Voltage control using a self edited 2xDC_motor project.

I have however been requested to provide demonstrations of patterns on a new product in development that has a motor that is not behaving..

When I run using my normal voltage control and set Vref to 3volts (the motors requirement) It draws current at an ever increasing rate until the board errors and stops it.

When I try to run using current control the board outputs its usual 24 volts which is not an option.


Is there a way to tweak build mode 4 of 2xDC motors project to allow both voltage and currents to be specified exactly at the same time (for example 3volts supplied at 500mA's)  ?

I do not require ramp up, or even feedback due to the nature of the product.. only a way to make sure the voltage and current are supplied at rates I control.

Many Thanks,

Pulse Train Generation using TimerA MSP430G2553

$
0
0

Hello,
My ultimate goal is to generate a finite series of 20µs pulses at a frequency of 1kHz, but I am having trouble generating the necessary pulse width. My preliminary attempts have been with pulses spaced 50µs apart, and attempting 20µs pulse width. Once I have this working properly, I believe I can easily add the pulse counting and adjust the frequency/duty cycle.

I am using a MSP430G2553 and have been referencing the Datasheet and MSP430x2xx User Guide. From the Datasheet (p43) I am trying to output my signal on P1.1 so I am setting P1DIR.1 = 1, P1SEL.1 = 1, and P1SEL2.1 = 0. I believe this is all correct because I am getting a signal on P1.1 that behaves somewhat as expected.

My project is based on p372 of the User Guide. I am trying to user Timer A in Up mode to raise the pin high after counting up to TACCR1 and then resetting the pin when reaching TACCR0. For this I am using Output Mode 3 (Set/Reset). To make things easier to see on a oscilloscope, I have been setting TACCR0 = 50 and TACCR1 = 30. If I understand the diagram, when the clock is started it will count to TACCR1 (30), set the pin high, continue counting to TACCR0 (50), then reset the pin. This should result in a pulse width of 20 counts (equivalent to µs for my clock settings). While I am seeing a 50µs period, the pulse width is only 1µs (1 clock cycle). Additionally, changing the value of TACCR1 does not affect the output in any way. This is leading me to believe that I have forgotten to enable something.

My code and scope capture of the output is below. Any help is much appreciated.


#include <msp430g2553.h>

#define TIMER_OUT BIT1

int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;	// Stop watchdog timer

    P1DIR |= TIMER_OUT; // set P1.1 to output direction
    P1SEL |= TIMER_OUT; // set P1.1 function to TA0.0
    TACCTL0 |= OUTMOD_3; // set output mode to Set/reset
    TACCTL1 |= OUTMOD_3; // set output mode to Set/reset
    TACCR0 = 50; // (µs)
    TACCR1 = 30; // (µs)

    TACTL = TASSEL_2 + MC_1; // set Timer_A source to SMCLK and start timer in UP mode

    _BIS_SR(CPUOFF);
}

Best,
Anthony

WL18xx Temp Range

$
0
0

Can someone from TI please clarify something from the datasheet.

http://www.ti.com/lit/ds/symlink/wl1831mod.pdf

Table4.2 (Abs Max) shows the  "Operating ambient temperature range" at -20 to +70

Yet in the recommended operating Table4.3  states the "Ambient operating temperature" is  -40 to +85.

What is the Operating Temp of the module?

Heat sink suggestions for DualCool MOSFET

$
0
0

Hi - 

I am designing a test board and will be using the CSD16321Q5C DualCool MOSFET (or something similar) as a switch for a particular test.  The current draw during this test will be anywhere from 5A - 30A (for a short period of time) @3V .

Any recommendations for heatsinks on this package?

 

Thanks!


Are ADS1118's inputs tolerant to signals above VDD?

$
0
0

Hi,

I would like to feed an ADS1118 with 3.3V and interface it  with 5V device. What is not clear from the datasheet if the input pins are tolerant  to any voltage above VDD.  Is this setup dangerous for the chip? Or I need a level shift?

Regards, Dmitri.

Error with RTS Library on K2H Cortex-A15

$
0
0

I'm attempting to run some code on the Keystone II ARM processor and am running into an issue with the RTS library.  Since CCS 5.5 doesn't seem to support the Cortex-A15 yet I'm compiling for a Cortex-A8 since they are both ARMv7 and I assume are ISA compatible.  A basic test program compiled and ran correctly but when I added Floating Point multiplication and debugged the processor hangs.  Below is the disassembled code and where the issue occurs.

With rtsv7A8_A_le_eabi.lib:

...
...
...
          __aeabi_fmul:
800863a0:   3F56A7AD SWICC           #5679021
800863a4:   3F30C562 SWICC           #3196258
800863a8:   3DABE158 STCCC           P1, C14, [R11, #352]!
800863ac:   3F14D92A SWICC           #1366314
800863b0:   3E018103 CDPCC           P1, #0, C8, C1, C3, #0
800863b4:   3F77CBF0 SWICC           #7850992
800863b8:   E1B03C23 MOVS            R3, R3, LSR #24
800863bc:   13822102 ORRNE           R2, R2, #-2147483648
800863c0:   03A00000 MOVEQ           R0, #0
800863c4:   08BD807C LDMEQFD         R13!, {R2, R3, R4, R5, R6, PC}
800863c8:   E35300FF CMP             R3, #255
...
...
...

After the first line (SWICC), the code jumps to address 0x00000048,

...

E59FF098 LDR             PC, 0xE8

...

And ends up catching at some execution line and hanging.

MSP430F47197 flash goes crazy!

$
0
0

I have the following code:

#include <msp430f47197.h>
#include <stdbool.h>

bool flag = true;
unsigned short read_flash (unsigned short address);
void erase_flash(unsigned short address);
void write_flash (char value,unsigned short address);

 const char numbers[]={0x7D,0x05,0x3E,0x7A,0x63,0x5B,0x5F,0x70,0x7F,0x7B};

int main(void)
{
  
  volatile unsigned int i;
  WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer

  FLL_CTL0 |= XCAP11PF;                     // Configure load caps

  // Wait for xtal to stabilize
  do
  {
    IFG1 &= ~OFIFG;                         // Clear OSCFault flag
    for (i = 0x47FF; i > 0; i--);           // Time for flag to set
  }
  while ((IFG1 & OFIFG));                   // OSCFault flag still set?
  
  P5SEL =BIT1+BIT2+BIT3+BIT4;               // Set COM pins for LCD
  LCDACTL = LCDON+LCD4MUX;                  // 4mux LCD, ACLK/32
  LCDAPCTL0 = 0x7F;                         // Segments 0-24
  for( i = 1; i <= 20; i ++)
  {
    LCDMEM[i] = 0;                          // Clear LCD  We have 20 LCDMemory 
  }

 

  
  P5SEL =BIT1+BIT2+BIT3+BIT4;               // Set COM pins for LCD
  LCDACTL = LCDON+LCD4MUX;                  // 4mux LCD, ACLK/32
  LCDAPCTL0 = 0xF6;                         // Segments 0-24
  
    erase_flash(0x0ffB1);  // erasing the flash 
 //  write_flash(0x67,0x0ffc0);  // Writing 'H'
       
       
       
       for (i =0; i <= 9 ; i++)
       {
         
         LCDMEM[4] =  numbers[i]; 
           write_flash(numbers[i],0x0ffB1);
            read_flash(0x0ffB1); 
           __delay_cycles(1000000);
       }
       
       
       
   
  
}



void erase_flash(unsigned short address)
{
     char *Flash_ptr;                          
     Flash_ptr = (char*) address;             
     FCTL1 = FWKEY + ERASE;                  
     FCTL3 = FWKEY;
     *Flash_ptr = 0;
     FCTL3 = FWKEY +  LOCK;
}
void write_flash (char value,unsigned short address)
{
  char *Flash_ptr;                        
  Flash_ptr = (char*) address;            
  FCTL1 = FWKEY + ERASE;                  
  FCTL3 = FWKEY;                          
  FCTL1 = FWKEY + WRT;                      
  *Flash_ptr = value;
  FCTL1 = FWKEY;                           
  FCTL3 = FWKEY +  LOCK;                    
}

unsigned short read_flash (unsigned short address)
{
  char value;
  char *Flash_ptr;
  Flash_ptr = (char*) address;             
  value = *Flash_ptr;
  LCDMEM[2] = value  ;
  return (value);
}

It counts 0 to 9 .... on one cell of the LCD and on the other it shows the flash memory's content which is as the same as count-up cell.

The LCD shows like this:

            flash           ram

1 sec :    0                0

2 sec:     1                1

3 sec:    (dummy)     2

4 sec:                       3

5 sec:                       4

                         ...

Why the flash goes crazy from 2 on?!!!

MSP430F47197 and Supply voltage monitoring/Supervisor

$
0
0

I am just wondering if by any chance anyone has worked on SVS/SVM circuitry of MSP430F47197 and possibility of saving data somewhere in 120K flash and restore it on LCD?

Thank you in advance!

Erratic motor behaviour after upgrading to Motorware 11.

$
0
0

I decided to upgrade my test project from motorware 09 to 11 and add FPU support also. My original project is based on Lab05d and motorware 09. Motor identification is success every time and the resulting tuning is quite good. The id process itself is smooth.Here are the results of the motor tuning using my original app with motorware 9:

I decided to give a try to FPU unit as well as to upgrade to the latest motorware 11 and per Chris suggestion I used as a skeleton an FPU ready project. I used Lab04a from motorware 11. The resulting code behaves very differently. Identification process fails to calculate successfully  Ls every time and results are different every time. Rs is too far away from the original value. Motor operation is far away from smooth.

Here is the results using motorware 11 and FPU :

User.h files are identical and they have only the necessary modifications. Here is my original code and the user.h file :

(Please visit the site to view this file)

(Please visit the site to view this file)

and here is the modified motorware 11 code:

(Please visit the site to view this file)

(Please visit the site to view this file)

Maybe I am missing something.  Any ideas about this ?

Thanks in advance.

Using Tiva Launchpad in Satellites

$
0
0

Hi,

I am a student working in a satellite project. My work mainly deals with Tiva C series micro controller. I have recently made a PCB for TM4C123GH6PGE controller. I made it work with many difficulties(Thanks a lot for the help given by e2e forum.Special thanks to Amit Ashara). I have few questions for TI

1)Is there any chance we could use launchpads directly in the satellites(Launchpad with TM4C123GH6PM also satisfies our requirements) ?

2) Can you provide Schematics and board files(Eagle would be a better option.If not in any other format) for launchpad. I did not find any in the website. We need this to figure out the possible places to drill a hole on the launchpad (a structural requirement in our project).

3) What is the PCB material used to make the launchpad. What is the temperature it can go upto?

Thanks in advance

Adding 16-bit UUIDs to advertising packet.

$
0
0

Hi All,

I've had issues on Android in retrieving the list of services on LE devices (not all, just some phones I've tested), and I've been looking at a method that allows the scanning of only devices that have a specific UUID in the advertising packet. I am not 100% sure how to implement it in the Bluetopia 1.4 stack.

I can see in AdvertiseLE where the HCI_LE_ADVERTISING_FLAGS_GENERAL_DISCOVERABLE_MODE_FLAGS_BIT_MASK is set.

If I was to add a 16-bit UUID to the list -> HCI_LE_ADVERTISING_REPORT_DATA_TYPE_16_BIT_SERVICE_UUID_COMPLETE or HCI_LE_ADVERTISING_REPORT_DATA_TYPE_16_BIT_SERVICE_UUID_PARTIAL

And i'm not sure how the UUID would be formatted, would it be possible to provide an example for the Device Information service?

I'm assuming it would be something like:

Advertisement_Data_Buffer.AdvertisingData.Advertising_Data[3] = HCI_LE_ADVERTISING_REPORT_DATA_TYPE_16_BIT_SERVICE_UUID_COMPLETE;

Advertisement_Data_Buffer.AdvertisingData.Advertising_Data[4] = 0x18;

Advertisement_Data_Buffer.AdvertisingData.Advertising_Data[5] = 0x0A;

Cheers.


INA220 / measure the AC current

$
0
0
Hello,
 
Our customer use INA220 for measurement the AC current of +/- 10mA.
I beieve that , we can use INA220 for measurement the AC current.
But please kindly let me know as following.
 
(1)
Please see the attached file as schematics idea.
If there are any concern please let me know.
 
(2)
If there are any recommend device without INA220, please let me know.
 
Best regards,
Ryuji Asaka
 
 

robust task switching

$
0
0

Hello!

I have two algorithms, and I wan to only run one of them at a time.  So, I've created two tasks (one for each algorithm).

There is also a third task I have created, to act as a "middle man", or a "switch".  This third task has the highest priority (5), and my other two tasks have low priority (-1) such that they only run when I directly tell them to.

This solution has been working quite well for me, until today.  I have two CCS projects, both nearly identical, except for some differences in the algorithms themselves.  Somehow one project works and the other does not work.

The broken output I see is this (sequentially):

  • First, the high priority "middle man" task starts.  It waits to be told what to do by checking a certain DDR value.
  • When that DDR value is triggered, the "middle man" task tells the appropriate other task to change his priority from -1 to +7. I use   Task_setPri(tsk0, 7)
  • I assume that now, tsk0 would have the highest priority (7), and would run my proprietary algorithm to completion.  Instead, however, it only computes the first line of code in my tsk0 function (which happens to be a printf statement I added to aid humans in debug).
  • Next, it immediately goes back to the start of my "middle man" task, starting over at the beginning.

What I also do not understand is that, at first, ROV did not show the priority changing on my tsk0.  I set a breakpoint on the "Task_setPri()" line, and after stepping over that line the task priority did not change in ROV.  So, at least with this it made sense why only my "middle man" task ran... because it was the highest priority!

So:  Since this made me doubt the Task_setPri(), I also experimented with setting all tasks to -1 priority in my .cfg file.  Then in main(), just immediately before BIOS_start(), I set the priority of my "middle man" task to 5.  This works, I see the desired result in ROV!  (tsk0 priority = 7, middle man priority = 5, & other algorithm priority = -1).

However - I still have the same problem that it does not stay in tsk0 (priority 7).  I see in ROV that tsk0 is priority 7, and my "middle man" task is priority 5.  This is exactly what it should be, but still my code never executes tsk0 past the first line (the printf statement).

How is it possible that SYSBIOS is switching back and forth between two tasks, when by definition only one task can run at a time - the task with the highest priority?

An alternate solution:

What if, instead of having three tasks, I had just one SYSBIOS task (with a larger stack, of course) and switched my two algorithms via regular function calls?  i.e.

Void task000()
{
   
 while(1) {
volatile int *x = (volatile int *)0x80000000; //DDR variable if(x == 0) do_alg1(); else if (x == 1) do_alg2(); } }

Thank you for sharing your thoughts with me!

 

[EDIT]   I also tried changing my tsk0 priority to 5, via Task_setPri(), when I want it to run.  Then, since both my "middle man" task and tsk0 will both be priority 5, I told the "middle man" task to yield via Task_yield().  Unfortunately - it just hung and did nothing; I expected that tsk0 would run because the "middle man" task was yielding to it.  I've attached a screenshot of my debug view to show this and another curious result - the ROV which shows that all of my task Stacks are maxed.  This is quite odd, because none of them have done anything yet except sit around and wait to be told to start!  :)

How to do a UART firmware update go through ethernet

$
0
0

Hi all,

MCU: Stellaris LM3S9B96

IDE: CCS v5.5

TI RTOS 1.1.0.25

I have two board, one is main control board, another one is comm board. The main control board connects to the PC and is the only board connect to the PC via ethernet. the comm board connect to the main control board via UART serial.

I can update the firmware of main control board using ethernet update by LM flash programmer. However, the comm board can only use UART update. It means I have to use main control board as a bridge to send data between LM and comm board. 

Is there any idea how to implement UART update firmware between comm board and PC. 

Thanks

bq24618 External FET

$
0
0

Hi

The external FET CDS17317 is written in the Figure 2 of datasheet.
Is this a mistake in CSD17307 or CSD1731x ?

PAN-M

Limitations on USER_IQ_FULL_SCALE_VOLTAGE_V

$
0
0

Hi Chris,

As per our discussion in another thread, I've decided to open this thread as I see that the limitations on USER_IQ_FULL_SCALE_VOLTAGE_V are crucial.

Gathering information, I came up with 3 conditions (min/max) for USER_IQ_FULL_SCALE_VOLTAGE_V.

I made a small matlab script to calculate for each condition, to see that there are no conflicts (it has copy/paste from The UG and one of the threads) . conditions are written in UPPERCASE:


% //! \brief Defines full scale value for the IQ30 variable of Voltage
% inside the system //! \brief All voltages are converted into (pu) based
% on the ratio to this value //! \brief WARNING: this value MUST meet the
% following condition:
%
% CONDITION 1:
% USER_IQ_FULL_SCALE_VOLTAGE_V > 0.5 * USER_MOTOR_MAX_CURRENT * USER_MOTOR_Ls_d * USER_VOLTAGE_FILTER_POLE_rps,
%
% //! \brief WARNING: otherwise the value can saturate and roll-over,
% causing an inaccurate value //! \brief WARNING: this value is OFTEN
% greater than the maximum measured ADC value, especially with high Bemf
% motors operating at higher than rated speeds //! \brief WARNING: if you
% know the value of your Bemf constant, and you know you are operating at a
% multiple speed due to field weakening, be sure to set this value higher
% than the expected Bemf voltage //! \brief It is recommended to start with
% a value ~3x greater than the USER_ADC_FULL_SCALE_VOLTAGE_V and increase
% to 4-5x if scenarios where a Bemf calculation may exceed these limits //!
% \brief This value is also used to calculate the minimum flux value:
% Min_Flux = USER_IQ_FULL_SCALE_VOLTAGE_V/USER_EST_FREQ_Hz/0.7
%
% CONDITION 2:
% USER_IQ_FULL_SCALE_VOLTAGE_V < USER_MOTOR_FLUX_VpHz*USER_EST_FREQ_Hz*0.7
%

% Further more, USER_IQ_FULL_SCALE_VOLTAGE_V should be greater than...
%
% Condition 3:
% USER_IQ_FULL_SCALE_VOLTAGE_V > USER_MOTOR_FLUX_VpHz * USER_IQ_FULL_SCALE_FREQ_Hz

USER_IQ_FULL_SCALE_FREQ_Hz = 1400; // support min of 60kRPM electrical frequency
USER_EST_FREQ_Hz = 15e3; // PWM set to 30kHz
USER_MOTOR_FLUX_VpHz = 0.03; // support 28V/1400Hz
USER_VOLTAGE_FILTER_POLE_Hz=335.648;
USER_MOTOR_MAX_CURRENT = 15; USER_MOTOR_Ls_d=25e-6;
USER_VOLTAGE_FILTER_POLE_rps=2*pi*USER_VOLTAGE_FILTER_POLE_Hz;

% Condition 1:
Min_V_allowed1 = 0.5 * USER_MOTOR_MAX_CURRENT * USER_MOTOR_Ls_d * USER_VOLTAGE_FILTER_POLE_rps

% Condition 2:
Max_V_needed_To_detect_Flux = USER_MOTOR_FLUX_VpHz*USER_EST_FREQ_Hz*0.7


% Condition 3:
Min_V_allowed2 = USER_MOTOR_FLUX_VpHz * USER_IQ_FULL_SCALE_FREQ_Hz

With my parameters (calculated by hand, not ID), I got

Min_V_allowed1 =  0.553596377770856

Min_V_allowed2 =  42

Max_V_needed_To_detect_Flux = 315

So there is no conflict, and setting 42 < USER_IQ_FULL_SCALE_VOLTAGE_V < 315

Will yield good results.

What do you think ?

Thanks

Viewing all 262198 articles
Browse latest View live


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