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.

TMS320F28388D: biss software example problem (overriding etc)

Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello,
I’m trying to run a BiSS encoder on the F28388D. I’m using TI’s BiSS library and example code. In the clock test, I can generate a clock signal from ePWM, but I don’t see it on the MA line. After looking into it, it seems that on the F28388D only ePWM can be “overridden” to drive the clock. Is that actually true?

If it is, is there any way to do this without adding external circuitry? Is using an external circuit the only option? I’m currently trying to use SPIB.

In short: it appears that only ePWM supports overriding on the F28388D. Is there a way to override SPIB instead, and is there any method to achieve this without external hardware?

It is using example and library code.

And It is interface board circuit.

  • F28388D. I’m using TI’s BiSS library and example code. In the clock test, I can generate a clock signal from ePWM, but I don’t see it on the MA line. After looking into it, it seems that on the F28388D only ePWM can be “overridden” to drive the clock. Is that actually true?

    The PWM module does not generate the clock. The CLB generates the clock. To output the signal to a pin, the CLB can override the functionality of some pins (such as overriding the PWM output).

    In the reference design for P65x this is not done for the encoder clock, however. The CLB outputs the MA clock to an OUTPUTXBAR which then goes to a pin. Refer to the I/O diagram in the design guide.  The same can be done on F28388x.

  • I’m currently trying to use SPIB.

    SPI-B can be accessed directly by CLB tile 2. Refer to the device Technical Reference Manual

  • Since you are using SPIB, you changed the example settings from CLB4 to CLB2. However, unlike the example, your configuration screen shows that only ePWM2 is overridden.

    Does this mean that ePWM2 can be used directly?
    Or does it indicate that there is another method required?
    Or is it simply a sign that I made a mistake in my configuration?

    For reference, the example file I used shows the overridden settings clearly on the screen. Please refer to the image below.

  • For reference, the example file I used shows the overridden settings clearly on the screen. Please refer to the image below.

    Yes - in this image the CLB directly accesses the SPI-D peripheral (output 24, 25, and 26). The ePWM override is used as a test point to view the SPI clock externally if desired (for debug). This testpoint is brought out on output 0 which is the same signal as output 24, just with a different destination.

    This matches the design guide diagram.

    Moving to tile 2 shows override of SPIB signals. Yes, ePWM4 changes to ePWM2 - this is still the test point to view the SPI clock for debug purposes. It is not used by the application.

  • In the reference, I see that the overridden pin can be seen and overridden if you choose, but on my 28388d ccs screen, only epwm2 appears as overridden pin, why is that?
    Is the pin number selection wrong?

    I captured the screen to show the pin number I chose in the previous answer. Please note.

    and my board is 28388d. So, i wonder if spi can override on 28388d. Not f28p65.

  • So, i wonder if spi can override on 28388d. Not f28p65.

    The SPI signals can be overridden on F28388d as well. Note that the screenshot of the technical reference manual I posted earlier is from the f28388d documentation.  The only device that can't override the SPI signals directly from the CLB is the F2837xS/D. 

    Which version of the tools are you using? I am wondering if the information may be missing from the version you have. I will try this tomorrow on my side. It may be a tool feedback issue.

  • I use code composer studio 12.6.0 

  • Hello - I checked this in the latest version of the tool and see the same issue for the F28388x. This is a display issue with the tool, but the silicon supports this as shown in the TRM. I will submit a bug report to get this fixed.

  • So, what's the way I can fix this right now? Is it okay if I do the version differently?

  • So, are you saying that the pin that is only overridden on the screen won't open and can be seen in actual hardware? Or is it a situation where 28388d can be used originally but cannot be overridden with spi because it can't be used in software? How can I solve it?

  • The code generated by the tool will enable the output. The output will override the signal as shown in the TRM. This is a display issue with sysconfig. It does not impact the code or functionality.

  • Then, as in the top question photo, I connected mcu gpio and designed the biss circuit, but when I look at the spib MA part with an oscilloscope, the clock doesn't come out. The epwm2 set in sysconfig to override the same comes out. Why is that?

  • Is the pin configured as ePWM? (not GPIO).

  • Epwm2 was connected to gpio 2 (epwm), and spib was connected to 63, 64.

  • And all the settings were done with the sysconfig file provided in the example, and I changed clb4 to clb2 to override it with spib. So I checked that the clock comes out in epwm2. But the spib clock MA that is set to override in clb2 doesn't come out.

  • In the original sysconfig, GPIO6 is configured so as PWM4 so that the CLB can override PWM4_output.  The pin is not a gpio - it is ePWM4 instead.

    Now you want the SPI clock test point on PWM2, the GPIO needs to be configured for PWM2 function. This is done in sysconfig under the PWM section.

    You want:

    CLB ---> EPWM2A_ output --> pin

    This will not work

    CLB ---> EPWM2A_ output --> no connection      

    GPIO functionality --> pin

    You mentioned the MA clock. This output from the CLB can be connected to any output that has either an OUTPUTXBAR or CLB_OUTPUTXBAR. If you do not see MA, then make sure this connection is as expected.

    Also make sure the start operation in the C28x software is accessing the correct tile(s) or the transaction will not start (no clocks will be generated).

  • What is Out 24? If Out 24 is overridden (to spib clk), shouldn't the pin (MA) be working now because it's connected to rs485 in the biss circuit? Please explain more about Spi-clock and enc-clock.

  • OUT24 is the SPI clock. It clocks the SPI peripheral to receive the encoder's response.  This is not the same as the MA signal which is on out 4.