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.

MIBSPI5 is Failed to transfer 16 bytes of data on TMDXRM46HDK Hercules Development Kit

Hi, I am using TMDXRM46HDK Hercules Development Kit. I have configured and tested MIBSPI1 with Aardvark and it is working fine.

I have configured MIBSPI5 as well using same settings as MIBSPI1 but I am unable to transfer 16 bytes of data using MIBSPI5. Here is log of Aardvark:

"Time","Module","Read/Write","Master/Slave","Features","Bitrate","Address","Length","Data"
"2015-01-24 01:09:29.101","SPI","R","S","RSML","","","14","00 11 22 33 55 66 77 88 99 AA BB CC DD FF"
"2015-01-24 01:09:29.101","SPI","W","S","RSML","","","14","FF EE DD CC BB AA 99 88 77 66 55 44 33 22"
"2015-01-24 01:09:32.045","SPI","R","S","RSML","","","15","00 11 22 33 44 55 66 77 88 99 BB CC DD EE FF"
"2015-01-24 01:09:32.045","SPI","W","S","RSML","","","15","FF EE DD CC BB AA 99 88 77 66 55 44 33 22 11"

I have verified my setup. I am using same MIBSPI driver, same application, same board (Rev E) and same Aardvark.

Can you please tell me if there are any known issues with MIBSPI5 or if I am doing anything wrong?

Thanks

  • I can transfer 12 bytes of data without any problem with MIBSPI5.
  • If you can share your complete project, we can take a look to see what is missing.

    Thanks and regards,

    Zhaohong
  • My complete project contains several components that are irrelevant to this problem. Is there any thing specific that can help you in this matter?
    I mean register dump, Pin Muxing etc.

    Thanks,
    Naveed
  • Naveed,

    Without knowing the details, The first question I want to ask is how the SCI communication is started and how DMA is setup to handle the communication. Do you configure DMA after each block transfer or DMA is set to the autoinit mode. Does MCU start the communication or it is started by external device? What is the SCI baud rate? Can this baud rate be handled reliably over the link? Does the failure change if you change the baud rate?

    Thanks and regards,

    Zhaohong
  • Naveed,

    I make a mistake in my earlier post. I was thinking of answering another question about SCI/DMA issue. Sorry for the confusion.

    Very often, there is something else going on when this type of issue pops up. Can you reduce the test to just MIBSPI5/DMA operation? When you have multiple operation going on, please make sure The CPU/system is capable of handling all tasks in time.

    Thanks and regards,

    Zhaohong
  • Zhaohong,

    I am not using DMA and CPU is capable of handling the load. Please see the register dump below:

    {code}
    0xFFF7F400 00000001 ....
    0xFFF7F404 01000003 ....
    0xFFF7F408 0000005F _...
    0xFFF7F40C 00000000 ....
    0xFFF7F410 00000200 ....
    0xFFF7F414 01010E3F ?...
    0xFFF7F418 0001063F ?...
    0xFFF7F41C 0300093F ?...
    0xFFF7F420 00000000 ....
    0xFFF7F424 00000000 ....
    0xFFF7F428 00000000 ....
    0xFFF7F42C 00000000 ....
    0xFFF7F430 00000000 ....
    0xFFF7F434 03030F3F ?...
    0xFFF7F438 00000000 ....
    0xFFF7F43C 00000000 ....
    0xFFF7F440 80000000 ....
    0xFFF7F444 80000000 ....
    0xFFF7F448 08080808 ....
    0xFFF7F44C 0000003F ?...
    0xFFF7F450 FF013608 .6.ÿ
    0xFFF7F454 FF013608 .6.ÿ
    0xFFF7F458 FF013608 .6.ÿ
    0xFFF7F45C FF013608 .6.ÿ
    0xFFF7F460 00000000 ....
    0xFFF7F464 00000000 ....
    0xFFF7F468 00000000 ....
    0xFFF7F46C 00000000 ....
    0xFFF7F470 00000001 ....
    0xFFF7F474 00FF0000 ..ÿ.
    0xFFF7F478 00FF0000 ..ÿ.
    0xFFF7F47C 00FF0000 ..ÿ.
    0xFFF7F480 00FF0000 ..ÿ.
    0xFFF7F484 00000000 ....
    0xFFF7F488 00000000 ....
    0xFFF7F48C 00000000 ....
    0xFFF7F490 80000FFF ÿ...
    0xFFF7F494 00007F00 ....
    0xFFF7F498 40700000 ..p@
    0xFFF7F49C 40701000 ..p@
    0xFFF7F4A0 40701A00 ..p@
    0xFFF7F4A4 40702600 .&p@
    0xFFF7F4A8 40703400 .4p@
    0xFFF7F4AC 40704400 .Dp@
    0xFFF7F4B0 40705600 .Vp@
    0xFFF7F4B4 40706A00 .jp@
    0xFFF7F4B8 00000000 ....
    0xFFF7F4BC 00000000 ....
    0xFFF7F4C0 00000000 ....
    0xFFF7F4C4 00000000 ....
    0xFFF7F4C8 00000000 ....
    0xFFF7F4CC 00000000 ....
    0xFFF7F4D0 00000000 ....
    0xFFF7F4D4 00000000 ....
    0xFFF7F4D8 00000000 ....
    0xFFF7F4DC 00000000 ....
    0xFFF7F4E0 00000000 ....
    0xFFF7F4E4 00000000 ....
    0xFFF7F4E8 00000000 ....
    0xFFF7F4EC 00000000 ....
    0xFFF7F4F0 00000000 ....
    0xFFF7F4F4 00000000 ....
    0xFFF7F4F8 00000000 ....
    0xFFF7F4FC 00000000 ....
    0xFFF7F500 00000000 ....
    0xFFF7F504 00000000 ....
    0xFFF7F508 00000000 ....
    0xFFF7F50C 00000000 ....
    0xFFF7F510 00000000 ....
    0xFFF7F514 00000000 ....
    0xFFF7F518 00000000 ....
    0xFFF7F51C 00000000 ....
    0xFFF7F520 00000005 ....
    0xFFF7F524 00000000 ....
    0xFFF7F528 00000245 E...
    0xFFF7F52C 00000066 f...
    0xFFF7F530 00000200 ....
    0xFFF7F534 00000000 ....
    0xFFF7F538 00360036 6.6.
    0xFFF7F53C 00360036 6.6.
    {code}

    The view of MIBSPI RAM is as follows:
    {code}
    0xFF0E0000 843E0000 ..>.
    0xFF0E0004 843E0011 ..>.
    0xFF0E0008 843E0022 ".>.
    0xFF0E000C 843E0033 3.>.
    0xFF0E0010 843E0044 D.>.
    0xFF0E0014 843E0055 U.>.
    0xFF0E0018 843E0066 f.>.
    0xFF0E001C 843E0077 w.>.
    0xFF0E0020 843E0088 ..>.
    0xFF0E0024 843E0099 ..>.
    0xFF0E0028 843E00AA ª.>.
    0xFF0E002C 843E00BB ».>.
    0xFF0E0030 843E00CC Ì.>.
    0xFF0E0034 843E00DD Ý.>.
    0xFF0E0038 843E00EE î.>.
    0xFF0E003C 843E00FF ÿ.>.
    {code}

    VLCK = 55MHz and baud rate is 1000.
    PLL1 detail is as follows:
    CLK Div = 4
    Multiplier = 110
    Output Div 2
    PLL1 Div = 1
    VCLK1 Divider = 3
    VCLK2 Divider 1
    VCLK3 Divider = 3

    Pinmux is OK since I can send and receive data.