MCUXpresso SDK Documentation

sema4_dualcore

sema4_dualcore#

Overview#

This example shows how to use the SEMA4 gate lock and unlock, and the gate notify feature. In this example, core 0 sends command to core 1 through MU. According to the commands, core 1 locks and unlocks the specific SEMA4 gate at the proper time. If core 0 trys to lock a SEMA4 gate which has been locked by core 1, the opeartion fails, and core 0 is notified when the SEMA4 gate is unlocked by core 1. This example demonstrates this feature.

Supported Boards#

MIMXRT1170-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1170-EVKB board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example finished successfully, you can see the log “Example finished successfully” in the terminal window. If the example runs failed, you can see the log like “Example finished with error”.

Note: To download and debug IAR EW project using J-Link (replacing the default CMSIS-DAP debug probe), following steps are needed:

  1. Remove J6 and J7 jumpers.

  2. Attach the J-Link probe (J-Link Plus / J-Trace) to the board using the J1 connector.

  3. Set “J-Link / J-Trace” in CM7 project options -> Debugger -> Setup panel (replacing CMSIS-DAP option).

  4. Unselect the “Use macro file(s)” in CM7 project options -> Debugger -> Setup panel.

  5. Enable “Use command line options” in CM7 project options -> Debugger -> Extra Options panel (–jlink_script_file=$PROJ_DIR$/../evkbmimxrt1170_connect_cm4_cm7side.jlinkscript command line option is applied).

  6. Click on “Download and Debug” button. During the loading process you can be asked by J-Link sw to select the proper device name (MIMXRT1176XXXA_M7 is unknown). Click O.K. and choose the MIMXRT1176xxxxA device.

  7. It is not possible to attach to the CM4 core when using the J-Link. Also, the multicore debugging does not work with that probe.

Note: To download and debug Keil MDK project using J-Link (replacing the default CMSIS-DAP debug probe), following steps are needed:

  1. Remove J6 and J7 jumpers.

  2. Attach the J-Link probe (J-Link Plus / J-Trace) to the board using the J1 connector.

  3. Set “J-LINK / J-TRACE Cortex” in CM7 project options -> Debug panel (replacing CMSIS-DAP Debugger option).

  4. After the CM7 application build click on Download/F8 button (menu Flash -> Download).

  5. Power off and power on the board.

  6. Multicore example starts running, one can start debugging the CM7 side by clicking on Start/Stop Debug Session (Ctrl + F5).

  7. It is not possible to attach to the CM4 core when using the J-Link.

MIMXRT1160-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1160-EVK board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example finished successfully, you can see the log “Example finished successfully” in the terminal window. If the example runs failed, you can see the log like “Example finished with error”.

Note: To download and debug IAR EW project using J-Link (replacing the default CMSIS-DAP debug probe), following steps are needed:

  1. Remove J6 and J7 jumpers.

  2. Attach the J-Link probe (J-Link Plus / J-Trace) to the board using the J1 connector.

  3. Set “J-Link / J-Trace” in CM7 project options -> Debugger -> Setup panel (replacing CMSIS-DAP option).

  4. Unselect the “Use macro file(s)” in CM7 project options -> Debugger -> Setup panel.

  5. Enable “Use command line options” in CM7 project options -> Debugger -> Extra Options panel (–jlink_script_file=$PROJ_DIR$/../evkmimxrt1160_connect_cm4_cm7side.jlinkscript command line option is applied).

  6. Click on “Download and Debug” button. During the loading process you can be asked by J-Link sw to select the proper device name (MIMXRT1166XXXA_M7 is unknown). Click O.K. and choose the MIMXRT1166xxxxA device.

  7. It is not possible to attach to the CM4 core when using the J-Link. Also, the multicore debugging does not work with that probe.

Note: To download and debug Keil MDK project using J-Link (replacing the default CMSIS-DAP debug probe), following steps are needed:

  1. Remove J6 and J7 jumpers.

  2. Attach the J-Link probe (J-Link Plus / J-Trace) to the board using the J1 connector.

  3. Set “J-LINK / J-TRACE Cortex” in CM7 project options -> Debug panel (replacing CMSIS-DAP Debugger option).

  4. After the CM7 application build click on Download/F8 button (menu Flash -> Download).

  5. Power off and power on the board.

  6. Multicore example starts running, one can start debugging the CM7 side by clicking on Start/Stop Debug Session (Ctrl + F5).

  7. It is not possible to attach to the CM4 core when using the J-Link.