Hi Guys,
I recently purchased your DRV8312 Kit and am stepping through the PM_Sensorless project example code using Code Composer Studio Version: 5.1.0.09000. (Free version limited to emulators) From what I can see this code/documentation was written with/for Code Composer Studio v4. Although I am able to translate the instructions for v5, I am a little bit concerned with compatibility especially while using Code Composer studio to control the MCU while I step through the various build levels. I seem to be running into some problems. I received an error while trying to step through build level1. Here is a list of the instructions that i followed:
- assure all jumper settings are in correct position on DRV8312 board and F28035 control card SW3 (JTAG emulation) set to DOWN (ON), SW2 both UP(ON), JP1 set to VR1, M1 set to H, switches RSTA RSTB RSTC set to middle position.
- connected USB cable with drivers all preloaded and apparently working since i can run the GUIs with the provided .out files with no problem.
- connected 24 volt power supply,(with provided AC->DC convertor) to PVDD and GND. All LEDs light up in correct order.
- open code composer studio, load PM_Sensorless project for DRV8312 Kit that came on the usb stick.
- assure build level is defined as build level 1 within PM_Sensorless-Settings.h "#define BUILDLEVEL LEVEL1"
- Right click on PM_Sensorless project and Set Active Build configuration to F2803x_RAM (although it seems to have been this configuration by default)
- Right click on PM_Sensorless project and Build Project.
- Go to View Tab and then Target Configurations, Right Click on Projects and select New Target Configuration , name configuration and click finish.
- According to Instructions with included documentation I selected the Texas Instruments XDS100v1 USB Emulator (really unsure about this step as there is a v2 and v3 option)
- Searched for my Device , TMS320F28035, checked the box, saved and tested connection, it passed successfully. ("The JTAG DR Integrity scan-test has succeeded.")
- Launched Debug Session, opened up scripting console and added list of variables i should watch using the javascript file. "AddWatchWindowVars_F2803x.js" (note i had to modify this file as i found that CCv5 does not support the following :"AddExpression command does not support explicit expression formatting") thus i modified the js file as follows: from expAdd "EnableFlag" getNatural() to expAdd "EnableFlag" and followed the same scheme throughout, it worked but then i had to one by one change the Q values to match the current project. Is there a better way to do this, ie once i finish setting the correct Q values can i import and export this information so i do not have to do it everytime i open code composer studio?
- Then i reset the CPU, restarted, enabled real time silicon mode and real time polite mode.
- This is where specific directions for this project started (Sensorless FOC of PMSM.pdf , the doc file under PM_Sensorless Project)
- Set expression in watch window EnableFlag to 1, I should see expression IsrTicker increasing as this would verify that the system interrupt is working properly if the code was running.
- Now i try to run the program by pressing the Resume/Run button in the debug tab.
- This is where i see the problem, program does not run, it stops immediately.
I have a feeling I did not restart the CPU properly when i did this the first time as it did happen to work and the isrTicker variable was increasing initially. When I ran this the first time i looked at the expressions in my watch window and they all had the proper values as shown in the project documentation pdf. Now when I look at values of the expressions in my watch window there very odd values especially for expressions that only have a few logical states like enableflag (0 or 1) DRV_Reset and lsw, for instance lsw value is reported as 55091. However, even if i attempt to change them in the watch window the code will still not run, it just stops as before. I have tried reseting the cpu restarting and power cycling the board following the same instructions i listed above a few times now and i am still getting the same values for my expressions as i saw when the problem initially came up, (note that these values seem extremely wrong considering i reset numerous times and the code should rewrite the registers to its' original values, like i mentioned before they also do not match the values shown in this projects documentation)
Can anybody tell me how to reset the registers to their original values and the proper way to reset the CPU and code as it seems i did not do them correctly.
Also will having CCS v5 be a problem while stepping through the various build levels of this project? I assumed it was backwards compatible so i downloaded the newer version since the version of CCS v4 that came on my usb stick had a corrupted installer. Should I use CCS v4 if so I couldn't seem to find where to download the latest version of CCS v4.
Which version of the Texas Instruments XDS100 USB emulator should i use? there are three i see available in the target configuration tab.