Peripherals with m0/m4

cancel
Showing results for 
Search instead for 
Did you mean: 

Peripherals with m0/m4

63 Views
Contributor I

So am activating the m0 core of an LPC4337.  I have the core up and running, setting a shared memory variable when it is completed.  The m4 core waits for that variable to be set before continuing.

All that works just fine.

The issue I'm having is with the uart0.  I have data printing out, and on a non-multicore system the m4 prints data out just fine.  But, turning on the m0 core, I still get data but it's mangled.  So the question is-- who rules the universe with peripherals-- m0 or m4?  Do I need to init uart0 to the same values with both cores?   The m0 core goes into a endless while(1) loop, then the m4 initializes the uart… which doesn't seem to work.

0 Kudos
1 Reply

5 Views
NXP TechSupport
NXP TechSupport

Hello Bryan Wilcutt,

After configuration UART, in M0 core, we can directly use it.

You can have a look at the multicore_blinky demo under LPCopen LPCOpen Software for LPC43XX | NXP ,

in M4 core project has initialized the UART in

static void prvSetupHardware(void)
{
    SystemCoreClockUpdate();
    Board_Init();

...

}

you can add UART send code in M0 core project to test, for example:

/**
 * Wait for message from M4 core
 */
void M4_IRQHandler(void)
{
    int i = 0;
    ipcex_msg_t msg;
    Chip_CREG_ClearM4Event();
Chip_UART_SendBlocking(DEBUG_UART, "world",6);//Alice test

...

}

Hope it helps,


Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos