Hi,
I am creating FreeRtos project For LED ON/OFF using LPC54113 MCU as per Demo Code reference .But Freertos vTaskStartScheduler() not working?
Below are the code,
#include <stdio.h>
#include "board.h"
#include "peripherals.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "LPC54113.h"
#include "fsl_debug_console.h"
#include "FreeRTOS.h"
//#include "queue.h"
#include "task.h"
void ECG_TASK(void *pvParameters);
/* TODO: insert other include files here. */
/* TODO: insert other definitions and declarations here. */
/*
* @brief Application entry point.
*/
int main(void) {
/* Init board hardware. */
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
//#ifndef BOARD_INIT_DEBUG_CONSOLE_PERIPHERAL
// /* Init FSL debug console. */
// BOARD_InitDebugConsole();
//#endif
// GPIO_PinWrite(BOARD_INITPINS_SD1_GPIO,BOARD_INITPINS_SD1_PORT,BOARD_INITPINS_SD1_PIN,0U);
xTaskCreate(ECG_TASK, "ECG_task", configMINIMAL_STACK_SIZE, ((void *)0), 1, NULL);
vTaskStartScheduler();
// GPIO_PinWrite(BOARD_INITPINS_SD1_GPIO,BOARD_INITPINS_SD1_PORT,BOARD_INITPINS_SD1_PIN,1U);
while(1);
}
void ECG_TASK(void *pvParameters)
{
while (1)
{
GPIO_PinWrite(BOARD_INITPINS_SD1_GPIO,BOARD_INITPINS_SD1_PORT,BOARD_INITPINS_SD1_PIN,1U);
vTaskDelay(100);
GPIO_PinWrite(BOARD_INITPINS_SD1_GPIO,BOARD_INITPINS_SD1_PORT,BOARD_INITPINS_SD1_PIN,0U);
}
}
Thanks,
TDC