Quantcast
Viewing all 262198 articles
Browse latest View live

TMS320F28377S: Interrupts: setup

Part Number:TMS320F28377S

Hey guys,

I'm currently working on a project with the Delfino and ran into a problem when testing interrupts. I have my code set up s.t. whenever GPIO pin 17 receives the HIGH levels of a square-wave input, GPIO pin 18 (an output) is toggled from 0 to 1. Here's my code below. I was also wondering if my function generator was setup correctly for this purpose. I have 3.2 Vpp for the square wave with a 1.5 V offset and a period of 30 us. In addition, I have a 4.7k pull-down resistor before the input.

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <file.h>

#include "F28x_Project.h"     // DSP28x Headerfile
#include "ti_ascii.h"
#include "sci_io.h"
//risky

//#include "Device.h"
//#include "F2837xD_Examples.h"
//###########################################################################
// Global variables used in the project before main function. Declare other     // variables in this section of the code.
//###########################################################################

Uint16 *kittens;  //global pointer kittens
Uint16 bit = 3; //test bit initilized randomly
Uint16 bit_done_flag = 0; //flag to say that interrupt taken
//###########################################################################
// Declare the service routines and functions
//###########################################################################

interrupt void xint1_isr(void);
//interrupt void cpu_timer0_isr(void);
// interrupt void isr1(void);
// void program1(void);
// void program2(void);


//######################   Beginning of the main code #######################


//void main(void)
void main()
{


// Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
    InitSysCtrl();


// Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
       DINT;

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the F2837xD_PieCtrl.c file.
       InitPieCtrl();

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

// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table, even if the interrupt
// is not used in this example.  This is useful for debug purposes.
// The shell ISR routines are found in F2837xD_DefaultIsr.c.
// This function is found in F2837xD_PieVect.c.
       InitPieVectTable();
       // Enable global Interrupts and higher priority real-time debug events:
             // EINT;  // Enable Global interrupt INTM

              //ERTM;  // Enable Global realtime interrupt DBGM



       //###########################################################################
       // User specific code: Your code comes here.
       //###########################################################################





       EALLOW;
       PieVectTable.XINT1_INT = &xint1_isr;
       EDIS;

       EALLOW;


       GpioCtrlRegs.GPAQSEL2.bit.GPIO17=1;
       GpioCtrlRegs.GPACTRL.bit.QUALPRD2 = 200;
       //input
       GpioCtrlRegs.GPAGMUX2.bit.GPIO17 = 0;
       GpioCtrlRegs.GPAMUX2.bit.GPIO17 = 0;         // GPIO 46
       GpioCtrlRegs.GPADIR.bit.GPIO17 = 0;          // input
       //GpioCtrlRegs.GPAINV.bit.GPIO17 = 1;
       
       //output probe
       GpioCtrlRegs.GPAGMUX2.bit.GPIO18 = 0;
       GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 0;         // GPIO 46
       GpioCtrlRegs.GPADIR.bit.GPIO18 = 1;          // ouput
       GpioDataRegs.GPASET.bit.GPIO18 = 0;

       GPIO_SetupXINT1Gpio(17);


       XintRegs.XINT1CR.bit.POLARITY = 0;
       XintRegs.XINT1CR.bit.ENABLE = 1;

       PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
       PieCtrlRegs.PIEIER1.bit.INTx4 = 1;
       IER |= M_INT1;
       EDIS;
       EINT;








for(;;){

	DELAY_US(1);
	Uint16 a = GpioDataRegs.GPADAT.bit.GPIO18;
        



}


             

}







//###################### Start of functions codes #############




//#################### Interrupt Service Routines #################

