diff --git a/boards/arm/cy8ckit_062_ble/doc/index.rst b/boards/arm/cy8ckit_062_ble/doc/index.rst index ac67a553061..762835861c2 100644 --- a/boards/arm/cy8ckit_062_ble/doc/index.rst +++ b/boards/arm/cy8ckit_062_ble/doc/index.rst @@ -176,6 +176,59 @@ Cy_WDT_Disable(). You should see "Hello World! cy8ckit_062_ble_m0" in your terminal. +Running on Dual Core +******************** + +#. Build the Zephyr kernel and the :ref:`button-sample` sample application: + + .. zephyr-app-commands:: + :zephyr-app: samples/basic/button + :board: cy8ckit_062_ble_m4 + :goals: build + :compact: + +#. If you have a USB-Serial adapter, you can connect SBC[UART]-6 on Arduino + header. Schematic should be checked for connections. Run your favorite + terminal program again now listen for another output. Under Linux the + terminal should be :code:`/dev/ttyUSB0`. For example: + + .. code-block:: console + + $ minicom -D /dev/ttyUSB0 -o + + The -o option tells minicom not to send the modem initialization + string. Connection should be configured as follows: + + - Speed: 115200 + - Data: 8 bits + - Parity: None + - Stop bits: 1 + +#. To flash an image: + + .. zephyr-app-commands:: + :zephyr-app: samples/basic/button + :board: cy8ckit_062_ble_m4 + :goals: flash + :compact: + +#. Configure Cortex-M0+ to enable Cortex-M4: + + The last step flash the M4 image on the flash. However, Cortex-M0 by default + doesn't start the M4 and nothing will happen. To enable Cortex-M4 CPU, + repeat the steps on programming and debug and add the following parameter + when performing the build process. + + .. zephyr-app-commands:: + :zephyr-app: samples/hello_world + :board: cy8ckit_062_ble_m0 + :goals: build flash + :gen-args: -DCONFIG_SOC_PSOC6_M0_ENABLES_M4=y + :compact: + + Now you can press button SW-2 and see LED-9 blink at same time you have the + "Hello World! cy8ckit_062_ble_m0" in the your terminal. + Board Revision ************** diff --git a/soc/arm/cypress/Kconfig b/soc/arm/cypress/Kconfig index caf46457fcd..162fc75f304 100644 --- a/soc/arm/cypress/Kconfig +++ b/soc/arm/cypress/Kconfig @@ -21,6 +21,12 @@ config SOC_PSOC6_M4 endchoice +config SOC_PSOC6_M0_ENABLES_M4 + bool "Enable dual-core support [activate Cortex-M4]" + depends on SOC_PSOC6_M0 + help + Cortex-M0 CPU should boot Cortex-M4 + config SOC_FAMILY_PSOC6 bool diff --git a/soc/arm/cypress/psoc6/soc.c b/soc/arm/cypress/psoc6/soc.c index efe1177ae6d..acd7b2ea9e4 100644 --- a/soc/arm/cypress/psoc6/soc.c +++ b/soc/arm/cypress/psoc6/soc.c @@ -368,6 +368,10 @@ void Cy_SystemInit(void) /* Configure peripheral clocks */ Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 0u, 0u); Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 0u); + +#if defined(CONFIG_SOC_PSOC6_M0_ENABLES_M4) + Cy_SysEnableCM4(DT_REG_ADDR(DT_NODELABEL(flash1))); +#endif } static int init_cycfg_platform_wraper(const struct device *arg)