This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LaunchXL 28069 using J1: Main ISR doesn't execute

Other Parts Discussed in Thread: MOTORWARE, LAUNCHXL-F28069M, BOOSTXL-DRV8301

I have a LaunchXL 28069 attached to a custom board that we designed.  We're using Motorware 15 and CCS 6.1.0.00104 and compiler 6.4.6.

We're using the 28069 to control an automatic voltage regulator.  The ePWM signals will be used to drive an H-Bridge to operate the exciter for a field-wound generator.  I've been able to get all the voltage and current feedback re-mapped, and everything there seems to be working just fine.  I can power the field winding with a DC power supply and run the software and monitor the current, torque, angle, and all that good stuff.

However, I laid out the board to use the PWM outputs from J1 (J4?).  However, when I remove the line

#define J5

in user.h, the main ISR stops operating.  There is an indicator LED on the Launchpad that normally blinks, and that was my first indication that something was wrong.  When I put a breakpoint in the main ISR I don't get any stoppages.  There aren't any errors being reported, and the main loop executes normally once I set the enableSys and runIdentify flags.

I'm sure this is related to the PWM isr (I think the main isr is triggered by the PWM isr, correct?), but I haven't quite figured out how all the HAL stuff works on the hardware level.  I'm usually a pretty low-level programmer, and I can't seem to find out how writing to the HAL structures modifies the peripheral registers.  Is that just mapped out to the real hardware addresses somewhere in the linker files?

Also, I can't find the PWM isr anywhere.

Any help is much appreciated.

Thanks,

Matt

  • Another oddity I just encountered is this: If we want to use J1 instead of J5, we would also have to make sure the ADC ports are assigned correctly. However, while there is an #ifdef to re-assign a set of PWM ports, there is nothing similar to re-assign the ADC ports. Perhaps there is a newer version of MotorWare that has newer files for the dual-set Launchpad 28069?

    Matt
  • by "when I remove the line #define J5" do you mean you changed to
    #define J1

    you need to define one to tell it which of user_j1.h or user_j5.h to use
  • there are projects being released in the next MotorWare (v16 end of February) which will show both J1 and J5 being active and driven at the same time.
  • Actually, I just commented the line out. All the code references to J5 were of the format


    #ifdef J5


    #else

    #endif

    So, I just figured removing the J5 definition would default to the #else part. I did try changing


    #define J5

    to


    #define J1

    but I get the exact same behavior.

    I can't find any references to J1 anywhere in the code, actually, except for in user.h and in user_j1 itself.  Also, user_j1.h and user_j5.h are identical, apart from the obvious self-reference in the first and last lines of the files.

    Matt

  • There are #ifdef J5 in the hal.c file.
  • Right; I see those. I just don't see any references to J1.

    Also, the #ifdefs in hal.c only pertain to the PWM registers. There isn't anything similar for the current and voltage inputs. How does the code handle that?

    Either way, replacing

    #define J5

    with

    #define J1

    still results in the same behavior: The main isr doesn't execute.

    I'm actually content to work around the normal hal implementation to get the PWM outputs operating, but my gut tells me trying to find a workaround will cause a number of conflicts with the existing code, creating more problems than it will solve, and I can't find the pwm isr.

    Matt
  • matt,
    the software works just fine with LAUNCHXL-F28069M and BOOSTXL-DRV8301 on either J1 or J5.
    if your custom HW isn't working, and you haven't changed any of the SW, I would
    1. make sure you have updated the SW correctly for any differences in your custom HW
    2. look for HW issues
  • Chris,

    I just imported a copy of lab04 into a new workspace, and I get the same issues with a BoostXL 8301 attached. I can run a small motor on J5, but not on J1. Can you give me any insight into how the software accounts for the ADC assignments? I only see three references to J5 in hal.c, and all of them are for the PWM ports.

    This might be the root of our issue, as it seems the main isr is really an ADC interrupt. If the ADC setup isn't done correctly, I would expect the main isr to also fail. I wonder whether somehow, somewhere a long while ago we inadvertently screwed up one of the files. I'm going to download a new copy of MotorWare, but I have to wait for permission to do so.

    Matt
  • did you check the jumpers?

    JP4, 5
    a. ON-ON: if just using bottom BoosterPack headers J5-J8
    b. OPEN-OPEN: if using top BoosterPack headers J1-J4 or using both BoosterPack headers J1-J4 & J5-J8;
    c. Provide DC bus at any attached BoosterPack
  • Yeah, that's how I have it set up. All the voltages are fine.

    I can detach the Booster Pack, and the main ISR operates with #define J5, but not with #define J1.

    It really feels like a code issue. I can't imagine why hardware would make a difference when all I'm doing is swapping one line of code, especially when nothing is connected to the Launchpad. I really do suspect we corrupted one of the files in the motorware directory at some point, and there must be some place where the J5/J1 difference is not being transferred properly.

    Does anyone have any insight into the ADC setup with J5/J1? How does the software know which ports to use, if only one set is initialized in both instances? Or, is there a place I can get a virgin copy of the code without having to wait for download permission?

    Thanks,

    Matt
  • "Does anyone have any insight into the ADC setup with J5/J1? How does the software know which ports to use, if only one set is initialized in both instances?"

    see hal.c starting at line:

    //configure the SOCs for boostxldrv8301_revB on J5 Connection

    "Or, is there a place I can get a virgin copy of the code without having to wait for download permission?"

    You should delete MotorWare and reinstall. It sounds like you must have changed the SW on accident.
  • you should also read the tutorial here:
    C:\ti\motorware\motorware_1_01_00_15\docs\tutorials
  • Chris,

    Our hal.c doesn't have that line.  It's simply:

    //configure the SOCs for boostxldrv8301_revB

    I think that confirms, undoubtedly, that somehow we overwrote one of the hal.c files.  I'm still waiting for access to download MotorWare again.  Last time I downloaded it, it took about a week or so to get permission, so I suspect this will be similar.

    Thanks for the help.

    Matt

  • I didn't look into code details, but general mainISR trigger logic is : pwm -> ADC Start-of-conversion, follwed by ADC End-of-conversion -> mainISR. So if you change pwm or ad channels configuration, that might mess things up.

  • As it turns out, hal.c was screwed up. On our last project, we must have failed to change the linked resource target from the original installation directory to the new project directory.

    Sorry for the confusion, and thanks for the help tracking that down.

    Matt