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.

Mailbox using MSMC memory

I am using Advantech DSPC-8681 board. I compiled and run the file test demo successfully with the mailbox memory on DDR3. When I change demo_loopback.cmd to have mailbox memory on MSMC memory. the host side stuck in mailBox_open() function. Is that possible to use mailbox on MSMC memory?

Thanks

  • Have you confirmed the MSMC is working properly (e.g. write some data and read it back to verify the contents)? The Advantech DSPC-8681 uses C6678 DSPs which are multicore. Are you running this on a single core or on multiple cores?

    Todd

  • I am running it on multi-core. After doing a reset, it passed maiBox_open(), but then it stucks inside do_filetest() at

            case 2:
              /* Wait for message from  DSP node, through mailBOx */   
              do {
                ret_val = mailBox_query(rx_mailbox_handle[node_id]);
              } while(!ret_val);
              get_data_through_dma_and_write_to_file(node_id, outFile);

    ret_val is always zero.

  • This is how I changed demo_loopback.cmd:

    /*
        MSMCSRAM1 (RWX) : org = 0xc000000, len = 0x100
        MSMCSRAM (RWX) : org = 0xc000100, len = 0x3fff00
    */
        MSMCSRAM1 (RWX) : org = 0xc000000, len = 0x100
        MSMCSRAM (RWX) : org = 0xc000100, len = 0x3f7f00
        MSMC_MAILBOX_RESERVED (RW) : org = 0xc3f8000, len = 0x8000

    /*
        .dsp2hostmailbox   >       DDR3_MAILBOX_RESERVED
        .host2dspmailbox   >       DDR3_MAILBOX_RESERVED
    */
        .dsp2hostmailbox   >       MSMC_MAILBOX_RESERVED
        .host2dspmailbox   >       MSMC_MAILBOX_RESERVED

    Is there anything wrong with this change?

  • What is mailBox_query? I'm assuming there are calls to SYS/BIOS' Mailbox APIs. Can you look at Mailbox in ROV when there object is in MSMC and when it is in DDR? Note: if you are running the same image on multiple cores, you have to make sure that the objects are placed carefully. If you have a static Mailbox in shared memory, each core is going to accessing the same memory.

    Todd

  • I am not using SYS/BIOS yet. mailBox_query() is part of TI desktop-linux-sdk and if you search for mailBox_query in demo_filetest.c, you will see a few calls of this function.

  • Leim,

    Since your question is not really BIOS related, I have moved this thread over to the device forum in hopes that you can get a further answer there.

  • I am a little confused. I thought I am in the right forum. What forum has you moved this thread to?

  • You were on the BIOS forum; however, you are not using BIOS (yet).

    I moved you over to the Keystone Multicore forum (C66xx), as I believe that is the device that you are using. 

  • I apologize, I had moved it to the BIOS forum, think the call was BIOS related, it's Linux-SDK related, and that's where I should have moved it to.  I will move it there now.  

    Best Regards,
    Chad 

  • Another problem I am experiencing right now, is mailBox_open() stuck on the second DSP core on the host side (32 DSP cores on 4 TI DSP chip) with my own code. Just for a test, these are what I did the filetestdemo:

    1. Keep the code on the host side the same (no change in code and using DDR3)

    2. Commented out all code inside for( ; ; ) loop at the end of demo_loopback.c on the DSP side.

    I observed exactly the same problem as seen in the trace below.Please correct me if I am wrong. My expectation with this part of code commented out is the creation and opening of 64 mailboxes should go through correctly on the host side.

    Creating Mailbox (1e --> 80000000)
    Created Mailbox Rx id: 0x      1e, Handle 0x3624080
    Creating Mailbox (80000000 --> 1f)
    Created Mailbox Tx id: 0x      1f Handle 0x36240b0
    Creating Mailbox (1f --> 80000000)
    Created Mailbox Rx id: 0x      1f, Handle 0x36240e0
    nodeBits 1 decision1
    Opening Mailbox(80000000 --> 0)
    Opening Mailbox(0 --> 80000000)
    nodeBits 2 decision2
    Opening Mailbox(80000000 --> 1)

    I would appreciate any help on this problem because it is blocking my progress.

  • Liem Le1 said:

    I would appreciate any help on this problem because it is blocking my progress.

    Did you ever figure this out?  I'm curious about using the Linux SDK mailBox as well.