msc8156 uart multicore

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

msc8156 uart multicore

Jump to solution
1,373 Views
admin
Specialist II

Hello

I'm trying to use multi-core (core 0 and 1) StarCore ADS project.

CodeWarrior for StarCore

Version: 10.2.9

Build Id:229

 

I am using UART and UEC0 by core 0 (master).

Core 1 doesn't call UART and UEC0 for opening channels.

Initializations of UART and UEC0 (osInitialize()) are successful.

Task 0 Core 0 opens device and channel UEC0, transmits and receives  successful.

UEC0 has OS_HWI_PRIORITY0.

 

Then Task 0 Core 0 opens device and channel UART, only receives  successful,

UART has OS_HWI_PRIORITY0.

but when Task 0 Core 0 calls  osCioChannelTxBufferPut(&uart_tx) for some data transmitting, Debugging is being inaccessible for Core 0 and Core 1.

UEC0 channels stops transmitting and receiving (it is read by outside ethernet device)

 

If function  osCioChannelTxBufferPut(&uart_tx) is not called UEC0   transmits and receives  successful,

UART0 receives successful.

 

If I use single-core project and the same code for Core 0 - then UART and UEC0 transmit and receive  successful.

If I include code for Core 1 -  then call osCioChannelTxBufferPut(&uart_tx) breaks down debugging Core 0 and Core 1

Any ideas where I have mistake?

 

 

I configure in os_config.h

 

#define MSC815X_UART                        ON

Original Attachment has been moved to: uart.c.zip

Labels (1)
0 Kudos
1 Solution
891 Views
Jim95
Contributor III

Hello,

To avoid this problem you have to do a different initialization for the master and the other.

example for the UART : - master core use SmartDSP initialization

                                   - Other core use this line    (g_msc815x_qbus->epic).p_endis[5] = 0xFFFEFFFF;

This problem came from the fact that the UEC and UART device were provided for multicore use.

View solution in original post

0 Kudos
1 Reply
892 Views
Jim95
Contributor III

Hello,

To avoid this problem you have to do a different initialization for the master and the other.

example for the UART : - master core use SmartDSP initialization

                                   - Other core use this line    (g_msc815x_qbus->epic).p_endis[5] = 0xFFFEFFFF;

This problem came from the fact that the UEC and UART device were provided for multicore use.

0 Kudos