PROCESSOR-SDK-AM64X: Bug in MCSPI_transferCallback?

Part Number: PROCESSOR-SDK-AM64X
Other Parts Discussed in Thread: SK-AM64B, TMDS64EVM

Hello,

There is an example of a non-blocking API for MCSPI in software-dl.ti.com/.../DRIVERS_MCSPI_HLD_PAGE.html. In this example the application-specific argument is transferred to the application callback within the transfer object (transaction->args). If we check source\drivers\mcspi\v0\mcspi_v0.c on line 615, then we can see that this argument is overwritten to NULL by memcpy function. Is it a bug, or is this argument saved somewhere else?

We are using MCU-PLUS-SDK-AM64X 09.01.00.41.

Best regards,

Andrean

  • Hello Andrean,

    Thanks for your question.

    Allow me sometime to go through this and figure out if this is a bug.

    Regards,

    Vaibhav

  • Hello Andreas,

    I have noted your concern, can you please help me with steps to reproduce this.

    Lets start by what you are using: Is it a custom board, TMDS64EVM or SK-AM64B?

    I know the initial steps which is setting board to OSPI boot mode and building one of the MCSPI examples. This will be followed by loading the .out file to the respective core and debugging.

    Can you confirm which example you are exactly using out of the list below attached in the snapshot.

    If its a custom example you wrote, it would be nice if you can forward me that project file.

    Apart from this, I would also like you to tell me a place where I can put a breakpoint and observe the bug you are seeing as of today.

    Looking forward to your response.

    Regards,

    Vaibhav 

  • Hello Vaibhav,

    We use TMDS64EVM for our tests. You can find an example in the attachments. A breakpoint can be set in the file mcspi_loopback.c --> function App_callbackFxn --> line 149 to observe the issue.

    mcspi_loopback_am64x-evm_r5fss0-0_freertos_ti-arm-clang.zip

    Kind regards,

    Andrean

  • Hello Andrean,

    I have been able to reproduce the issue you are facing.

    I am going to attach two snippets, one before memcopy in MCSPI_transferCallback() and one after memcopy.

    Before memcopy



    After memcopy




    I believe this might be a bug.

    So my next steps are as follows:

    1. I will raise a JIRA Bug for this.
    2. Talk to developers on this, as this mostly looks like problem while introducing the LLD drivers.

    I will keep you posted with any updates I get from the JIRA/developers.

    Thanks for your patience.

    Regards,

    Vaibhav

  • Hello Vaibhav, 

    Thank you for the help! We'll be waiting for your update.

    Best regards,

    Andrean

  • Hello Andrean,

    Thank you for the help! We'll be waiting for your update.

    I am glad to help you.

    Please expect update in few business days.

    Regards,

    Vaibhav