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.

TDA2EVM5777: SBL multicore mailbox EVE UART output issues

Part Number: TDA2EVM5777

Hi

    I'm want to test the SBL multicore mailbox example under "ti_components\drivers\pdk_01_08_00_16\packages\ti\boot\sbl_auto\examples\sbl_multicore_mbx\tda2xx"

    I generated a AppImage combined with A15 and EVE1 output file by "MulticoreImageGen_tda2xx.bat".

    The result is good:

    Multicore Mailbox app - MPU-Core0 Master core

    EVE1 boot-up successfully

    But after reading the src file "sbl_mbx_mpu_cpu0.c" i found that both "Multicore Mailbox app - MPU-Core0 Master core" and " EVE1 boot-up successfully" are output from A15, and EVE1 just send a message to A15 in its main function with output nothing to UART.

    My question is how to output logs from EVE directly? 

   I have tested the following ways, but there are not work:

  1 C language's printf

   in the "sbl_mbx_eve1.c"   

           void main(void) {

uint32_t msg = 'D'


printf("EVE1 main\n");

/* Wait for message from MPU */
while (MESSAGE_INVALID ==
MailboxGetMessage(SOC_MAILBOX2_BASE, MAILBOX_QUEUE_6, &msg)) ;

/* Send ack message to MPU */
MailboxSendMessage(SOC_MAILBOX9_BASE, MAILBOX_QUEUE_0, 0xAA55FF00);
while (1) ;

}

   here, no output logs from printf function.

   2 UARTConfigPuts()

   Just like "sbl_mbx_mpu_cpu0.c", i add UARTConfigPuts() in the "sbl_mbx_eve1.c":

  void main(void) {

uint32_t msg = 'D';

UARTConfigPuts(uartBaseAddr,"\r\nEVE1 main UARTConfigPuts\r\n ", -1);

/* Wait for message from MPU */
while (MESSAGE_INVALID ==
MailboxGetMessage(SOC_MAILBOX2_BASE, MAILBOX_QUEUE_6, &msg)) ;

/* Send ack message to MPU */
MailboxSendMessage(SOC_MAILBOX9_BASE, MAILBOX_QUEUE_0, 0xAA55FF00);
while (1) ;

}

     But, UARTConfigPuts also did not work.

So, how to output logs from EVE directly?

Thanks