//interrupt void xint1_isr(&*kittens)
//interrupt void xint1_isr()
interrupt void xint1_isr(void)
{
	EALLOW;
       *kittens = 0;
       DELAY_US(1000000);
       GpioDataRegs.GPATOGGLE.bit.GPIO18 = 1;

       /*//while(!GpioDataRegs.GPBDAT.bit.GPIO46){ //2/4 change
       while(!GpioDataRegs.GPBDAT.bit.GPIO46){
       DELAY_US(1);
       *kittens ++;
       */
    EDIS;


       bit_done_flag=1;    //a simple flag to see if interrupt triggered
       PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;

}
/*interrupt void cpu_timer0_isr(void){
       //CpuTimer0Regs.TCR.bit.TRB = 1;

       GpioDataRegs.GPBSET.bit.GPIO41 = 1;
       //DELAY_US(3000000);
       DELAY_US(1);
       GpioDataRegs.GPBCLEAR.bit.GPIO41 = 1;
       PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;


       //toggle
}
*/


BQ34Z100-G1: Using I2C, unable to write long string of data to register "0x00"

Part Number:BQ34Z100-G1

Hi,

I am using device BQ34Z100G1, and Battery Management Studio, to write a long string of data to register "0x00".

Basically I am trying to program the file .df.fs to the chip.  One of the instruction is quite long, see below:


.......
W: 16 00 02 00 00 00 EA FF 33 B1 FA 33 6C FB 33 95 FE 33 AD FE 33 FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F FF FF 3F 16 00 3F 58 CB 33 C3 00 08 11 00 00 00 00 00 FF AA 0E FB A7 0E FF A6 0E FF A1 0E FF A0 0E FE A3 0E 61 A2 0E DE FF 3A 65 FF 3A E2 FF 33 FF AF 0E

When I tried to write this using BQStudio, there is an error.  But if I shorten the data string, to about only 25, then it writes fine.

Is there anyway to partition this into smaller command?  My problem is this is not a typical I2C register write so

I can't simply partition to smaller amount, or can I?  How would I do that?

So my question: is there any limitation in the tool in term of the amount of data that be be written at any time?

Thanks,

-Andy

OPA2835: QFN vs UQFN package

Part Number:OPA2835

Quick question: is the only difference between the OPA2835IRMC and OPA2835IRUN the height of the package? They appear to have an identical footprint and pinout.

If I don't have height constraints, is there a particular reason to select one over the other? I'm a little confused why there are two P/Ns for what appears to be the same part other than height - in that case, why isn't UQFN the only package?

Thanks,

Peter Kazakoff, Starfish Medical

Compiler/TMDSHVMTRINSPIN: Cannot find user.h file to reflect on the INSTASPIN software

Part Number:TMDSHVMTRINSPIN

Tool/software: TI C/C++ Compiler

Hi there

I have recently purchased the HVKIT with the PM motor to learn motor drive. Using the instspin software i would easily run the motor. Now I have a lab IM from GE of 1 HP with the nameplate. I can figure out the parameters using the excel sheet provided in the motorware.

My question is I am unable to find the user.h file in order to change the parameters to that of the IM. Can you please let me know how to do it because the instaspin software is running the motor identification process till 50% and then it fails. So I want to define the parameters and then run the motor.

Any suggestion or help will be useful.

Regards

CC3200: SNTP_start question.

Part Number:CC3200

Hi,

I am using the function SNTP_start for syncing my time on my embedded box. My company is planning to sale millions of these boxes .

The SNTP_start is creating a background task that sync time once every 30 minutes.

The requirement is to sync the time at least one every 8 hours.

I am using two servers to sync NTP time:

 "pool.ntp.org",

"north-america.pool.ntp.org"

Question:

1.  Should I stop using the function (SNTP_stop())  immediately after it syncs the time and  run the  SNTP_start()  every 8 hours ?

or to let the background task run in the background and sync the tim/e every 30 minutes. ?

2. Is it safe that millions of applications are syncing every 30 minutes to the above NTP servers  ?

Thanks a lot,

Joseph

and then sync time every 30 minutes

TUSB2046B: need dropin replacement

Part Number:TUSB2046B

The specific part number: TUSB2046BIVFR.   I need the identical package, but the function can be different (for example USB 2.0 or USB 3.0).  Or a different manufacturer.

Thanks

TAS6424Q1EVM: EVM User's Guide (SLOU453) is not available

Part Number:TAS6424Q1EVM

I have the SW downloaded as part of the registration. No sign of the Eval board schematics or info. We are trying to look at efficiency and do some measurements. SLOU453 is no longer available on the TI site. Currently flying blind.

