Thank you, you are correct.
Test the code below and it worked.
#include "MKE06Z4.h"
// GPIOB/FGPIOB pins 21, 22, 23
#define LED_C_RED 0x200000
#define LED_C_GREEN 0x400000
#define LED_C_BLUE 0x800000
int i = 0, j = 0;
int main(void)
{
// Configure with output direct
FGPIOB->PDDR |= LED_C_RED | LED_C_GREEN | LED_C_BLUE;
// Set all leds with off
FGPIOB->PDOR |= LED_C_RED | LED_C_GREEN | LED_C_BLUE;
for (;;) {
// Port toggle output
FGPIOB->PTOR |= LED_C_RED;
for(i = 0; i < 30000; i++){
for(j = 0; j < 100; j++);
}
}
return 0;
}
Merry Christmas!!!