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.

TMS570LS3137: MibSPI TG LPEND configuration when all buffer space is used

Part Number: TMS570LS3137
Other Parts Discussed in Thread: TMS570LC4357,

Hi there,

Under MibSPI mode, while I understand the clarifications found in the TRM spnu499c, page 1397 for Last TG End Pointer programming in the case where all 8 TGs are been used, I cannot find what to do when all 128-element buffer are assigned to TG0 (or when less than 8 TGs are been used).

Should I simply set TG0 start pointer to 0 (as usual), then set LTGPEND-->LPEND end pointer to 127?

Or I need also configure TG1? If so, what start pointer value should I set for TG1, and what end pointer should I set for LPEND?

Thank you.

  • Hello,

    Please take a look at this thread:

  • Hi Miro,

    Thanks for the link. Could you confirm if the last post of the linked thread should rather be as follow?

    Following setting must be done to use TG0 for length of 128 ( all Buffers).

    TG0CTRL --- PSTART  = 0

    TG1CTRL --- PSTART  = 0

    LTGPEND --- LPEND = 0x7F

    Regards.

  • Then again, it was mentioned that LTGPEND->LPEND is used ONLY when all 8 TGs are used up.

    So why we need to use LTGPEND->LPEND since TG1 above already provided indication that TG0 should end at 127?

  • Hello,

    Yes, the thread I was pointing concerns TMS570LC4357 device on which MibSPI1 has 256 bytes buffer size (Other MiBSPIs has 128 bytes buffer size).So, for the TMS570LS3137 is should be 0x7F.

  • Chuck Wong said:

    Then again, it was mentioned that LTGPEND->LPEND is used ONLY when all 8 TGs are used up.

    So why we need to use LTGPEND->LPEND since TG1 above already provided indication that TG0 should end at 127?

    Hi Miro, thanks for the last answer, it was clear because the MCU supports lesser buffer size.

    Can you please see the quoted question, to see whether setting LPEND is necessary when less than 8 TGs are used?

    Thank you again for your support.

  • Hello,

    How to program LPEND is noted in In TRM, Table 28-42:

  • Yes I saw those notes, although the LS3137 always has bit 15 reserved (127 buffers max).

    With the second note, to make sense, I now interpret that this phrase "Configure LPEND to specify the end address of the last TG" from the TRM means the end address of the MCU-implemented hardware buffer size, but NOT the end address of the last USED TG.

    For the LS3137, LPEND should always be 127, except when all 8 TGs are been used, in which case it should point to the last used end address.

    Thanks.