xuanbo

    

  • Hi Xuanbo,

    In the first case you are using printf which means that messages are not sent to UART console.
    For the second one you are sending some data from EVE to UART without waiting for SBL to finish.
    This might have caused some corruption in SBL logs.
    In case you want to output logs from EVE you should wait for SBL to finish, do UART init in EVE app (to be independent of UART config used by SBL) and then send UART prints.

    Regards,
    Rishabh
  • Hi Rishabh

       What you mean "wait for SBL to finish"?

       Is it the time when the "EVE1 boot-up successfully" log is output means "SBL is finish"? Because both A15 and EVE's main function have been implemented  at this moment.

       I did the UART init in EVE app as follows, but it still did not work:

    1  "sbl_mbx_eve1.c"

    uint32_t uartBaseAddr = SOC_UART1_BASE;

    void padConfig_prcmEnable()

    {

       /*Pad configurations */

       HW_WR_REG32(SOC_CORE_PAD_IO_REGISTERS_BASE+CTRL_CORE_PAD_UART1_RXD,0x00040000);

       HW_WR_REG32(SOC_CORE_PAD_IO_REGISTERS_BASE+CTRL_CORE_PAD_UART1_TXD,0x00000000);

       /* Set the UART Parameters */

       UARTConfigInit(uartBaseAddr, BAUD_RATE_115200, UART_WORD_LENGTH_8, UART_STOP_BIT_1, UART_NO_PARITY,

                       UART_16x_MODE);

    }

    void main(void) {

       uint32_t msg = 'D';

       /* Wait for message from MPU */

       while (MESSAGE_INVALID ==

              MailboxGetMessage(SOC_MAILBOX2_BASE, MAILBOX_QUEUE_6, &msg)) ;

       /* Send ack message to MPU */

       MailboxSendMessage(SOC_MAILBOX9_BASE, MAILBOX_QUEUE_0, 0xAA55FF00);

       /*Pad configuration and PRCM enable*/

       padConfig_prcmEnable();

       UARTConfigPuts(uartBaseAddr,"\r\nEVE1 main UARTConfigPuts\r\n ", -1);

       while (1) ;

    }

    Which is the same as "sbl_mbx_mpu_cpu0.c", but no "EVE1 main UARTConfigPuts" log output.

    2

    uint32_t uartBaseAddr = SOC_UART2_BASE;

    void padConfig_prcmEnable()

    {

       /*Pad configurations */

       HW_WR_REG32(SOC_CORE_PAD_IO_REGISTERS_BASE+CTRL_CORE_PAD_UART2_RXD,0x00040000);

       HW_WR_REG32(SOC_CORE_PAD_IO_REGISTERS_BASE+CTRL_CORE_PAD_UART2_TXD,0x00000000);

       /* Set the UART Parameters */

       UARTConfigInit(uartBaseAddr, BAUD_RATE_115200, UART_WORD_LENGTH_8, UART_STOP_BIT_1, UART_NO_PARITY,

                       UART_16x_MODE);

    }

    void main(void) {

       uint32_t msg = 'D';

       /* Wait for message from MPU */

       while (MESSAGE_INVALID ==

              MailboxGetMessage(SOC_MAILBOX2_BASE, MAILBOX_QUEUE_6, &msg)) ;

       /* Send ack message to MPU */

       MailboxSendMessage(SOC_MAILBOX9_BASE, MAILBOX_QUEUE_0, 0xAA55FF00);

       /*Pad configuration and PRCM enable*/

       padConfig_prcmEnable();

       UARTConfigPuts(uartBaseAddr,"\r\nEVE1 main UARTConfigPuts\r\n ", -1);

       while (1) ;

    }

    I uesd the UART2 to replace the UART1, but this method did not work too.

    And from the Schematic of TDA2X EVM, the USB terminal is connected to UART1 only:

    So is it only UART1 can be used in the apps?

    Thanks

    xuanbo

  • Hi Xuanbo,

    SBL runs on master A15. A15 parses the application image and after identifying/loading app images present in multi core image will bring the slave cores out of reset one by one. First is IPU, then DSPs and then EVEs. Then it will print timing statistics. After that SBL will jump to A15 app. Till the point SBL has not jumped to A15 application SBL is not finished.

    On the EVM UART2 is not connected so you should use UART1.

    Regards,
    Rishabh
  • Hi Rishabh

    Thank you for your reply.
    I know the SBL flow as you said, "load image, reset slave cores, then jump to master core's binary which is the A15 app". Does the main function of "sbl_mbx_mpu_cpu0.c" is the A15 app? My previous understanding is that "sbl_mbx_mpu_cpu0.c"'s main function is the app of A15, and "sbl_mbx_eve1.c"'s main function is the EVE app. So when the "EVE1 boot-up successfully" log is output, the A15 app has been jumped in and implemented, which means SBL is finished? But from what your said above, i think my understanding is wrong.
    So which part is A15 app, and which is EVE app?

    Thanks
    xuanbo
  • By the way, the whole log is:

    TDA2xx SBL Boot

    DPLL Configuration Completed

    Clock Domain Configuration Completed

    Module Enable Configuration Completed

    TI EVM PAD Config Completed

    DDR Config Completed

    App Image Download Begins

    SD Boot - file open completed successfully

    Trying to boot App Image with header version 1

    MPU CPU0 Image Load Completed

    DSP1 Image Load Completed

    EVE1 Image Load Completed

    App Image Download Completed

    Putting MPU CPU1 in Off mode

    EVE MMU configuration completed

    EVE MMU configuration completed

    EVE MMU configuration completed

    EVE MMU configuration completed

    *****************************************************************

    PMCCNTR counts once every 64 clock cycles, multiple by 64 to get actual CPU cycles

    SBL Initial Config Cycles - 114701 (9.78 ms)
    SOC Init Cycles - 264161 (22.54 ms)
    DDR Config Clock Cycles - 68023 (5.80 ms)
    App Image Load Cycles - 814209 (69.47 ms)
    Slave Core Bootup Cycles - 323094 (27.57 ms)
    SBL Boot-up Cycles - 1585525 (135.29 ms)
    Time at which SBL started IPU1_0 - 10895 (0.92 ms)
    *****************************************************************

    Jumping to MPU CPU0 App

    Multicore Mailbox app - MPU-Core0 Master core

    EVE1 boot-up successfully

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Before the "EVE1 boot-up successfully", there is " Jumping to MPU CPU0 App ", so my previous understanding is that the main function of "sbl_mbx_mpu_cpu0.c" is the A15 app.
  • Hi,

    Statement "sbl_mbx_mpu_cpu0.c"s main function is the app of A15, and "sbl_mbx_eve1.c"'s main function is the EVE app is correct.

    Think this from time perspective. At x time EVE booted up and started running main of sbl_mbx_eve1.c.

    A15 in parallel was booting other cores. After doing everything A15 jumps to main of sbl_mbx_mpu_cpu0.c.

    Till the point A15's main starts EVE should not send any UART prints. Also A15 main should not initialize UART.

    Regards,

    Rishabh

  • Hi Rishabh

    Thank you for your explanation. I have solved this problem now.
    My solution is as follows:
    1 After the EVE send the msg to A15, let the EVE be waited for the msg sent by A15 again, not to the while (1) ;
    2 After the A15 output "EVE1 boot-up successfully", let the A15 send the msg to EVE again;
    3 When the EVE receive the msg from A15 again, which means A15 is "free" and not occupy the UART resource, then EVE can use the UARTConfigPuts function to output log.

    Thanks
    xuanbo
  • Hi Xuanbo,

    Glad to hear that. Please go ahead and mark the answer verified and feel free to ask any follow-up questions by creating a new thread.

    Regards,
    Rishabh