i am not using anything in psim. just a PWM. and trying to get it in GPIO 00.but cant see anything
↧
Forum Post: RE: C2000WARE: C2000
↧
Forum Post: RE: Linux/MSP430FR2512: EVM430 Capmini -demo current consumption drops by 2mA about 3 minutes after power on
Hello Walter, Yes. The average power consumption for LPM3 for 3 sensor should be single digit uA. In the datasheet, page 17 table 5.7 Low-Power Mode (LPM3, LPM4) Supply Currents (Into VCC) Excluding External Current, you can find the expected power consumption for different test condition and configurations. Thanks, Yiding
↧
↧
Forum Post: RE: C2000WARE: C2000
the LED keeps blinking .how can i make it stop ?
↧
Forum Post: RE: Compiler/TMS320F28377S: Generation of sinusoidal signals using the SGEN library
Thank you Sira, I raised the program as you proposed and in this way you can generate two signals of different characteristics. Thanks again Juan if(Estados_S1_S2.Fin_Gen_S1 == false) { sgen_1.calc(&sgen_1); s1[i] = sgen_1.out; i++; if(i == SIGNAL_LENGTH + 1) { i = 0; Estados_S1_S2.Fin_Gen_S1 = true; Estados_S1_S2.Fin_Gen_S2 = false; } } if(Estados_S1_S2.Fin_Gen_S2 == false) { sgen_2.calc(&sgen_2); s2[i] = sgen_2.out; i++; if(i == SIGNAL_LENGTH + 1) { i = 0; Estados_S1_S2.Fin_Gen_S2 = true; } } if(Estados_S1_S2.Fin_Gen_S1 == true && Estados_S1_S2.Fin_Gen_S2 == true) { sT[i] = s1[i] + s2[i]; sine_mains.v = 0.8*((float)sgen_1.out/(float)ganancia_adaptación); //Generación de la señal senoidal POWER_MEAS_SINE_ANALYZER_run(&sine_mains); // guiIrms=sine_mains.iRms*I_MAX_SENSE; guiVrms = sine_mains.vRms*VAC_MAX_SENSE; // guiPrms=sine_mains.pRms*VAC_MAX_SENSE*I_MAX_SENSE;
↧
Forum Post: RE: TMS320F28335: SHE PWM improved
Huang, We have a PWM Chopper, but I don't think this will work for your purpose. It has coarse frequency steps, and will occur at a fixed frequency not specifically at the switching angles as required by SHE PWM. Now if you wish to try and implement a solution I can think of two ways you may be able to do this. Setup the desired PWM period and enable/disable the GPIO buffer to turn on or off the PWM at switching angles. This should work for slower frequencies, but will be too slow after some point. Use hardware. Setup an enable that can be software or hardware controlled and will allow enabling and disabling of the PWM's signal at the required time. Hope it helps, Cody
↧
↧
Forum Post: RE: C2000WARE: C2000
Ah, sorry I thought you were using PSIM because of the following: [quote user="Tauquir iqbal"]i used psim to and ccs to run the code. [/quote] It sounds like you may have the "Blinky" example flashed into memory. This code simply toggles the on board LEDs. If that is the case you can either erase the flash, connect an emulator, or change the boot mode settings from "Boot to Flash" to anything else. If you wish to toggle GPIO0 you should start from one of the examples in C2000Ware . Maybe GPIO_toggle would be a good example to look at. Hope it helps, Cody
↧
Forum Post: RE: CCS/TMS570LS1224: SCI2 RX Signal not pulled to 0V when receiving data?
Hi QJ, thanks for your reply. The good news is that it works on the SCITX and SCIRX ports. I can send a message and get an answer back. The issue is, that it only works for slower baud rates like 115200 and 230400 baud. When I choose the desired baud rate of 921600 baud the deviation of the baud rate, generated from the TMS570LS1224 , is too high, the slave device does not give an answer anymore. (Instead of 921600 it uses 1000000 baud because this is the nearest possible value to configure in the SCI BRS register). This is a problem since I must not overstep a timing deadline in my realtime application. This is the reason why I switched over to the SCILIN port, where I have the possibility to configure a more fine grained baud rate (Bit 27-24 of the SCILIN BRS register). This is very weird, as the SCILIN RX pin is always driven high. Even if I pull it to the ground manually with an external pull-down resistor (1k). It has also no effect if I disable/enable pull control in PIO7 and or reconfigure the pull selection register in PIO8. That is what I obtained so far. Best regards ...
↧
Forum Post: RE: TMS320F28035: Double check about the Flash max erase time
Hi Daniel, Answers to your questions/concerns below: 1. Erase time varies from part to part. It is typical for a single sector erase to take up to 2s. However, it's possible to see devices with erase times below this. 2. This is possible too and will vary part to part. Can you share what time the customer reserved for flash erase (how long per sector)? With the max time being 12s per sector (for the first 100 program/erase cycles) ideally they should allocate that amount of time, or more. Best, Kevin
↧
Forum Post: RE: CCS/TMS320F28069: The default ADCINT1_ISR is triggered by no reason
Dan, I just want to double check, when disabling ADCINT1 in PIE group 1 you used EALLOW and EDIS for protected register access: asm(" EALLOW"); PieCtrlRegs.PIEIER1.bit.INTx1 = 0; asm(" EDIS"); - Ken
↧
↧
Forum Post: MSP430G2553: Looking for bootloader to update from microSD card
Part Number: MSP430G2553 I've found several threads on various sites relating to this idea. There would be a permanent bootloader that on a button push would look for a firmware update file on a microSD card, and if found, flash the contents of the file to the application portion of memory. But I haven't found a completed working example of such a bootloader. Does anyone know of one? Preferably in assembler. I found a port of the PFatFs library for Energia , and the demonstration .ino compiled ok, but was over 6K and used up most of ram. Since I would need only limited read-only FAT functionality, perhaps there might be a simpler FAT library I could use, but research indicates that supporting a file system just needs lots of code, so maybe PFatFs is as good as it gets. Anyway, I would appreciate any ideas and suggestions.
↧
Forum Post: CCS/TMS320F28377S: Changing Boot Pins via BOOTCTRL & EMU_BOOTCTRL
Part Number: TMS320F28377S Tool/software: Code Composer Studio To try and simplify this, I have a LaunchpadXL with the TMS320F28377S and CCS v8.2 connected to it running blinky_cpu01. I'm trying to move the boot pins to GPIO70 so that I can pull GPIO70 high and get a blinking LED on powerup instead of using GPIO72 & GPIO84. If there's a simpler way of doing this, let me know. With that in mind: 1) How do I configure EMU_BOOTCTRL and test this change? I cannot find any sample code for doing this. The only reference anywhere to the memory address is 6.9.1 of the datasheet. 2) How do I test that change? I found on google something about issuing a "debug restart", but this new version of CCS has "CPU Reset" and "Restart" in the toolbar. Am I supposed to pause the debugger, click "CPU Reset" then hit "Resume (F8)" to check that the light will blink only if GPIO70 is pulled high? 3) Once I settle on EMU_BOOTCTRL settings, how do I then write the BOOTCTRL register? What memory address is it? Are there multiple BOOTCTRL registers for multiple zones I need to set? Do I need to use the Flash_API library and write a program that uses that? I saw some references to an old Flash-editor plugin for CCS on this forum that can apparently do the job - does that still exist somewhere? Someone else here modified the codestart.asm file to do it, is that what I'm supposed to do? 4) I want to assign GPIO70 for both boot pins, and if that pin is high, it boots into flash, and if it's low, it won't run the code and you need to plug a debugger in to run the code from CCS. So am I correct in understanding that EMU_BOOTCTRL and BOOTCTRL should be written to 0x46460B5A? Thanks, David
↧
Forum Post: TMS320F28379D: Xbar output connections
Part Number: TMS320F28379D Hi, I am unsure as to which GPIO pins do the 8 Xbar outputs connect to. The ePWM Xbar outputs seem straightforward, they would connect to respective number ePWM module, correct? But it is not clear what the Xbar outputs connect to. For example, what GPIO pin does the XBAR3 output connect to?
↧
Forum Post: TMS320F28379D: Function used for GPIO mux setting
Part Number: TMS320F28379D In the example cmpss_asynch, the function GPIO_SetupPinMux is used to set the pin to XBAR 3. Does this function essentially access the GPAMUX1 and GPAGMUX1 registers and sets the required bits? Also, I notice that this setup is done in the main function, rather than in the initialization functions. Why is that?
↧
↧
Forum Post: Compiler/TMS320F28069M: __attribute__((ramfunc)) Problems loading functions into RAM
Part Number: TMS320F28069M Tool/software: TI C/C++ Compiler I have been working on a project that is based on the InstaSPIN projects which uses the method for putting the ISR into RAM which looks like: #pragma CODE_SECTION(somefxn, "ramfuncs") // Copy fxns from flash to ram at startup mem_copy(....) and I'm trying to move away from that to the more straight-forward approach that is talked about here: http://processors.wiki.ti.com/index.php/Placing_functions_in_RAM . I can see in my .map file, that the functions are placed in the right place, also when I run the code and use a breakpoint in the debugger, I see that my ISR is being run, and the program counter shows the right address, but for some reason a lot of things suddenly start breaking. My eQEP module stops counting, I no longer get interrupts on my SCI interface(which is being run from flash) and I can't send information out of the SCI, I use a blocking write call and it happily allows me to write to the Tx buffer but nothing ever comes out the other end. Any ideas on what's going on here?
↧
Forum Post: LAUNCHXL-F28379D: issue with IMU SCI communication with interrupts
Part Number: LAUNCHXL-F28379D Hi, I am currently using IMU9250 to get readings for Pitch via UAR with LaunchXL-F28379D . The output from this IMU is as follows: and so on.. I am able to get the output with basic sci loopback code. However, I want to use interrupts, as I need to call SCI within another protocol. When I use the following code, I get no proper output but gibberish values. What am I missing here? //########################################################################### // // FILE: Example_2837xDSci_FFDLB_int.c // // TITLE: SCI Digital Loop Back with Interrupts. // //! \addtogroup cpu01_example_list //! SCI Digital Loop Back with Interrupts (sci_loopback_interrupts) //! //! This program uses the internal loop back test mode of the peripheral. //! Other then boot mode pin configuration, no other hardware configuration //! is required. Both interrupts and the SCI FIFOs are used. //! //! A stream of data is sent and then compared to the received stream. //! The SCI-A sent data looks like this: \n //! 00 01 \n //! 01 02 \n //! 02 03 \n //! .... \n //! FE FF \n //! FF 00 \n //! etc.. \n //! The pattern is repeated forever. //! //! \b Watch \b Variables \n //! - \b sdataA - Data being sent //! - \b rdataA - Data received //! - \b rdata_pointA - Keep track of where we are in the data stream. //! This is used to check the incoming data //! // //########################################################################### // $TI Release: F2837xD Support Library v3.05.00.00 $ // $Release Date: Thu Oct 18 15:48:42 CDT 2018 $ // $Copyright: // Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/ // // 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. // $ //########################################################################### // // Included Files // #include "F28x_Project.h" // // Defines // // // Globals // Uint16 sdataA[2]; // Send data for SCI-A Uint16 rdataA[2]; // Received data for SCI-A Uint16 rdata_pointA; // Used for checking the received data // // Function Prototypes // interrupt void sciaTxFifoIsr(void); interrupt void sciaRxFifoIsr(void); void scia_fifo_init(void); void error(void); void scia_xmit(int a); void scia_msg(Uint16 *msg); // // Main // void main(void) { Uint16 i; Uint16 ReceivedChar; Uint16 *msg; // // Step 1. Initialize System Control: // PLL, WatchDog, enable Peripheral Clocks // This example function is found in the F2837xD_SysCtrl.c file. // InitSysCtrl(); // // Step 2. Initialize GPIO: // This example function is found in the F2837xD_Gpio.c file and // illustrates how to set the GPIO to it's default state. // InitGpio(); // // For this example, only init the pins for the SCI-A port. // GPIO_SetupPinMux() - Sets the GPxMUX1/2 and GPyMUX1/2 register bits // GPIO_SetupPinOptions() - Sets the direction and configuration of the GPIOS // These functions are found in the F2837xD_Gpio.c file. // // GPIO_SetupPinMux(43, GPIO_MUX_CPU1,15); GPIO_SetupPinOptions(43, GPIO_INPUT, GPIO_PUSHPULL); GPIO_SetupPinMux(42, GPIO_MUX_CPU1,15); GPIO_SetupPinOptions(42, GPIO_OUTPUT, GPIO_ASYNC); GPIO_SetupPinMux(19, GPIO_MUX_CPU1, 2); GPIO_SetupPinOptions(19, GPIO_INPUT, GPIO_PUSHPULL); GPIO_SetupPinMux(18, GPIO_MUX_CPU1, 2); GPIO_SetupPinOptions(18, GPIO_OUTPUT, GPIO_ASYNC); // // // Step 3. Clear all interrupts and initialize PIE vector table: // Disable CPU interrupts // DINT; // // Initialize 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(); // // Interrupts that are used in this example are re-mapped to // ISR functions found within this file. // EALLOW; // This is needed to write to EALLOW protected registers PieVectTable.SCIA_RX_INT = &sciaRxFifoIsr; // PieVectTable.SCIA_TX_INT = &sciaTxFifoIsr; EDIS; // This is needed to disable write to EALLOW protected registers // // Step 4. Initialize the Device Peripherals: // scia_fifo_init(); // Init SCI-A // // Step 5. User specific code, enable interrupts: // // Init send data. After each transmission this data // will be updated for the next transmission // *msg =(char)ScibRegs.SCIRXBUF.all; scia_msg(msg); // // Enable interrupts required for this example // PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block PieCtrlRegs.PIEIER9.bit.INTx1 = 1; // PIE Group 9, INT1 PieCtrlRegs.PIEIER9.bit.INTx2 = 1; // PIE Group 9, INT2 IER = 0x100; // Enable CPU INT EINT; // // Step 6. IDLE loop. Just sit and loop forever (optional): // // for(;;); } // // error - Function to halt debugger on error // void error(void) { asm(" ESTOP0"); // Test failed!! Stop! for (;;); } // // scia_xmit - Transmit a character from the SCI // void scia_xmit(int a) { while (SciaRegs.SCIFFTX.bit.TXFFST != 0) {} SciaRegs.SCITXBUF.all =a; } // // scia_msg - Transmit message via SCIA // void scia_msg(Uint16 * msg) { int i; i = 0; while(msg[i] != '\n') { scia_xmit(msg[i]); i++; } } // // sciaTxFifoIsr - SCIA Transmit FIFO ISR // /*interrupt void sciaTxFifoIsr(void) { Uint16 i; for(i=0; i< 2; i++) { SciaRegs.SCITXBUF.all=sdataA[i]; // Send data } SciaRegs.SCIFFTX.bit.TXFFINTCLR=1; // Clear SCI Interrupt flag PieCtrlRegs.PIEACK.all|=0x100; // Issue PIE ACK }*/ // // sciaRxFifoIsr - SCIA Receive FIFO ISR // interrupt void sciaRxFifoIsr(void) { Uint16 i; i=SciaRegs.SCIRXBUF.all; // Read data scia_xmit(i); SciaRegs.SCIFFRX.bit.RXFFOVRCLR=1; // Clear Overflow flag SciaRegs.SCIFFRX.bit.RXFFINTCLR=1; // Clear Interrupt flag PieCtrlRegs.PIEACK.all|=0x100; // Issue PIE ack } // // scia_fifo_init - Configure SCIA FIFO // void scia_fifo_init() { 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.bit.TXINTENA = 1; SciaRegs.SCICTL2.bit.RXBKINTENA = 1; SciaRegs.SCIHBAUD.all =0x00; // 9600 baud @LSPCLK = 50MHz //(200 MHz SYSCLK). SciaRegs.SCILBAUD.all =0x0F; //SciaRegs.SCICCR.bit.LOOPBKENA = 1; // Enable loop back SciaRegs.SCIFFTX.all = 0xC022; SciaRegs.SCIFFRX.all = 0x0022; SciaRegs.SCIFFCT.all = 0x00; SciaRegs.SCICTL1.all = 0x0023; // Relinquish SCI from Reset SciaRegs.SCIFFTX.bit.TXFIFORESET = 1; SciaRegs.SCIFFRX.bit.RXFIFORESET = 1; ScibRegs.SCICCR.all = 0x0007; // 1 stop bit, No loopback // No parity,8 char bits, // async mode, idle-line protocol ScibRegs.SCICTL1.all = 0x0003; // enable TX, RX, internal SCICLK, // Disable RX ERR, SLEEP, TXWAKE ScibRegs.SCICTL2.all = 0x0003; ScibRegs.SCICTL2.bit.TXINTENA = 1; ScibRegs.SCICTL2.bit.RXBKINTENA = 1; ScibRegs.SCIHBAUD.all = 0x00; ScibRegs.SCILBAUD.all = 0x0F; ScibRegs.SCICTL1.all = 0x0023; // Relinquish SCI from Reset ScibRegs.SCIFFTX.all = 0xE040; ScibRegs.SCIFFRX.all = 0x2044; ScibRegs.SCIFFCT.all = 0x0; } // // End of file //
↧
Forum Post: CCS/TMS320F28379D: cannot write to sd card using f_write()
Part Number: TMS320F28379D Tool/software: Code Composer Studio I am using the sd card example code to learn the FATFS library. I am trying to make a file and write some data to it. The file contents are empty. Please find below the code : FRESULT fresult; FIL fil; char line[] = "Hello World"; fresult = f_mount(0, &g_sFatFs); if(fresult != FR_OK) { UARTprintf("f_mount error: %s\n", StringFromFresult(fresult)); return(1); } WORD bw =0; fresult = f_open(&fil, "message2.txt",FA_WRITE | FA_OPEN_EXISTING); fresult = f_write(&fil, line, (WORD)strlen(line), (void *)&bw); f_sync(&fil); f_close(&fil); I am not getting any error in any of the steps.
↧
Forum Post: CCS/LAUNCHXL-F280049C: No communication between TMS320F280049C and Code Composer
Part Number: LAUNCHXL-F280049C Tool/software: Code Composer Studio I can't communicate code composer with my microcontroller, I looked for the code composer pack and it includes the C2000. When I connect it to the PC, in connection anyone of the options can make the connection with the microcontroller
↧
↧
Forum Post: EVM430-FR6047: Trigger/gate signal when the USS TX is active
Part Number: EVM430-FR6047 Due to the damping in the material we are using in our transducers (PFA), I need at least a 12Vpp transmit signal in order to get a good SNR. (Using external amplifiers) Since the max input on the USS RX channels is 1.65V my plan is to use analog switches to cut off the signal to the inputs while the USS is transmitting the pulses. HW wise it is fairly simple to use a GPIO to control the switches but where do I place the couple of lines of code to control the selected GPIO? I am using the MSP430FR6047 _USS Water Demo project as my starting point. Thanks, Claus Knudsen
↧
Forum Post: MSP430FR6989: Log function for Energia -- Thermistor
Part Number: MSP430FR6989 I am trying the basic thermistor program using my launchpad and I am having trouble using the log() function. When I take the log() of the variable I received an error. I then used logf() of the variable and the program compiled and downloaded to the board but the value was incorrect. What am I doing wrong here? int Vo_raw; float R1 = 10000; float logR2, R_t, T, Vo_volt; float c1 = 1.12924e-03, c2 = 2.34108e-04, c3 = 0.87755e-07; void setup() { pinMode(23, INPUT); Serial.begin(9600); } void loop() { Vo_raw = analogRead(23);//V_out signal from board Vo_volt = Vo_raw * 3.3/4096; //convert from signal to volts R_t = (3.3*R1)/Vo_volt - R1 ; //voltage divider equation to determine resistance logR2 = logf(Vo_volt); //take log of voltage T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); //thermistor equation T = T - 273.15; //celsius to kelvin T = (T * 9.0)/ 5.0 + 32.0; //kelvin to F Serial.print("log(Resist): "); Serial.print(logR2); Serial.print("; Temp: "); Serial.print(T); Serial.print("; Resistance: "); Serial.print(R_t); Serial.print("; Volts: "); Serial.println(Vo_volt); delay(1000); }
↧
Forum Post: 28062F uses a fixed motor parameter. In the temperature range of 5-40 degrees Celsius, the output of large torque is abnormal.
Our company imitated drv8301 Revd to make a PCB board, using proj_lab10a.c routine for project development, currently encountered the following very serious problems, request guidance. At present, 5000 motherboards with 28062F + drv8301 have been shipped. 1. For the same set of programs, 100 motherboards are tested in the environment of 5 C. The output torque of 100 motherboards is normal, but the same motherboard and the same program are tested in the environment of 40 C. The output torque of 10 motherboards (about 10% probability of occurrence) is low. After repeated tests, the same motor parameter USER_MOTOR_Rs can't take into account the 10 motherboards. Can you solve this problem? Thanks very much! 2. For the same set of programs, Testing 10 motherboards (about 10% probability of occurrence) at 5 C can not start sometimes, but the same motherboard and the same program can start 100 motherboards in 40 C environment. After repeated testing, the same motor parameter USER_MOTOR_Rs can not take into account the 10 motherboards. Can you solve this problem? Thanks very much! The probability of the above two problems may be deviated by 10%, but there is a motor parameter USER_MOTOR_Rs which can not take into account the performance of the motor in high and low temperature environment. Our products require normal operation at high and low temperatures. At present, we can only abandon the motherboards with problems, resulting in extremely high costs, and request TI engineers to guide us.
↧