Jump to content
  1. News

    1. Announcements

      Blog and Forum announcements.

      1,362
      posts
    2. Suggestions

      Have a suggestion? We are all ears.

      1,264
      posts
    3. New users say Hi!

      New here? Welcome! Introduce yourself here.

      2,681
      posts
  2. Spotlight!

    1. Sponsor Spotlight

      Our sponsors not only help support our community, they also offer amazing deals to our members. Check this forum often for all the specials, deals and announcements.

      91
      posts
    2. Sponsor Giveaways

      This forum section is for current and past Sponsor Giveaways!

      109
      posts
  3. Energia

    1. Energia - MSP

      Energia is a fork of Arduino for the Texas Instruments MSP430 and MSP432 Microcontrollers. Feel free to ask any questions related to it and the developers will get back to you.

      11,082
      posts
    2. Energia - TivaC/CC3XXX

      Support for Energia on Tiva and CCC3XXX ARM Microcontrollers.

      2,892
      posts
    3. Energia - C2000

      Support for Energia on C2000 Microcontrollers.

      102
      posts
    4. 2,024
      posts
  4. MSP Technical Forums

    1. General

      General discussion about the MSP430 and MSP432. Beginners, feel free to ask your questions here.

      17,050
      posts
    2. Compilers and IDEs

      Questions about setup, compilation and errors including all open source and commercial compilers and IDEs

      2,372
      posts
    3. Development Kits

      Have a question about a particular development kit? Ask it here.

      1,579
      posts
    4. Programmers and Debuggers

      Questions about available programmers and debuggers.

      963
      posts
    5. Code vault

      Share your snippets here. You may also post any interesting code you find on the web here.

      2,609
      posts
    6. Projects

      Have an interesting project to share. Show it off here!

      8,034
      posts
    7. Booster Packs

      Member contributed and commercially available booster packs.

      3,874
      posts
    8. Energia   (70,548 visits to this link)

      Energia is a fork of Arduino for the Texas Instruments MSP430, MSP432, TivaC, CC3XXX and C2000 microcontrollers. Feel free to ask any questions related to it and the developers will get back to you.

  5. Tiva-C, Hercules, CCXXXX ARM Technical Forums

    1. General

      General discussion about the TI's Tiva-C, Hercules and CCXXXX ARM cores. Beginners, feel free to ask your questions here.

      3,098
      posts
    2. SensorTag

      Share your BLE and Wi-Fi Sensortag Projects and ask questions here.

      88
      posts
    3. Tiva-C, Hercules, CC3XXX Launchpad Booster Packs

      Designed any new plugin modules for your Tiva-C, Hercules or CCXXXX Launchpad? post them here. If you find any commercially available BoosterPacks, post them too.

      476
      posts
    4. Code Vault

      Share your ARM code snippets in this forum. You may also post any interesting code you find on the web here.

      537
      posts
    5. Projects

      Have an interesting Tiva-C or CCXXXX ARM project to share. Feel free to share it here and make this place your project journal. Upload pics and make daily updates in your own project thread.

      778
      posts
    6. Compilers and IDEs

      Ask questions related to TI Tiva-C or CCXXXX ARM compilers such as ARM-GCC, Code Composer Studio, Code-Sourcery etc and IDE's including Eclipse and Atollic.

      468
      posts
    7. Development Kits and Custom Boards

      Designed any new plugin modules for your Tiva-C or CCXXXX ARM? post them here. Discuss any freshly released development kits.

      171
      posts
  6. Beagle ARM Cortex A8 Technical Forums

    1. General

      General discussion about the Beagle board/bone and the ARM Cortex A8. Beginners, feel free to ask your questions here.

      495
      posts
    2. Code Snippets and Scripts

      Share your snippets and scripts here. You may also post any interesting code you find on the web, with credit.

      99
      posts
    3. Cases, Capes and Plugin Boards

      Feel free to ask the community about extensions, plugins and capes here. Get feedback and build new designs.

      175
      posts
    4. Projects

      Have an interesting project to share. Show it off here!

      208
      posts
  7. General Electronics Forum

    1. General Electronics

      A forum for all general electronic discussion including analog, software and PCB design. Feel free to talk and ask questions about algorithms, circuits, enclosures - anything related to electronics.

      4,057
      posts
    2. Other Microcontrollers

      Have questions on another microcontroller? Ask it here. Feel free to discuss and talk about other controllers including Atmel, Microchip, AVR, C2000, Piccolo and others.

      1,681
      posts
  8. Connect

    1. Embedded Systems/Test Equipment Deals

      Post all deals relating to embedded systems, test equipment here.

      2,356
      posts
    2. Buy, Trade and Sell

      Use this forum to trade, give away or sell your stuff. try to swap your ARM boards with one another!

      2,387
      posts
    3. The 43oh Store

      Get "The 43oh Store" releases here. Also open to suggestions for new products. Get deals here first before it is made public on the Blog.

      178
      posts
    4. 228
      posts
    5. Fireside Chat

      Discuss anything unrelated here - News, Technology or your Musings.

      2,619
      posts
  9. C2000 Technical Forums

    1. General

      General discussion about the C2000. Beginners, feel free to ask your questions here.

      539
      posts
    2. Development Kits

      Have a question about a particular development kit? Ask it here. Includes Delfino, Piccolo control cards and motion control kits. Feel free to discuss any other C2000 kits too.

      153
      posts
    3. Code Vault

      Share your snippets here. You may also post any interesting code you find on the web here.

      56
      posts
    4. Projects

      Have an interesting project to share. Show it off here!

      33
      posts
    5. BoosterPacks

      Member contributed and commercially available booster packs. Post your designs here and get feedback.

      52
      posts
  • Forum Statistics

    • Total Topics
      10,470
    • Total Posts
      79,356
  • Member Statistics

    • Total Members
      76,653
    • Most Online
      1,010

    Newest Member
    sachin
    Joined
  • Latest Posts

    • No problem on my side with macOS 10.15 Catalina.
    • Same here, same error, with MSP-EXP430G2ET with the G2553 on Mojave 10.14.6. Interestingly, the old G2 board with the G2553 works, using the downloadable drivers. The G2ET works fine on my Powerbook, which is still on El Capitan 10.11. This sucks because I'd hoped to use it in a class, and we ordered the G2ET because the G2 is no longer available.
    • //########################################################################### #include "DSP2833x_Device.h" // external function prototypes extern void InitSysCtrl(void); extern void InitCpuTimers(void); // Prototype statements for functions found within this file. void Gpio_select(void); void Setup_HS1(void); void Setup_HS2(void); void Setup_HS3(void); void Setup_HS4(void); void Setup_HS5(void); void Setup_HS6(void); // Global Variables int Hall_1_result, Hall_2_result, Hall_3_result, Hall_State, x=0 , P_State=0; #define Hall_1 GpioDataRegs.GPADAT.bit.GPIO24 #define Hall_2 GpioDataRegs.GPADAT.bit.GPIO25 #define Hall_3 GpioDataRegs.GPADAT.bit.GPIO26 //########################################################################### // main code //########################################################################### void main(void) { InitSysCtrl(); // Basic Core Init from DSP2833x_SysCtrl.c Gpio_select(); while(1) { if(Hall_1 ==1) //eCAP1_Hall1 Hall_1_result = 1; else Hall_1_result = 0; if (Hall_2 == 1) //eCAP2_Hall2 Hall_2_result = 1; else Hall_2_result = 0; if (Hall_3 == 1) //eCAP3_Hall3 Hall_3_result = 1; else Hall_3_result = 0; Hall_State = (4*Hall_3_result) + (2*Hall_2_result) + (1*Hall_1_result); if (Hall_State >=1 && Hall_State <=6) { P_State = Hall_State; switch (Hall_State) { case 1 : { x = 1; Setup_HS1(); break; } case 2 : { x = 2; Setup_HS2(); break; } case 3 : { x = 3; Setup_HS3(); break; } case 4 : { x = 4; Setup_HS4(); break; } case 5 : { x = 5; Setup_HS5(); break; } case 6 : { x = 6; Setup_HS6(); break; } } } if (Hall_State == 0 || Hall_State == 7) { EPwm1Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM1A(S1) EPwm1Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM1B(S4) EPwm2Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM2A(S3) EPwm2Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM2B(S6) EPwm3Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM3A(S5) EPwm3Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM3B(S2) } } // end of infinite loop } // end of main void Gpio_select(void) { EALLOW; GpioCtrlRegs.GPAMUX1.all = 0; // GPIO15 ... GPIO0 = General Puropse I/O GpioCtrlRegs.GPAMUX2.all = 0; // GPIO31 ... GPIO16 = General Purpose I/O GpioCtrlRegs.GPBMUX1.all = 0; // GPIO47 ... GPIO32 = General Purpose I/O GpioCtrlRegs.GPBMUX2.all = 0; // GPIO63 ... GPIO48 = General Purpose I/O GpioCtrlRegs.GPCMUX1.all = 0; // GPIO79 ... GPIO64 = General Purpose I/O GpioCtrlRegs.GPCMUX2.all = 0; // GPIO87 ... GPIO80 = General Purpose I/O GpioCtrlRegs.GPAMUX1.bit.GPIO0= 1; //ePWM1A active GpioCtrlRegs.GPAMUX1.bit.GPIO1= 1; //ePWM1B active GpioCtrlRegs.GPAMUX1.bit.GPIO2= 1; //ePWM2A active GpioCtrlRegs.GPAMUX1.bit.GPIO3= 1; //ePWM2B active GpioCtrlRegs.GPAMUX1.bit.GPIO4= 1; //ePWM3A active GpioCtrlRegs.GPAMUX1.bit.GPIO5= 1; //ePWM3B active GpioCtrlRegs.GPADIR.all = 0; GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 0; GpioCtrlRegs.GPADIR.bit.GPIO24 = 0; // gpio pin as input GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 0; GpioCtrlRegs.GPADIR.bit.GPIO25 = 0; //gpio pins as input GpioCtrlRegs.GPAMUX2.bit.GPIO26 = 0; GpioCtrlRegs.GPADIR.bit.GPIO26 = 0; //gpio pins as input GpioCtrlRegs.GPBDIR.all = 0; GpioCtrlRegs.GPCDIR.all = 0; GpioCtrlRegs.GPAPUD.all = 0; GpioCtrlRegs.GPAPUD.bit.GPIO24 = 0; GpioCtrlRegs.GPAPUD.bit.GPIO25 = 0; GpioCtrlRegs.GPAPUD.bit.GPIO26 = 0; EDIS; } void Setup_HS1(void) { EPwm1Regs.TZCTL.all = 0; //ePWM on S1 (ePWM1A) EPwm1Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1 EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2 EPwm1Regs.TBCTL.bit.CTRMODE = 2; // up - down mode EPwm1Regs.AQCTLA.all = 0x0060; // SET=CMPA CLEAR=CAD EPwm1Regs.TBPRD = 7500; // 5KHz - PWM signal EPwm1Regs.CMPA.half.CMPA = EPwm1Regs.TBPRD/2; //value of CMPA (Duty Ratio) EPwm3Regs.AQCSFRC.bit.CSFB = 2; //force continuous high on output of ePWM3B(S2) EPwm3Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM3A(S5) EPwm2Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM2B(S6) EPwm2Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM2A(S3) EPwm1Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM1B(S4) } void Setup_HS2(void) { EPwm3Regs.TZCTL.all = 0; //ePWM on S5 (ePWM3A) EPwm3Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1 EPwm3Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2 EPwm3Regs.TBCTL.bit.CTRMODE = 2; // up - down mode EPwm3Regs.AQCTLA.all = 0x0060; // SET=CMPA CLEAR=CAD EPwm3Regs.TBPRD = 7500; // 5KHz - PWM signal EPwm3Regs.CMPA.half.CMPA = EPwm3Regs.TBPRD/2; //value of CMPA (Duty Ratio) EPwm2Regs.AQCSFRC.bit.CSFB = 2; //force continuous high on output of ePWM2B(S6) EPwm1Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM1A(S1) EPwm3Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM3B(S2) EPwm2Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM2A(S3) EPwm1Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM1B(S4) } void Setup_HS3(void) { EPwm1Regs.TZCTL.all = 0; //ePWM on S1 (ePWM1A) EPwm1Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1 EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2 EPwm1Regs.TBCTL.bit.CTRMODE = 2; // up - down mode EPwm1Regs.AQCTLA.all = 0x0060; // SET=CMPA CLEAR=CAD EPwm1Regs.TBPRD = 7500; // 5KHz - PWM signal EPwm1Regs.CMPA.half.CMPA = EPwm1Regs.TBPRD/2; //value of CMPA (Duty Ratio) EPwm2Regs.AQCSFRC.bit.CSFB = 2; //force continuous high on output of ePWM2B(S6) EPwm3Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM3A(S5) EPwm3Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM3B(S2) EPwm2Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM2A(S3) EPwm1Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM1B(S4) } void Setup_HS4(void) { EPwm2Regs.TZCTL.all = 0; //ePWM on S3 (ePWM2A) EPwm2Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1 EPwm2Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2 EPwm2Regs.TBCTL.bit.CTRMODE = 2; // up - down mode EPwm2Regs.AQCTLA.all = 0x0060; // SET=CMPA CLEAR=CAD EPwm2Regs.TBPRD = 7500; // 5KHz - PWM signal EPwm2Regs.CMPA.half.CMPA = EPwm2Regs.TBPRD/2; //value of CMPA (Duty Ratio) EPwm1Regs.AQCSFRC.bit.CSFB = 2; //force continuous high on output of ePWM1B(S4) EPwm1Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM1A(S1) EPwm2Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM2B(S2) EPwm3Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM3A(S5) EPwm3Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM3B(S2) } void Setup_HS5(void) { EPwm2Regs.TZCTL.all = 0; //ePWM on S3 (ePWM2A) EPwm2Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1 EPwm2Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2 EPwm2Regs.TBCTL.bit.CTRMODE = 2; // up - down mode EPwm2Regs.AQCTLA.all = 0x0060; // SET=CMPA CLEAR=CAD EPwm2Regs.TBPRD = 7500; // 5KHz - PWM signal EPwm2Regs.CMPA.half.CMPA = EPwm2Regs.TBPRD/2; //value of CMPA (Duty Ratio) EPwm3Regs.AQCSFRC.bit.CSFB = 2; //force continuous high on output of ePWM3B(S2) EPwm1Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM1A(S1) EPwm1Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM1B(S4) EPwm3Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM3A(S5) EPwm2Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM2B(S6) } void Setup_HS6(void) { EPwm3Regs.TZCTL.all = 0; //ePWM on S5 (ePWM3A) EPwm3Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1 EPwm3Regs.TBCTL.bit.HSPCLKDIV = 1; // HSPCLKDIV = 2 EPwm3Regs.TBCTL.bit.CTRMODE = 2; // up - down mode EPwm3Regs.AQCTLA.all = 0x0060; // SET=CMPA CLEAR=CAD EPwm3Regs.TBPRD = 7500; // 5KHz - PWM signal EPwm3Regs.CMPA.half.CMPA = EPwm3Regs.TBPRD/2; //value of CMPA (Duty Ratio) EPwm1Regs.AQCSFRC.bit.CSFB = 2; //force continuous high on output of ePWM1B(S4) EPwm1Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM1A(S1) EPwm2Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM2B(S2) EPwm2Regs.AQCSFRC.bit.CSFA = 1; //force continuous low on output of ePWM2A(S3) EPwm3Regs.AQCSFRC.bit.CSFB = 1; //force continuous low on output of ePWM3B(S2) } //=========================================================================== // End of SourceCode. //=========================================================================== Hi, I want to run a BLDC motor with the help of my DSP (TMS320F28335). While it is able to detect change in Hall State ( I confirmed it by rotating rotor with hand), as soon as Hall State is changing, corresponding gate driver signals are not developed. However if  I stop debugging in the IDE (CCS) and debug it again then corresponding correct pulses are produced. I am not getting how to develop gate driver signals continuously according to change in hall state. I am using following code-   code.txt
    • I posted a library a while ago which could be of use. It can be found here: https://github.com/energia-libraries/RotaryEncoder
    • Please repeat these steps again and do not cancel the installation process until it is done. It seems that it takes a long time on your machine and it might look like it hangs but that's not the case.   In the board manager click remove on the TivaC package. Go to the directory C:\Users\andre\AppData\Local\Energia15\staging\ and delete all files and folders Go to C:\Users\andre\AppData\Local\Energia15\packages\energia\tools\dslite\ and delete the folder 7.2.0.2096 Go to C:\Users\andre\AppData\Local\Energia15\packages\energia\hardware\ and delete the folder tivac Now restart Energia Start Energia and reinstall the TivaC package.
  • Projects

  • Embedded Deals + For Sale

  • Energia Libraries

×
×
  • Create New...