Code listing 1
/* Header files includes*/
#include
"project.h"
int
main
(
void
)
{
__enable_irq
();
/* Enable global interrupts. */
/* Enable CM4. CY_CORTEX_M4_APPL_ADDR must be updated
if CM4 memory layout is changed. */
Cy_SysEnableCM4
(
CY_CORTEX_M4_APPL_ADDR
);
for
(;;)
{
}
}
/* [] END OF FILE */
When the CM4 CPU is enabled, the UART Component is started and prints a “Hello World!” message on the
terminal emulator. A Timer Counter PWM (TCPWM) Component is configured to generate an interrupt every
second. At each interrupt, the CM4 CPU toggles the LED (LED5) state on the kit. Copy the code snippet in
to
main_cm4.c
of your project.
Getting started with PSoC
™
6 MCU on PSoC
™
Creator
4 My first PSoC
™
6 MCU design using PSoC
™
Creator
Application Note
30
002-21774 Rev. *G
2022-07-21