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.

TMS320F28377S: driverlib reading periferals registers while debuging

Genius 5910 points

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE, MOTORWARE

Hi,

I'm migrating from the instaspin 28069 HAL to the driverlib 28377S. While debuging a intaspin project you can read the periferals registers value via the HAL structs. Only driverlib doesn't have such thing. And I can't find any option in CCS to read hardware registers. 

So how can I debug periferals registers while debuging?

Thanks,

 EVS

  • I wasn't sure if you're referring to reading the registers via software or reading them via the Expressions window in CCS, so I'll give you some options for both.

    To add a register to the Expressions window, you can actually just start typing the name of the group of registers you want to look at (the "Device Registers" column in the TRM lists the name CCS will know) and pick the register and/or bit you want to add.

    Similarly, you can go into the Registers view in CCS, browse until you find the register group, register, or bit you're interested and right click it and select "Watch" and it will be added to the Expressions window.

    If you mean reading a register in software, you can read the registers the same way the driverlib does. There's a chapter in the F2837xS_DriverLib_User's Guide.pdf (in C2000Ware\device_support\f2837xs\docs) called "Direct Register Access Model" that tells how to do this.

    Another option that works for both the Expressions window and software is to add actual register structures to your project. The register structures in C2000Ware have a slightly different format than the ones you worked with in MotorWare, but they can be used in much the same way. There's a section in the F2837xS_DEV_USER_GUIDE.pdf (also in C2000Ware\device_support\f2837xs\docs) called "Project: Adding Bitfield or Driverlib Support" that explains the files that you'll need to add to your project to use them. Once they're added though, you can read/write to them in software or add them to the Expressions window.

    Whitney