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.

TMS320F28379D: Question regarding Tamagawa ABS Encoder with BOOSTXL-POSMGR plug-in module

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D, BOOSTXL-POSMGR, TIDM-1011, CONTROLSUITE,

Hi all,

I have purchased the LAUNCHXL-F28379D development board and BOOSTXL-POSMGR plug-in module, to communicate with a Tamagawa TS5700N8401 absolute encoder via the T-format serial interface. 

Using the example software provided in the control suite examples and following the instructions provided in the attached pdf titled

TI Designs: TIDM-1011
Tamagawa T-Format Absolute-Encoder Master Interface
Reference Design for C2000™ MCUs

tidue74.pdf

I have not had any success in extracting any data from the encoder.  Software project is found here;

C:\ti\controlSUITE\development_kits\BOOSTXL_POSMGR\v01_01_00_00\tformat-F28379DLpad-S2\examples\PM_tformat_systemtest

The project builds and downloads to the TMS320F28379D with no errors.

When debugging the code, it seems to immediately run into a dead end with "no debug information or outside of program code" being reported. (See below). The cod, as defined by the example project, is currently set to run from RAM. I thought that the demo code that the LAUNCHXL-F28379D arrives with running on flash may be interfering with the T-format example running on RAM. I therefore erased the code running on flash and reloaded the t-format code to RAM, but still have no luck with the program getting stuck in the same dead end. 

There is one warning during the build which is use of a different compiler to the one the project was created with;

Any help will be much appreciated.

Kind regards,

Alastair. 

  • Hi Alastair,
    You are looking at the right example for this configuration.
    It's a RAM based example code and should not depend on any code contents from flash.
    Does it even go to start of the code, main function? Can you single step the code and see where it may be going to end?
    Also, to start with you can disconnect the booster pack as well and just download and step through the code.
  • Many thanks for coming back to me Subrahmanya, I will try as you suggest and single step through the code, both without and without booster pack connected. Will report back when I have tried.
  • Hi Subrahmanya, I have removed the booster board and tried debugging the code. The code appears to go straight to an 'ESTOP' command (presumably an exception?). I have restarted the code using the 'restart' and 'reset cpu' buttons, but end up in the same place. In the disassembly window, the code is shown to be at location 3fe493. Please see attached screenshot.

    Kind regards,

    Alastair. 

  • Are you able to run any code on this launch pad? Could you try general device examples?
    C:\ti\controlSUITE\device_support\F2837xD\v210\F2837xD_examples_Cpu1
  • I have tried the 'adc_soc_Epwm_tempsensor_cpu01' project and this works ok. I am able to debug the code and watch the 'sensorTemp' reading updating when added to the expressions window. I will try some other projects as well.
  • Following an uninstall of the control suite and re-installing, I can now run & debug the tformat code without the boostxl-posmgr board connected. When allowing the code to run and then pressing the pause button, the code stops at line 150 of "tformat.c".

    The line is "while (tformatData.dataReady != 1) {}" 

    This loop appears to be waiting for new data to be ready from the encoder (which is not yet plugged in). 

    I will now try connecting in the boostxl-posmger board and see if the code still runs ok.

  • I have now connected in the boostxl-posmgr board. D18 (power) is on and now with the code running D16 (encoder 5V) is on as well.

    Unfortunately the expressions in the window are not updating with new values (just staying at 0) when the code is running and turning the encoder. The code is still pausing at the same line of code as before (150 of tformat.c) and waiting for data to be ready.

    Do you have any more suggestions?

    Please see below for my connection details

    Pin No.Function     Wire colour from board      Wire colour Tamagawa TS5700N8401

    1                 GND             Black                                           Black

    6                 Data+          Orange                                       Blue

    7                 +5V               Red                                              Red

    8                 Data-           Brown                                        Blue/Black

    N/C            Batt+           N/C                                              Brown

    N/C            GND             N/C                                              Brown/Black

    J5 set to external

    J9 set to master

  • Hi Subrahmanya,

    I have tried stepping the code from the point at which it stops when paused.

    line 150: while (tformatData.dataReady != 1) {}

    When pressing the step into button, the code does not step and remains at line 150. Do you have any ideas why this could be?

    Kind regards,

    Alastair

  • Hi,

    Good to see that you are able run the code by re-installing the controlSuite.
    You can try the items below further.

    1. Is there any activity on the data pins D+/D-? You can probe to make sure that the interface is active.
    2. If there is activity on the pins, please measure the pulse width of a bit transition - as per t-format protocol it has to be 400ns.
    3. If it is not ~400ns range, you need to adjust the system clock accordingly.

    Let me know your observation.
  • Hi Subrahmanya,

    Thanks very much for coming back to me. I am measuring the pins using a scope (100MHz) and cannot see any movement on the data lines. The data lines are both sitting at 2.5V
  • Hi,

    There will not be continuous toggle on these pins.
    Master (379d) will send a command and then wait for encoder response.
    So, You may have to trigger the scope for transition at that time.
    Maybe, you can place a break point at start_operation() function call.
    Set up the trigger and run the code.

    Also, another thing you can try is to power the encoder separately - not use the power from the board.
    This could isolate any issues related to powering up of the encoder.
  • Looking at the pins on U7 of the BOOSTXL-POSMGR board, the transmit and receive lines (pins 1 & 4) are not moving.
    Pin 1 is high (3.3V)
    Pin 4 is high(3.3V) - this must be being driven high by the processor?
    Pin 3 is low (0V)
  • I have tried triggering the scope and restarting the code, in the hope of seeing an edge but nothing so far unfortunately.
    I will try powering the encoder separately.
    Thank you for your continued support, it's starting to send me a bit crazy!
  • Is the LED next to the encoder interface connector turned ON?
  • D16? Yes this is on.
  • I can see some movement on the data lines now. I have to stop the debug session and then restart the debug session again, using the restart button does not have the same effect. When I run, a sequence is present on the data lines. The total length is exactly 7200nS. This is 18 bits long based on a width of 400nS? The smallest width I observe is exactly 800nS. Perhaps I am actually observing 9 bits, that are 2x too long? And the clock is out by a factor of 2?
  •  Above - 7200nS sequence length

    Below - 800nS width

  • That's great! I'm not sure what exactly is wrong in your development environment that requires restarting your debug session.
    Yes - looks like the bit width is 800ns. It has to be 400ns.
    One option is you can double the clock (PLL multiplier) -
    Inside F2837xD_SysCtrl.c, you can change InitSysPll function with IMULT_40 (if the code has IMULT_20).
    I think, it should work with this change - since you've already observing the right signals.
    Encoder will not respond unless the data rate is 400ns.
  • Yes!!!!!!!!!! It works!!!!!
    I'm now seeing live data in the debug session. Wow so much heartache from a single constant :-D
    Thanks very much for your help, it is greatly appreciated .
    Kind regards,
    Alastair.