2nd Hi-pass filter with no phase shift

I have a need for a 2nd order hi-pass filter with a cut off frequency of 0.3 Hz (C=47u, R=11K) and have no or limited phase shift.

Can it be done?

Darren


RTOS/CC3200: An example of how to implement LPDS in my code

Part Number:CC3200

Tool/software: TI-RTOS

I have posed this question several times and have yet to get an answer.  The answer i get is look at the CC32XX Power Management Framework. That bull! It does not give one all the information how to implement LPDS in my fictional code. I have Hibernate working, but really need to be able to save variables during the sleep period. I have gone through all the examples including the ones in TIRTOS which by the way from a non experience cc3200 programmer are impossible to follow. How, who or what can help me! Give me a good example or instruction to follow. not some cure stuff that impossible to implement or follow. 

Regards

Larry.n@verizon.net

Linux: BeagleBone PRU Training - Lab 4 - Make overlay file fails

Tool/software: Linux

I am working through the PRU Training Lab 4. I have been following along with the instructions so far and have made it to Lab 4.

I added the #include "am335x-boneblack-prucape.dtsi" to the bottom of the am335x-boneblack.dts file. I am a little lost though on where I should be. Since the next command-line is a make with cross compile arguments, I am using my Linux desktop. I am working in the folder:

user@linuxpc:~/ti-processor-sdk-linux-am335x-evm-03.01.00.06/board-support/linux-4.4.19+gitAUTOINC+db0b54cdad-gdb0b54cdad/arch/arm/boot/dts

Is this the correct location? It doesn't seem to specify the path to arch/arm/boot/dts

user@linuxpc:~/ti-processor-sdk-linux-am335x-evm-03.01.00.06/board-support/linux-4.4.19+gitAUTOINC+db0b54cdad-gdb0b54cdad/arch/arm/boot/dts$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtb-am335x-boneblack.dtb
make: *** No rule to make target 'dtb-am335x-boneblack.dtb'. Stop.

I am stuck on this step.

BQ25895: PMID pin cannot supply enough power for DCP charging?

Part Number:BQ25895

Hello, I am working with BQ25895 Max Charge IC for one of our applications.The PMID pin seems to supply around 3A of current when connected to a dummy resistor load (although very noisy, any solution?) , however, when I connect PMID pin of BQ25895 to Samsung S6 phone with a BC 2.1 IC for handshake (TPS2514), the phone cannot draw max DCP power. Please advise.

Thanks

ADCPRO: is not responding

Part Number:ADCPRO

Good evening, I recently received an ADS1278 EVM PDK board and had been using ADCPro for a day or two until it stopped working on my computer today.  I have tried endless amounts of uninstalling all related files, reinstalling ADCPro, and rebooting my laptop to get this to work but whenever I try to open the software it tells me after a time that  "ADC Pro Basic is not responding". Thank you in advance for any help that you can offer - the operating system I am using is Windows 7. 

Using a Piezo Driver for a Doorbell Chime

Hi team,

We are interesting in being able to play a user selected sound inside the house when someone rings a doorbell. Would a Piezo Driver, such as the DRV2700, be good for such an application?

Regards,

Akash Patel

REF200: Newer Device?

Part Number:REF200

Hi Team,

We are looking into a 3-wire RTD signal conditioning circuit. We wanted to use something similar to the circuit below, using the REF200 for the dual excitation current sources and an instrumentation amplifier on the output. What we’re wondering is whether there are newer ICs that can be used, as it looks like the REF200 is about 17 years old. Any other recommended topologies or IC solutions are welcome.

Image may be NSFW.
Clik here to view.

Thanks,

Nabeel

TMS320C28346: About the GPIO register

Part Number:TMS320C28346

Hello.

I have two questions.

1.Is following description in the datasheet  typo?

 a. In the table 60 at the page of 78, bit 31-3 is reserved field.

 b. In the figure 59 at the page of 80, reset value of the register is x.

2.How long does latched value remain if  the GPxDAT register is written when GPIO is input mode?

  For example, How long does latched value remain when GPADAT-GPIO7 is written 0 if GPIO is configured as input and pullup?

