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.

MSP430FR2355: Debugging BLDC code

Part Number: MSP430FR2355

How do you debug software using CCS and MSPFET when you can't step thru line by line?

For a lot of loads like BLDC motors, you can't step thru the code.

so is there a way to datalog and look backwards after some run time?

How do BLDC programmers debug errors?

  • Hi Tom,

    I think it will depend a lot on what you are trying to debug. In other words, what is the goal of this debug?

    I'm not sure if there are any pre-built tools for realtime debug on the FR2355. Others can chime in.

    If your routine has a bit of time to spare, you can insert some code that toggles a GPIO. You can then observe the timing of this GPIO on a scope or logic analyzer to understand where your code is spending its time.

    Another way (like you've mentioned above) is to allocate an array for logging debug info. You can then add information into that array as your program runs. If you have a spare timer you might even be able to timestamp it! Once your code reaches a safe point, you can halt the program in the debugger and read out the array. Of course this will require free space in RAM

    If you don't have free space in RAM and you only need to log data periodically you can use the back-channel UART on the MSPFET. You can send a single character to indicate certain event and conditions. On your PC you can collect those character for analysis.

    All of these approaches will require some amount of time/memory so you will have to determine what will work for you application. 

    Regards,

    Evan

  • If it is timing issues, you can toggle gpio's and put a scope on it.

**Attention** This is a public forum