Regards,

uchida-k


ADC32RF45EVM: Unable to program JESD204B Settings

Part Number:ADC32RF45EVM

Using the latest ADC32RFxx EVM GUI, I am able to program the LMK04828 clocks successfully (verified by scope and lock LEDs), I am able to program the ADC configuration and DDC configuration pages of the ADC32RF45, but I am unable to program the JESD204B configuration page.  I have tried using the GUI to set up the ADC32RF45, and I've also tried the configuration scripts from SBAA226.  When I attempt to change settings on the JESD204B configuration page, the settings to not take effect - checkboxes will immediately clear, and the multiframe settings box reverts to 0.  From reading around on the forums, this seems like it could be a problem with clocks or sysref.  I've attached my LMK04828 settings.(Please visit the site to view this file)

If I instead use the Quick Setup page in the EVM GUI, I am able to change settings on the JESD204B page, but it destroys my clock settings in the process.  If I go back and change clock settings, then I am unable to change settings on the JESD204B page.  What settings file is being run with the Quick Setup 'Program EVM' button?   I've tried running the scripts from Texas Instruments\ADC32RFxx EVM GUI\Configuration Files\ADC32RF45\DDC Mode\ADC32RF45_DDC_8xIQ_8821.cfg after running my clock settings, but that doesn't seem to change the behavior. 

Any suggestions about what to look at would be much appreciated.  Thank you!

-Brian

N2HET example using multiple IO pins

I am using the TMS520LS3137 Hercules part (note that part-number did not work in the part-number-field above); I have a single-IO-pin N2HET application running based somewhat on the sine-wave demo, but I cannot figure out how this simple control loop can be extended to multiple IO pins (like 3 motor-phases). 

Do you have an example application that manipulates multiple IO pins? I thought the CNT/ECMP pairs might be extended to each IO pin, but CNT increments the counter value each execution (so there cannot be a second CNT instruction for the second ECMP instruction). Then I thought just a second ECMP instruction to manipulate the second IO pin, but the Z flag only stays active for 1 cycle, so the second ECMP would not be able to act on the CNT (Z=1) action. So what does an application look like that requires 3 different pins to be set to 3 different values?

Thanks,

Jim

TMS320F28069M: Regulate Iq to USER_MOTOR_MAX_CURRENT in Lab11e when in hall sensor startup mode and Iq reaches USER_MOTOR_MAX_CURRENT

Part Number:TMS320F28069M

In Lab05f, when Iq reaches the value defined by USER_MOTOR_MAX_CURRENT, the controller will begin to regulate Iq to be equal to USER_MOTOR_MAX_CURRENT no matter what speed reference is selected. What changes would need to be made to Lab11e so that when operating in in the hall sensor startup mode that the controller will also regulate Iq to not exceed USER_MOTOR_MAX_CURRENT?

TMS320F28379D: Using Matlab Simulink to run serial communication

Part Number:TMS320F28379D

Hi,

I'm kind of new to this forum. I'm trying to run the TMDSDOCK28379D development kit to establish a serial communication. I have to use Simulink to make it work. I just tried to run the board with a very very simple code, pull up a digital output, and I was successful. Now, I need to design a serial communication (RS422) but I can't find the proper block (SPI or SCI) in Simulink. Can you please help me out on this matter?

Thanks,

Kash

BOOSTXL-DRV8301: Feeding power to development board

Hi,

I have bought a LAUNCHXL-F28069M and a BOOSTXL-DRV8301. I intend to use them for controlling a BLDC motor (small motor like the ones used for drones).

After I checked BOOSTXL-DRV8301 specifications, I saw that it supports 6 to 24 V and up to 10 A.

How do you recommend to feed the power to the development board?

After I checked on net, I saw that there two ways to obtain 24 V: batteries(alkaline, NiMh, LiPo, lead acid) and power supplies(SMPS).

I tend to use SMPS because I am not familiar with batteries(the way how they and their chargers should be used). I found some local sites which sell such devices with the following characteristics: 24 V & 13 A.

Do you consider there will be a problem if I will use SMPS?

Thank you. 

Viewing all 262198 articles
Browse latest View live


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